summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/base.c16
-rw-r--r--lib/examples/blocking.c4
-rw-r--r--lib/examples/blocking.h4
-rw-r--r--lib/libradsec-base.h10
-rw-r--r--lib/libradsec-levent.h2
-rw-r--r--lib/libradsec.h2
-rw-r--r--lib/tests/test-blocking.c2
7 files changed, 20 insertions, 20 deletions
diff --git a/lib/base.c b/lib/base.c
index 2427bae..77de4e2 100644
--- a/lib/base.c
+++ b/lib/base.c
@@ -24,7 +24,7 @@ _do_connect(int type,
}
static struct list *
-_list_new(const struct rs_config *ctx)
+_list_new(const struct rs_handle *ctx)
{
struct list *list = rs_malloc(ctx, sizeof(struct list));
if (list)
@@ -33,7 +33,7 @@ _list_new(const struct rs_config *ctx)
}
static int
-_list_push(const struct rs_config *ctx, /* FIXME: code duplicate, list.c */
+_list_push(const struct rs_handle *ctx, /* FIXME: code duplicate, list.c */
struct list *list,
void *data)
{
@@ -57,7 +57,7 @@ _list_push(const struct rs_config *ctx, /* FIXME: code duplicate, list.c */
}
static void
-_list_destroy(const struct rs_config *ctx, /* FIXME: code dup */
+_list_destroy(const struct rs_handle *ctx, /* FIXME: code dup */
struct list *list)
{
struct list_node *node, *next;
@@ -74,7 +74,7 @@ _list_destroy(const struct rs_config *ctx, /* FIXME: code dup */
/* ------------------------------------------------------- */
int
-rs_connect(const struct rs_config *conf,
+rs_connect(const struct rs_handle *conf,
const struct sockaddr *addr,
socklen_t addrlen)
{
@@ -96,7 +96,7 @@ rs_connect(const struct rs_config *conf,
}
int
-rs_disconnect( const struct rs_config *conf, int fd)
+rs_disconnect( const struct rs_handle *conf, int fd)
{
switch (conf->conn_type)
{
@@ -116,7 +116,7 @@ rs_disconnect( const struct rs_config *conf, int fd)
}
struct rs_packet *
-rs_packet_new(const struct rs_config *ctx,
+rs_packet_new(const struct rs_handle *ctx,
const uint8_t buf[RS_HEADER_LEN],
size_t *count)
{
@@ -136,7 +136,7 @@ rs_packet_new(const struct rs_config *ctx,
}
struct rs_packet *
-rs_packet_parse(const struct rs_config *ctx,
+rs_packet_parse(const struct rs_handle *ctx,
struct rs_packet **packet,
const uint8_t *buf,
size_t buflen)
@@ -191,7 +191,7 @@ rs_packet_parse(const struct rs_config *ctx,
}
void
-rs_packet_free(const struct rs_config *ctx,
+rs_packet_free(const struct rs_handle *ctx,
struct rs_packet **packet)
{
_list_destroy(ctx, (*packet)->attrs);
diff --git a/lib/examples/blocking.c b/lib/examples/blocking.c
index 35650ea..b66eb64 100644
--- a/lib/examples/blocking.c
+++ b/lib/examples/blocking.c
@@ -7,7 +7,7 @@
#include "blocking.h"
struct rs_packet *
-next_packet (const struct rs_config *ctx, int fd)
+next_packet (const struct rs_handle *ctx, int fd)
{
uint8_t hdr[RS_HEADER_LEN];
uint8_t *buf;
@@ -44,7 +44,7 @@ next_packet (const struct rs_config *ctx, int fd)
}
int
-send_packet(const struct rs_config *ctx, int fd, struct rs_packet *p)
+send_packet(const struct rs_handle *ctx, int fd, struct rs_packet *p)
{
uint8_t *buf = NULL;
ssize_t n = -20; /* Arbitrary packet size -- a guess. */
diff --git a/lib/examples/blocking.h b/lib/examples/blocking.h
index 04a07a8..f91e6be 100644
--- a/lib/examples/blocking.h
+++ b/lib/examples/blocking.h
@@ -1,4 +1,4 @@
#include "libradsec-base.h"
-struct rs_packet *next_packet (const struct rs_config *ctx, int fd);
-int send_packet (const struct rs_config *ctx, int fd, struct rs_packet *p);
+struct rs_packet *next_packet (const struct rs_handle *ctx, int fd);
+int send_packet (const struct rs_handle *ctx, int fd, struct rs_packet *p);
diff --git a/lib/libradsec-base.h b/lib/libradsec-base.h
index 1c5fab7..e9714fe 100644
--- a/lib/libradsec-base.h
+++ b/lib/libradsec-base.h
@@ -18,7 +18,7 @@
@return A file descriptor or -1 if an error occurred, in which
case errno is set appropriately. */
-int rs_connect(const struct rs_config *conf,
+int rs_connect(const struct rs_handle *conf,
const struct sockaddr *addr,
socklen_t addrlen);
@@ -28,7 +28,7 @@ int rs_connect(const struct rs_config *conf,
@return 0 on success or -1 if an error occurred, in which case
errno is set appropriately. */
-int rs_disconnect(const struct rs_config *conf,
+int rs_disconnect(const struct rs_handle *conf,
int fd);
/** Allocate and initialize a packet from a buffer containing a RADIUS
@@ -44,7 +44,7 @@ int rs_disconnect(const struct rs_config *conf,
@return A pointer to a newly allocated packet or NULL on error.
*/
-struct rs_packet *rs_packet_new(const struct rs_config *ctx,
+struct rs_packet *rs_packet_new(const struct rs_handle *ctx,
const uint8_t buf[RS_HEADER_LEN],
size_t *count);
@@ -61,7 +61,7 @@ struct rs_packet *rs_packet_new(const struct rs_config *ctx,
@return *packet or NULL on error. If NULL, the packet has been
freed and *packet is no longer valid.
*/
-struct rs_packet *rs_packet_parse(const struct rs_config *ctx,
+struct rs_packet *rs_packet_parse(const struct rs_handle *ctx,
struct rs_packet **packet,
const uint8_t *buf,
size_t buflen);
@@ -71,7 +71,7 @@ struct rs_packet *rs_packet_parse(const struct rs_config *ctx,
@param ctx Context.
@param packet Packet to free.
*/
-void rs_packet_free(const struct rs_config *ctx,
+void rs_packet_free(const struct rs_handle *ctx,
struct rs_packet **packet);
/** Serialize a packet.
diff --git a/lib/libradsec-levent.h b/lib/libradsec-levent.h
index f79816c..4189dfc 100644
--- a/lib/libradsec-levent.h
+++ b/lib/libradsec-levent.h
@@ -7,7 +7,7 @@
#include "libradsec.h"
struct rs_connection {
- struct rs_config *conf;
+ struct rs_handle *conf;
struct sockaddr_storage addr;
char open_flag;
};
diff --git a/lib/libradsec.h b/lib/libradsec.h
index 81c8f4c..61cb9e6 100644
--- a/lib/libradsec.h
+++ b/lib/libradsec.h
@@ -43,7 +43,7 @@ struct rs_alloc_scheme {
rs_realloc_fp realloc;
};
-struct rs_config {
+struct rs_handle {
enum rs_conn_type conn_type;
struct rs_credentials transport_credentials;
struct rs_alloc_scheme alloc_scheme;
diff --git a/lib/tests/test-blocking.c b/lib/tests/test-blocking.c
index aab76e3..e1f657b 100644
--- a/lib/tests/test-blocking.c
+++ b/lib/tests/test-blocking.c
@@ -13,7 +13,7 @@ f (const struct sockaddr *addr,
{
int fd = -1;
//struct rs_alloc_scheme as = { calloc, malloc, free, realloc };
- struct rs_config ctx = { RS_CONN_TYPE_TCP,
+ struct rs_handle ctx = { RS_CONN_TYPE_TCP,
{ RS_CRED_NONE, NULL, NULL },
{ NULL, NULL, NULL, NULL } };
struct rs_packet *p = NULL;