From c5aeb0dc4228c6396f35395194e0ec9cc91519c4 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Tue, 10 Nov 2015 20:55:47 +0100 Subject: Implement generic task queue to handle handshakes and maintenance --- src/types.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/types.h') diff --git a/src/types.h b/src/types.h index d5c8719..5ba6481 100644 --- a/src/types.h +++ b/src/types.h @@ -85,6 +85,13 @@ typedef enum fastd_poll_type { POLL_TYPE_SOCKET, /**< A network socket */ } fastd_poll_type_t; +/** Task types */ +typedef enum fastd_task_type { + TASK_TYPE_UNSPEC = 0, /**< Unspecified task type */ + TASK_TYPE_MAINTENANCE, /**< Scheduled maintenance */ + TASK_TYPE_HANDSHAKE, /**< Scheduled handshake */ +} fastd_task_type_t; + /** A timestamp used as a timeout */ typedef int64_t fastd_timeout_t; @@ -93,6 +100,7 @@ typedef int64_t fastd_timeout_t; typedef struct fastd_buffer fastd_buffer_t; typedef struct fastd_poll_fd fastd_poll_fd_t; typedef struct fastd_pqueue fastd_pqueue_t; +typedef struct fastd_task fastd_task_t; typedef union fastd_peer_address fastd_peer_address_t; typedef struct fastd_bind_address fastd_bind_address_t; -- cgit v1.2.3