diff options
Diffstat (limited to 'src/fastd.h')
-rw-r--r-- | src/fastd.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/fastd.h b/src/fastd.h index 9cd6b2a..a116baf 100644 --- a/src/fastd.h +++ b/src/fastd.h @@ -34,6 +34,7 @@ #include "vector.h" #include <errno.h> +#include <poll.h> #include <stdarg.h> #include <stddef.h> #include <stdio.h> @@ -240,6 +241,8 @@ struct fastd_context { fastd_peer_group_t *peer_group; VECTOR(fastd_peer_t*) peers; + VECTOR(struct pollfd) pollfds; + VECTOR(fastd_peer_t*) peers_temp; fastd_dlist_head_t handshake_queue; @@ -401,6 +404,10 @@ static inline struct timespec fastd_in_seconds(const fastd_context_t *ctx, int s return ret; } +static inline void fastd_update_time(fastd_context_t *ctx) { + clock_gettime(CLOCK_MONOTONIC, &ctx->now); +} + static inline bool strequal(const char *str1, const char *str2) { if (str1 && str2) return (!strcmp(str1, str2)); |