diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-05-27 05:00:11 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-05-27 05:00:11 +0200 |
commit | 9b5e5f7883ef59201d17343680d109c1f9d5ae9b (patch) | |
tree | 901d2ce75a972248f493c32ac898e38f3d436c30 /src/poll.c | |
parent | e90be1577d672068878118fc61fab75e3028b56f (diff) | |
download | fastd-9b5e5f7883ef59201d17343680d109c1f9d5ae9b.tar fastd-9b5e5f7883ef59201d17343680d109c1f9d5ae9b.zip |
poll: document the poll API
Diffstat (limited to 'src/poll.c')
-rw-r--r-- | src/poll.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -24,7 +24,7 @@ */ /** - \file poll.h + \file poll.c Portable polling API implementations */ @@ -41,6 +41,7 @@ #endif +/** Returns the time to the next handshake or -1 */ static inline int handshake_timeout(void) { if (!ctx.handshake_queue.next) return -1; @@ -61,7 +62,6 @@ static inline int handshake_timeout(void) { #include <sys/epoll.h> -/** Initializes the poll interface */ void fastd_poll_init(void) { ctx.epoll_fd = epoll_create1(0); if (ctx.epoll_fd < 0) @@ -75,13 +75,11 @@ void fastd_poll_init(void) { exit_errno("epoll_ctl"); } -/** Frees the poll interface */ void fastd_poll_free(void) { if (close(ctx.epoll_fd)) pr_warn_errno("closing EPOLL: close"); } - void fastd_poll_set_fd_tuntap(void) { struct epoll_event event = { .events = EPOLLIN, |