diff options
Diffstat (limited to 'common.h')
-rw-r--r-- | common.h | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -59,6 +59,7 @@ struct wg_dynamic_attr { struct wg_dynamic_request { enum wg_dynamic_key cmd; uint32_t version; + int fd; wg_key pubkey; unsigned char *buf; size_t buflen; @@ -77,7 +78,7 @@ struct wg_combined_ip { #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0])) void free_wg_dynamic_request(struct wg_dynamic_request *req); -bool handle_request(int fd, struct wg_dynamic_request *req, +bool handle_request(struct wg_dynamic_request *req, bool (*success)(int, struct wg_dynamic_request *), bool (*error)(int, int)); size_t send_message(int fd, unsigned char *buf, size_t *len); @@ -85,7 +86,7 @@ void send_later(struct wg_dynamic_request *req, unsigned char *const buf, size_t msglen); int print_to_buf(char *buf, size_t bufsize, size_t len, char *fmt, ...); uint32_t current_time(); -void close_connection(int *fd, struct wg_dynamic_request *req); +void close_connection(struct wg_dynamic_request *req); bool is_link_local(unsigned char *addr); void iface_get_all_addrs(uint8_t family, mnl_cb_t data_cb, void *cb_data); int data_attr_cb(const struct nlattr *attr, void *data); |