diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2015-11-17 01:27:47 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2015-11-17 01:27:47 +0100 |
commit | 5082b5a4d2ec52b90e6d7ed178e462a6f0ff6f3e (patch) | |
tree | b3a4e5197bde749bcb7f3dd5354743854325847e /src/types.h | |
parent | cca293a6d474b2bd02a5fbfb1f2fae6179c395d6 (diff) | |
download | fastd-5082b5a4d2ec52b90e6d7ed178e462a6f0ff6f3e.tar fastd-5082b5a4d2ec52b90e6d7ed178e462a6f0ff6f3e.zip |
Use task queue for peer resets and keepalives
This makes it unnecessary to iterate over all peers for maintenance, and
desynchronizes different peers' keepalives.
Diffstat (limited to 'src/types.h')
-rw-r--r-- | src/types.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/types.h b/src/types.h index 5ba6481..edc84f8 100644 --- a/src/types.h +++ b/src/types.h @@ -90,12 +90,16 @@ typedef enum fastd_task_type { TASK_TYPE_UNSPEC = 0, /**< Unspecified task type */ TASK_TYPE_MAINTENANCE, /**< Scheduled maintenance */ TASK_TYPE_HANDSHAKE, /**< Scheduled handshake */ + TASK_TYPE_PEER, /**< Peer maintenance */ } fastd_task_type_t; /** A timestamp used as a timeout */ typedef int64_t fastd_timeout_t; +/** Invalid timestamp */ +static const fastd_timeout_t fastd_timeout_inv = INT64_MAX; + typedef struct fastd_buffer fastd_buffer_t; typedef struct fastd_poll_fd fastd_poll_fd_t; |