summaryrefslogtreecommitdiff
path: root/lib/include/radsec
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordu.net>2011-03-06 14:46:57 +0100
committerLinus Nordberg <linus@nordu.net>2011-03-06 14:46:57 +0100
commit7636505962a348d9564e53922834dc6df1274653 (patch)
tree28a696ab93922db7a3ebb47093e6225040ebc1fe /lib/include/radsec
parentfda0bfd44f940688f85fe3a99a0c8cd91611452f (diff)
UDP w/o bufferevents, part 1.
Sending, no retransmitting and no receiving.
Diffstat (limited to 'lib/include/radsec')
-rw-r--r--lib/include/radsec/radsec-impl.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/include/radsec/radsec-impl.h b/lib/include/radsec/radsec-impl.h
index 963c821..f8904ac 100644
--- a/lib/include/radsec/radsec-impl.h
+++ b/lib/include/radsec/radsec-impl.h
@@ -69,7 +69,6 @@ struct rs_connection {
struct rs_context *ctx;
struct rs_realm *realm; /* Owned by ctx. */
struct event_base *evb; /* Event base. */
- struct bufferevent *bev; /* Buffer event. */
struct event *tev; /* Timeout event. */
struct rs_credentials transport_credentials;
struct rs_conn_callbacks callbacks;
@@ -80,10 +79,17 @@ struct rs_connection {
char is_connecting; /* FIXME: replace with a single state member */
char is_connected; /* FIXME: replace with a single state member */
int fd; /* Socket. */
- int tryagain;
- int nextid;
+ int tryagain; /* For server failover. */
+ int nextid; /* Next RADIUS packet identifier. */
int user_dispatch_flag : 1; /* User does the dispatching. */
+ /* TCP transport specifics. */
+ struct bufferevent *bev; /* Buffer event. */
+ /* UDP transport specifics. */
+ struct event *wev; /* Write event (for UDP). */
+ struct event *rev; /* Read event (for UDP). */
+ struct rs_packet *out_queue; /* Queue for outgoing UDP packets. */
#if defined(RS_ENABLE_TLS)
+ /* TLS specifics. */
SSL_CTX *tls_ctx;
SSL *tls_ssl;
#endif
@@ -97,6 +103,7 @@ struct rs_packet {
struct rs_packet *original;
char valid_flag;
char written_flag;
+ struct rs_packet *next; /* Used for UDP output queue. */
};
struct rs_attr {