diff options
author | Linus Nordberg <linus@nordu.net> | 2010-09-29 15:52:39 +0200 |
---|---|---|
committer | Linus Nordberg <linus@nordu.net> | 2010-09-29 15:52:39 +0200 |
commit | b10a02e5f3a7dd184ada869015e438e63bca52bf (patch) | |
tree | 70c74d012d2a89c1a1efefa5afc0787de0b84368 /lib/libradsec.h | |
parent | e2633633030e62994ca41ff62006e3e40517c73a (diff) |
WIP -- connecting and sending a packet using libevent.
Diffstat (limited to 'lib/libradsec.h')
-rw-r--r-- | lib/libradsec.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libradsec.h b/lib/libradsec.h index 255c0f5..2ccafe2 100644 --- a/lib/libradsec.h +++ b/lib/libradsec.h @@ -14,6 +14,8 @@ enum rs_err_code { RSE_FR = 6, RSE_BADADDR = 7, RSE_NOPEER = 8, + RSE_EVENT = 9, + RSE_CONNERR = 10, RSE_SOME_ERROR = 21, }; @@ -48,7 +50,7 @@ int rs_context_config_read(struct rs_handle *ctx, const char *config_file); int rs_conn_create(struct rs_handle *ctx, struct rs_connection **conn); int rs_conn_add_server(struct rs_connection *conn, struct rs_peer **server, 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); -void rs_conn_destroy(struct rs_connection *conn); +void rs_conn_destroy(struct rs_connection *conn); int rs_conn_set_eventbase(struct rs_connection *conn, struct event_base *eb); int rs_conn_set_callbacks(struct rs_connection *conn, struct rs_conn_callbacks *cb); int rs_conn_select_server(struct rs_connection *conn, const char *name); @@ -69,7 +71,7 @@ void rs_packet_add_attr(struct rs_packet *pkt, struct rs_attr *attr); 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); -int rs_packet_send(struct rs_connection *conn, const struct rs_packet *pkt, void *user_data); +int rs_packet_send(struct rs_connection *conn, struct rs_packet *pkt, void *data); int rs_packet_recv(struct rs_connection *conn, struct rs_packet **pkt); int rs_ctx_err_push(struct rs_handle *ctx, int code, const char *fmt, ...); |