From 3e543754bd2b121afec2928cf2888945c387d5ce Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Wed, 27 Mar 2019 01:33:44 +0100 Subject: Wireguard: Set up wireguard device Add private key and listen port items. --- proto/wireguard/wireguard.h | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'proto/wireguard/wireguard.h') 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 { -- cgit v1.2.3