summaryrefslogtreecommitdiff
path: root/proto/wireguard/wireguard.h
diff options
context:
space:
mode:
Diffstat (limited to 'proto/wireguard/wireguard.h')
-rw-r--r--proto/wireguard/wireguard.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/proto/wireguard/wireguard.h b/proto/wireguard/wireguard.h
index cc116e38..69345953 100644
--- a/proto/wireguard/wireguard.h
+++ b/proto/wireguard/wireguard.h
@@ -4,20 +4,22 @@
#include "nest/protocol.h"
#include "sysdep/linux/wireguard.h"
+struct peer_config {
+ node n;
+ const char *public_key;
+ u16 listen_port;
+ ip_addr endpoint;
+ u16 remote_port;
+ struct net_addr allowedip;
+};
+
struct wg_config {
struct proto_config c;
const char *ifname;
const char *socket_path;
const char *private_key;
u16 listen_port;
-
- struct peer_config {
- const char *public_key;
- u16 listen_port;
- ip_addr endpoint;
- u16 remote_port;
- struct net_addr allowedip;
- } peer;
+ list peers;
};
struct wg_proto {
@@ -25,10 +27,6 @@ struct wg_proto {
struct iface *iface;
wg_key private_key;
wg_device *dev;
-
- struct peer {
- wg_key public_key;
- } peer;
};
struct wg_channel_config {
@@ -47,4 +45,6 @@ struct wg_entry {
extern struct channel_class channel_wg;
+struct peer_config *peer_new(struct wg_config *c);
+
#endif /* _BIRD_WIREGUARD_H */