aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/containers.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/containers.h')
-rw-r--r--src/containers.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/containers.h b/src/containers.h
index 2ffc230..8fd813a 100644
--- a/src/containers.h
+++ b/src/containers.h
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0 */
+/* SPDX-License-Identifier: GPL-2.0 OR MIT */
/*
* Copyright (C) 2015-2020 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
*/
@@ -12,7 +12,15 @@
#include <sys/socket.h>
#include <net/if.h>
#include <netinet/in.h>
+#if defined(__linux__)
#include <linux/wireguard.h>
+#elif defined(__OpenBSD__)
+#include <net/if_wg.h>
+#endif
+
+#ifndef WG_KEY_LEN
+#define WG_KEY_LEN 32
+#endif
/* Cross platform __kernel_timespec */
struct timespec64 {
@@ -20,6 +28,10 @@ struct timespec64 {
int64_t tv_nsec;
};
+enum {
+ WGALLOWEDIP_REMOVE_ME = 1U << 0,
+};
+
struct wgallowedip {
uint16_t family;
union {
@@ -27,6 +39,7 @@ struct wgallowedip {
struct in6_addr ip6;
};
uint8_t cidr;
+ uint32_t flags;
struct wgallowedip *next_allowedip;
};