summaryrefslogtreecommitdiff
path: root/lib/include
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordu.net>2010-10-05 22:06:01 +0200
committerLinus Nordberg <linus@nordu.net>2010-10-05 22:06:01 +0200
commitbf4047ef3d533e819240c2a00ff9bd65e0beba2e (patch)
treedbc496b3efb6ea84a334567ad02f2abf99dd18cf /lib/include
parentcf66600857caeee4cfa3eed208dc3f5cc774945c (diff)
Rename struct rs_handle --> rs_context.
Diffstat (limited to 'lib/include')
-rw-r--r--lib/include/radsec/radsec-impl.h23
-rw-r--r--lib/include/radsec/radsec.h22
2 files changed, 26 insertions, 19 deletions
diff --git a/lib/include/radsec/radsec-impl.h b/lib/include/radsec/radsec-impl.h
index 9421fd6..b46bc47 100644
--- a/lib/include/radsec/radsec-impl.h
+++ b/lib/include/radsec/radsec-impl.h
@@ -33,9 +33,9 @@ struct rs_error {
struct rs_peer {
struct rs_connection *conn;
struct evutil_addrinfo *addr;
- int fd; /* Socket. */
- char is_connecting; /* FIXME: replace with a single state member */
- char is_connected; /* FIXME: replace with a single state member */
+ int fd; /* Socket. */
+ char is_connecting; /* FIXME: replace with a single state member */
+ char is_connected; /* FIXME: replace with a single state member */
char *secret;
int timeout; /* client only */
int tries; /* client only */
@@ -49,7 +49,7 @@ struct rs_realm {
struct rs_realm *next;
};
-struct rs_handle {
+struct rs_context {
struct rs_realm *realms;
struct rs_alloc_scheme alloc_scheme;
struct rs_error *err;
@@ -57,7 +57,7 @@ struct rs_handle {
};
struct rs_connection {
- struct rs_handle *ctx;
+ struct rs_context *ctx;
struct event_base *evb;
struct bufferevent *bev;
enum rs_conn_type type;
@@ -81,10 +81,15 @@ struct rs_attr {
};
/* Nonpublic functions. */
-struct rs_error *_rs_resolv (struct evutil_addrinfo **addr, rs_conn_type_t type, const char *hostname, const char *service);
-struct rs_peer *_rs_peer_create (struct rs_handle *ctx, struct rs_peer **rootp);
-struct rs_error *_rs_err_create (unsigned int code, const char *file, int line, const char *fmt, ...);
-int _rs_err_conn_push_err (struct rs_connection *conn, struct rs_error *err);
+struct rs_error *_rs_resolv(struct evutil_addrinfo **addr,
+ rs_conn_type_t type, const char *hostname,
+ const char *service);
+struct rs_peer *_rs_peer_create(struct rs_context *ctx,
+ struct rs_peer **rootp);
+struct rs_error *_rs_err_create(unsigned int code, const char *file,
+ int line, const char *fmt, ...);
+int _rs_err_conn_push_err(struct rs_connection *conn,
+ struct rs_error *err);
/* Convenience macros. */
diff --git a/lib/include/radsec/radsec.h b/lib/include/radsec/radsec.h
index 9610d0d..389e411 100644
--- a/lib/include/radsec/radsec.h
+++ b/lib/include/radsec/radsec.h
@@ -31,7 +31,7 @@ typedef unsigned int rs_conn_type_t;
/* Data types. */
-struct rs_handle; /* radsec-impl.h */
+struct rs_context; /* radsec-impl.h */
struct rs_connection; /* radsec-impl.h */
struct rs_packet; /* radsec-impl.h */
struct rs_conn; /* radsec-impl.h */
@@ -72,14 +72,15 @@ struct rs_conn_callbacks {
/* Function prototypes. */
/* Context. */
-int rs_context_create(struct rs_handle **ctx, const char *dict);
-void rs_context_destroy(struct rs_handle *ctx);
-int rs_context_set_alloc_scheme(struct rs_handle *ctx,
+int rs_context_create(struct rs_context **ctx, const char *dict);
+void rs_context_destroy(struct rs_context *ctx);
+int rs_context_set_alloc_scheme(struct rs_context *ctx,
struct rs_alloc_scheme *scheme);
-int rs_context_read_config(struct rs_handle *ctx, const char *config_file);
+int rs_context_read_config(struct rs_context *ctx,
+ const char *config_file);
/* Connection. */
-int rs_conn_create(struct rs_handle *ctx, struct rs_connection **conn,
+int rs_conn_create(struct rs_context *ctx, struct rs_connection **conn,
const char *config);
void rs_conn_set_type(struct rs_connection *conn, rs_conn_type_t type);
int rs_conn_add_listener(struct rs_connection *conn, rs_conn_type_t type,
@@ -121,14 +122,15 @@ int rs_attr_create(struct rs_connection *conn, struct rs_attr **attr,
void rs_attr_destroy(struct rs_attr *attr);
/* Config. */
-struct rs_realm *rs_conf_find_realm(struct rs_handle *ctx,
+struct rs_realm *rs_conf_find_realm(struct rs_context *ctx,
const char *name);
/* Error. */
-int rs_err_ctx_push(struct rs_handle *ctx, int code, const char *fmt, ...);
-int rs_err_ctx_push_fl(struct rs_handle *ctx, int code, const char *file,
+int rs_err_ctx_push(struct rs_context *ctx, int code, const char *fmt,
+ ...);
+int rs_err_ctx_push_fl(struct rs_context *ctx, int code, const char *file,
int line, const char *fmt, ...);
-struct rs_error *rs_err_ctx_pop(struct rs_handle *ctx);
+struct rs_error *rs_err_ctx_pop(struct rs_context *ctx);
int rs_err_conn_push(struct rs_connection *conn, int code, const char *fmt,
...);
int rs_err_conn_push_fl(struct rs_connection *conn, int code,