]> git.proxmox.com Git - mirror_frr.git/blame - bgpd/bgp_encap_tlv.h
Merge pull request #13649 from donaldsharp/unlock_the_node_or_else
[mirror_frr.git] / bgpd / bgp_encap_tlv.h
CommitLineData
acddc0ed 1// SPDX-License-Identifier: GPL-2.0-or-later
f4c89855
LB
2/*
3 * Copyright 2015, LabN Consulting, L.L.C.
f4c89855
LB
4 */
5
6#ifndef _QUAGGA_BGP_ENCAP_TLV_H
7#define _QUAGGA_BGP_ENCAP_TLV_H
8
f4c89855
LB
9/***********************************************************************
10 * TUNNEL TYPE-SPECIFIC TLV ENCODE
11 ***********************************************************************/
12
13extern void
d62a17ae 14bgp_encap_type_l2tpv3overip_to_tlv(struct bgp_encap_type_l2tpv3_over_ip *bet,
15 struct attr *attr);
f4c89855 16
d62a17ae 17extern void bgp_encap_type_gre_to_tlv(struct bgp_encap_type_gre *bet,
18 struct attr *attr);
f4c89855 19
d62a17ae 20extern void bgp_encap_type_ip_in_ip_to_tlv(struct bgp_encap_type_ip_in_ip *bet,
21 struct attr *attr);
f4c89855 22
d62a17ae 23extern void bgp_encap_type_transmit_tunnel_endpoint(
24 struct bgp_encap_type_transmit_tunnel_endpoint *bet, struct attr *attr);
f4c89855 25
d62a17ae 26extern void bgp_encap_type_ipsec_in_tunnel_mode_to_tlv(
27 struct bgp_encap_type_ipsec_in_tunnel_mode *bet, struct attr *attr);
f4c89855 28
d62a17ae 29extern void bgp_encap_type_ip_in_ip_tunnel_with_ipsec_transport_mode_to_tlv(
30 struct bgp_encap_type_ip_in_ip_tunnel_with_ipsec_transport_mode *bet,
31 struct attr *attr);
f4c89855 32
d62a17ae 33extern void bgp_encap_type_mpls_in_ip_tunnel_with_ipsec_transport_mode_to_tlv(
34 struct bgp_encap_type_mpls_in_ip_tunnel_with_ipsec_transport_mode *bet,
35 struct attr *attr);
f4c89855 36
d62a17ae 37extern void bgp_encap_type_pbb_to_tlv(struct bgp_encap_type_pbb *bet,
38 struct attr *attr);
f4c89855 39
d62a17ae 40extern void bgp_encap_type_vxlan_to_tlv(struct bgp_encap_type_vxlan *bet,
41 struct attr *attr);
f4c89855 42
d62a17ae 43extern void bgp_encap_type_nvgre_to_tlv(struct bgp_encap_type_nvgre *bet,
44 struct attr *attr);
f4c89855 45
d62a17ae 46extern void bgp_encap_type_mpls_to_tlv(struct bgp_encap_type_mpls *bet,
47 struct attr *attr);
f4c89855
LB
48
49extern void
d62a17ae 50bgp_encap_type_mpls_in_gre_to_tlv(struct bgp_encap_type_mpls_in_gre *bet,
51 struct attr *attr);
f4c89855
LB
52
53extern void
d62a17ae 54bgp_encap_type_vxlan_gpe_to_tlv(struct bgp_encap_type_vxlan_gpe *bet,
55 struct attr *attr);
f4c89855
LB
56
57extern void
d62a17ae 58bgp_encap_type_mpls_in_udp_to_tlv(struct bgp_encap_type_mpls_in_udp *bet,
59 struct attr *attr);
f4c89855
LB
60
61/***********************************************************************
62 * TUNNEL TYPE-SPECIFIC TLV DECODE
63 ***********************************************************************/
64
d62a17ae 65extern int tlv_to_bgp_encap_type_l2tpv3overip(
66 struct bgp_attr_encap_subtlv *stlv, /* subtlv chain */
67 struct bgp_encap_type_l2tpv3_over_ip *bet); /* caller-allocated */
f4c89855 68
d62a17ae 69extern int tlv_to_bgp_encap_type_gre(
70 struct bgp_attr_encap_subtlv *stlv, /* subtlv chain */
71 struct bgp_encap_type_gre *bet); /* caller-allocated */
f4c89855 72
d62a17ae 73extern int tlv_to_bgp_encap_type_ip_in_ip(
74 struct bgp_attr_encap_subtlv *stlv, /* subtlv chain */
75 struct bgp_encap_type_ip_in_ip *bet); /* caller-allocated */
f4c89855 76
d62a17ae 77extern int tlv_to_bgp_encap_type_transmit_tunnel_endpoint(
78 struct bgp_attr_encap_subtlv *stlv,
79 struct bgp_encap_type_transmit_tunnel_endpoint *bet);
f4c89855 80
d62a17ae 81extern int tlv_to_bgp_encap_type_ipsec_in_tunnel_mode(
82 struct bgp_attr_encap_subtlv *stlv, /* subtlv chain */
83 struct bgp_encap_type_ipsec_in_tunnel_mode *bet); /* caller-allocated */
f4c89855 84
d62a17ae 85extern int tlv_to_bgp_encap_type_ip_in_ip_tunnel_with_ipsec_transport_mode(
86 struct bgp_attr_encap_subtlv *stlv,
87 struct bgp_encap_type_ip_in_ip_tunnel_with_ipsec_transport_mode *bet);
f4c89855 88
d62a17ae 89extern int tlv_to_bgp_encap_type_mpls_in_ip_tunnel_with_ipsec_transport_mode(
90 struct bgp_attr_encap_subtlv *stlv,
91 struct bgp_encap_type_mpls_in_ip_tunnel_with_ipsec_transport_mode *bet);
f4c89855 92
d62a17ae 93extern int tlv_to_bgp_encap_type_vxlan(struct bgp_attr_encap_subtlv *stlv,
94 struct bgp_encap_type_vxlan *bet);
f4c89855 95
d62a17ae 96extern int tlv_to_bgp_encap_type_nvgre(struct bgp_attr_encap_subtlv *stlv,
97 struct bgp_encap_type_nvgre *bet);
f4c89855 98
d62a17ae 99extern int tlv_to_bgp_encap_type_mpls(struct bgp_attr_encap_subtlv *stlv,
100 struct bgp_encap_type_mpls *bet);
f4c89855 101
d62a17ae 102extern int tlv_to_bgp_encap_type_mpls(struct bgp_attr_encap_subtlv *stlv,
103 struct bgp_encap_type_mpls *bet);
f4c89855
LB
104
105extern int
d62a17ae 106tlv_to_bgp_encap_type_mpls_in_gre(struct bgp_attr_encap_subtlv *stlv,
107 struct bgp_encap_type_mpls_in_gre *bet);
f4c89855
LB
108
109extern int
d62a17ae 110tlv_to_bgp_encap_type_vxlan_gpe(struct bgp_attr_encap_subtlv *stlv,
111 struct bgp_encap_type_vxlan_gpe *bet);
f4c89855
LB
112
113extern int
d62a17ae 114tlv_to_bgp_encap_type_mpls_in_udp(struct bgp_attr_encap_subtlv *stlv,
115 struct bgp_encap_type_mpls_in_udp *bet);
f4c89855 116
d62a17ae 117extern int tlv_to_bgp_encap_type_pbb(
118 struct bgp_attr_encap_subtlv *stlv, /* subtlv chain */
119 struct bgp_encap_type_pbb *bet); /* caller-allocated */
f4c89855
LB
120
121#endif /* _QUAGGA_BGP_ENCAP_TLV_H */