summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordu.net>2010-10-05 22:09:15 +0200
committerLinus Nordberg <linus@nordu.net>2010-10-05 22:09:15 +0200
commit33d85eb74c4c7b71886e2ba0c2451d4526d412dd (patch)
treeae62852ae120c429ce0c5a902300af404f5bd43a
parent5886bda12130ff8e76c4dd73762c183c1ab31871 (diff)
Add rs_conn_fd().
-rw-r--r--lib/include/radsec/radsec.h1
-rw-r--r--lib/radsec.c7
2 files changed, 8 insertions, 0 deletions
diff --git a/lib/include/radsec/radsec.h b/lib/include/radsec/radsec.h
index 389e411..c8b43bf 100644
--- a/lib/include/radsec/radsec.h
+++ b/lib/include/radsec/radsec.h
@@ -97,6 +97,7 @@ int rs_conn_get_current_server(struct rs_connection *conn,
const char *name, size_t buflen);
int rs_conn_receive_packet(struct rs_connection *conn,
struct rs_packet **pkt_out);
+int rs_conn_fd(struct rs_connection *conn);
/* Server and client. */
int rs_server_create(struct rs_connection *conn, struct rs_peer **server);
diff --git a/lib/radsec.c b/lib/radsec.c
index 4e3c6ba..c6f9876 100644
--- a/lib/radsec.c
+++ b/lib/radsec.c
@@ -267,3 +267,10 @@ rs_conn_get_current_server(struct rs_connection *conn, const char *name,
return rs_err_conn_push_fl (conn, RSE_NOSYS, __FILE__, __LINE__,
"%s: NYI", __func__);
}
+
+int rs_conn_fd(struct rs_connection *conn)
+{
+ assert (conn);
+ assert (conn->active_peer);
+ return conn->active_peer->fd;
+}