summaryrefslogtreecommitdiff
path: root/lib/include
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordberg.se>2011-02-28 10:55:41 +0100
committerLinus Nordberg <linus@nordu.net>2011-02-28 11:17:35 +0100
commit2befa02ee876e83a8f8849388e61250e74d75eaf (patch)
treee11f9d9e7468c7dc5330b7dcc574b453662ff2e3 /lib/include
parent515d617e6ee64726af6f38e672b453b48bda6e36 (diff)
Cosmetic header file changes.
Diffstat (limited to 'lib/include')
-rw-r--r--lib/include/radsec/radsec.h67
-rw-r--r--lib/include/radsec/request.h5
2 files changed, 43 insertions, 29 deletions
diff --git a/lib/include/radsec/radsec.h b/lib/include/radsec/radsec.h
index c929111..5d08617 100644
--- a/lib/include/radsec/radsec.h
+++ b/lib/include/radsec/radsec.h
@@ -62,8 +62,7 @@ struct rs_alloc_scheme {
};
typedef void (*rs_conn_connected_cb) (void *user_data /* FIXME: peer? */ );
-typedef void (*rs_conn_disconnected_cb) (void *user_data
- /* FIXME: reason? */ );
+typedef void (*rs_conn_disconnected_cb) (void *user_data /* FIXME: reason? */ );
typedef void (*rs_conn_packet_received_cb) (struct rs_packet *packet,
void *user_data);
typedef void (*rs_conn_packet_sent_cb) (void *user_data);
@@ -85,32 +84,34 @@ 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_context *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_context *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,
- const char *hostname, int port);
+int rs_conn_add_listener(struct rs_connection *conn,
+ rs_conn_type_t type,
+ const char *hostname,
+ int port);
int rs_conn_disconnect (struct rs_connection *conn);
int rs_conn_destroy(struct rs_connection *conn);
-int rs_conn_set_eventbase(struct rs_connection *conn,
- struct event_base *eb);
+int rs_conn_set_eventbase(struct rs_connection *conn, struct event_base *eb);
void rs_conn_set_callbacks(struct rs_connection *conn,
- struct rs_conn_callbacks *cb);
+ struct rs_conn_callbacks *cb);
void rs_conn_del_callbacks(struct rs_connection *conn);
struct rs_conn_callbacks *rs_conn_get_callbacks(struct rs_connection *conn);
int rs_conn_select_server(struct rs_connection *conn, const char *name);
int rs_conn_get_current_server(struct rs_connection *conn,
- const char *name, size_t buflen);
+ const char *name,
+ size_t buflen);
int rs_conn_receive_packet(struct rs_connection *conn,
struct rs_packet *request,
struct rs_packet **pkt_out);
int rs_conn_fd(struct rs_connection *conn);
-/* Server and client. */
+/* Client and server. */
int rs_server_create(struct rs_connection *conn, struct rs_peer **server);
int rs_server_set_address(struct rs_peer *server, const char *hostname,
const char *service);
@@ -120,35 +121,45 @@ void rs_server_set_retries(struct rs_peer *server, int retries);
/* Packet. */
int rs_packet_create(struct rs_connection *conn, struct rs_packet **pkt_out);
-int rs_packet_create_auth_request(struct rs_connection *conn,
- struct rs_packet **pkt,
- const char *user_name, /* FIXME: remove? */
- const char *user_pw); /* FIXME: remove? */
+void rs_packet_destroy(struct rs_packet *pkt);
void rs_packet_add_attr(struct rs_packet *pkt, struct rs_attr *attr);
int rs_packet_send(struct rs_packet *pkt, void *data);
struct radius_packet *rs_packet_frpkt(struct rs_packet *pkt);
-void rs_packet_destroy(struct rs_packet *pkt);
+int rs_packet_create_auth_request(struct rs_connection *conn,
+ struct rs_packet **pkt,
+ const char *user_name,
+ const char *user_pw);
/* Attribute. */
/* FIXME: Replace (or complement) with a wrapper for paircreate(). */
-int rs_attr_create(struct rs_connection *conn, struct rs_attr **attr,
- const char *type, const char *val);
+int rs_attr_create(struct rs_connection *conn,
+ struct rs_attr **attr,
+ const char *type,
+ const char *val);
void rs_attr_destroy(struct rs_attr *attr);
/* Config. */
-struct rs_realm *rs_conf_find_realm(struct rs_context *ctx,
- const char *name);
+struct rs_realm *rs_conf_find_realm(struct rs_context *ctx, const char *name);
/* Error. */
-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, ...);
+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_context *ctx);
-int rs_err_conn_push(struct rs_connection *conn, int code, const char *fmt,
+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,
- const char *file, int line, const char *fmt, ...);
+int rs_err_conn_push_fl(struct rs_connection *conn,
+ int code,
+ const char *file,
+ int line,
+ const char *fmt,
+ ...);
struct rs_error *rs_err_conn_pop(struct rs_connection *conn);
int rs_err_conn_peek_code (struct rs_connection *conn);
void rs_err_free(struct rs_error *err);
diff --git a/lib/include/radsec/request.h b/lib/include/radsec/request.h
index 33957a3..ca7b688 100644
--- a/lib/include/radsec/request.h
+++ b/lib/include/radsec/request.h
@@ -6,7 +6,10 @@ struct rs_request;
extern "C" {
#endif
-int rs_request_create(struct rs_connection *conn, struct rs_request **req_out, const char *user_name, const char *user_pw);
+int rs_request_create(struct rs_connection *conn,
+ struct rs_request **req_out,
+ const char *user_name,
+ const char *user_pw);
int rs_request_send(struct rs_request *request, struct rs_packet **resp_msg);
void rs_request_destroy(struct rs_request *request);