summaryrefslogtreecommitdiff
path: root/lib/tunnel_encaps.h
diff options
context:
space:
mode:
authorMikael Magnusson <mikma@users.sourceforge.net>2019-09-27 22:20:59 +0200
committerMikael Magnusson <mikma@users.sourceforge.net>2019-11-15 00:11:29 +0100
commitc714681773bb0b932d55b2028c46e3a7982bdd6a (patch)
treea122415b9b04d64dc8d7d6858499752180f2dd38 /lib/tunnel_encaps.h
parent5e0835d9a7b5259d9e9887c1f9faedd09e1c8397 (diff)
Wireguard: Generalize tunnel encapsulation
Diffstat (limited to 'lib/tunnel_encaps.h')
-rw-r--r--lib/tunnel_encaps.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/tunnel_encaps.h b/lib/tunnel_encaps.h
index 6c85a883..9d25e5c5 100644
--- a/lib/tunnel_encaps.h
+++ b/lib/tunnel_encaps.h
@@ -4,6 +4,8 @@
#include "nest/route.h"
#include "sysdep/linux/wireguard.h"
+#define BA_TUNNEL_ENCAP 0x17
+
#define BGP_TUNNEL_ENCAP_A_SUB_TLV_ENCAP 1
#define BGP_TUNNEL_ENCAP_A_SUB_TLV_COLOR 4
#define BGP_TUNNEL_ENCAP_A_SUB_TLV_TUNNEL_EP 6
@@ -14,6 +16,6 @@
#define FLAG_BGP_TUNNEL_ENCAP_A_SUB_TLV_TUNNEL_EP (1<<BGP_TUNNEL_ENCAP_A_SUB_TLV_TUNNEL_EP)
#define FLAG_BGP_TUNNEL_ENCAP_A_SUB_TLV_UDP_DEST_PORT (1<<BGP_TUNNEL_ENCAP_A_SUB_TLV_UDP_DEST_PORT)
-int decode_tunnel_encap(const eattr *e, u16 wg_tunnel_type, wg_key *pubkey, u32 *as4, ip_addr *tunnel_ep, u32 *color, u16 *udp_port, u16 *flags);
+int decode_tunnel_encap(const eattr *e, u16 wg_tunnel_type, void *encap, size_t *encap_size, u32 *as4, ip_addr *tunnel_ep, u32 *color, u16 *udp_port, u16 *flags);
#endif /* _BIRD_TUNNEL_ENCAPS_ */