diff options
author | Linus Nordberg <linus@nordberg.se> | 2013-01-24 11:23:43 +0100 |
---|---|---|
committer | Linus Nordberg <linus@nordberg.se> | 2013-01-24 11:23:43 +0100 |
commit | 52acaa7cea2bb152c47208d93331fdc39f4a5566 (patch) | |
tree | 1067d142a9228f4d06dd8177c9cb15b5a81d0579 /lib/include/radsec/radsec.h | |
parent | fc22159b81c6f9c0649e03ac5be4ccbb7f6520cc (diff) |
user dispatch WIP 0
Diffstat (limited to 'lib/include/radsec/radsec.h')
-rw-r--r-- | lib/include/radsec/radsec.h | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/lib/include/radsec/radsec.h b/lib/include/radsec/radsec.h index 7bd7f10..e54a8e3 100644 --- a/lib/include/radsec/radsec.h +++ b/lib/include/radsec/radsec.h @@ -203,8 +203,9 @@ int rs_context_read_config(struct rs_context *ctx, const char *config_file); packet is associated with a connection when it's created (\a rs_packet_create) or received (\a rs_conn_receive_packet). - If \a config is not NULL it should be the name of a configuration - found in the config file read in using \a rs_context_read_config. + If \a config is not NULL it should be the name of a realm found in + a config file that has already been read using \a rs_context_read_config. + \return On success, RSE_OK (0) is returned. On error, !0 is returned and a struct \a rs_error is pushed on the error stack for the context. The error can be accessed using \a @@ -271,9 +272,21 @@ int rs_conn_receive_packet(struct rs_connection *conn, struct rs_packet *request, struct rs_packet **pkt_out); +/** Run the dispatcher for the event base associated with \a conn. A + * wrapper around event_base_dispatch() for not having to hand out the + * event base. */ +int rs_conn_dispatch(struct rs_connection *conn); + +#if 0 +/** Get the event base associated with connection \a conn. + * \return struct event_base*. */ +struct event_base *rs_conn_get_evb(const struct rs_connection *conn); +#endif + +#define rs_conn_fd rs_conn_get_fd /* Old name. */ /** Get the file descriptor associated with connection \a conn. * \return File descriptor. */ -int rs_conn_fd(struct rs_connection *conn); +int rs_conn_get_fd(struct rs_connection *conn); /** Set the timeout value for connection \a conn. */ void rs_conn_set_timeout(struct rs_connection *conn, struct timeval *tv); |