summaryrefslogtreecommitdiff
path: root/proto/wireguard/wireguard.h
diff options
context:
space:
mode:
authorMikael Magnusson <mikma@users.sourceforge.net>2019-03-27 01:33:44 +0100
committerMikael Magnusson <mikma@users.sourceforge.net>2021-01-12 23:34:17 +0100
commit3e543754bd2b121afec2928cf2888945c387d5ce (patch)
tree1ede8ca7558ad66f64157ba0ab274b7cfb2c299e /proto/wireguard/wireguard.h
parentcd43c7667fa86a2a160be32c13a57fb5072bbb76 (diff)
Wireguard: Set up wireguard device
Add private key and listen port items.
Diffstat (limited to 'proto/wireguard/wireguard.h')
-rw-r--r--proto/wireguard/wireguard.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/proto/wireguard/wireguard.h b/proto/wireguard/wireguard.h
index 1292b1c0..cc116e38 100644
--- a/proto/wireguard/wireguard.h
+++ b/proto/wireguard/wireguard.h
@@ -2,22 +2,33 @@
#define _BIRD_WIREGUARD_H
#include "nest/protocol.h"
+#include "sysdep/linux/wireguard.h"
struct wg_config {
struct proto_config c;
const char *ifname;
+ const char *socket_path;
+ const char *private_key;
+ u16 listen_port;
- struct peer {
- const char *pubkey;
+ struct peer_config {
+ const char *public_key;
+ u16 listen_port;
ip_addr endpoint;
u16 remote_port;
- struct net_addr allowed_ips;
+ struct net_addr allowedip;
} peer;
};
struct wg_proto {
struct proto p;
struct iface *iface;
+ wg_key private_key;
+ wg_device *dev;
+
+ struct peer {
+ wg_key public_key;
+ } peer;
};
struct wg_channel_config {