diff options
author | Mikael Magnusson <mikma@users.sourceforge.net> | 2019-03-27 02:17:49 +0100 |
---|---|---|
committer | Mikael Magnusson <mikma@users.sourceforge.net> | 2021-01-12 23:34:17 +0100 |
commit | b49989e1b7c026f30a774d01dcce549cab818350 (patch) | |
tree | a3cd83056ae7ea4332e1ed429555e89ac9db5862 /proto/wireguard/wireguard.h | |
parent | 3e543754bd2b121afec2928cf2888945c387d5ce (diff) |
Wireguard: Add peer list
Diffstat (limited to 'proto/wireguard/wireguard.h')
-rw-r--r-- | proto/wireguard/wireguard.h | 24 |
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 */ |