aboutsummaryrefslogtreecommitdiffstats
path: root/common.h
diff options
context:
space:
mode:
Diffstat (limited to 'common.h')
-rw-r--r--common.h15
1 files changed, 4 insertions, 11 deletions
diff --git a/common.h b/common.h
index 7c0c0e9..d0f8ffd 100644
--- a/common.h
+++ b/common.h
@@ -6,10 +6,11 @@
#ifndef __COMMON_H__
#define __COMMON_H__
+#include <libmnl/libmnl.h>
+#include <netinet/in.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
-#include <netinet/in.h>
#include "netlink.h"
@@ -65,22 +66,14 @@ struct wg_dynamic_request {
};
struct wg_combined_ip {
- uint16_t family;
union {
struct in_addr ip4;
struct in6_addr ip6;
- } ip;
+ };
+ uint16_t family;
uint8_t cidr;
};
-struct wg_dynamic_lease {
- struct wg_combined_ip ip4;
- struct wg_combined_ip ip6;
- uint32_t start;
- uint32_t leasetime;
- struct wg_dynamic_lease *next;
-};
-
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
void free_wg_dynamic_request(struct wg_dynamic_request *req);