2 * Copyright 2015, LabN Consulting, L.L.C.
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 #ifndef _QUAGGA_BGP_ENCAP_TLV_H
21 #define _QUAGGA_BGP_ENCAP_TLV_H
24 /***********************************************************************
25 * TUNNEL TYPE-SPECIFIC TLV ENCODE
26 ***********************************************************************/
29 bgp_encap_type_l2tpv3overip_to_tlv(
30 struct bgp_encap_type_l2tpv3_over_ip *bet,
34 bgp_encap_type_gre_to_tlv(
35 struct bgp_encap_type_gre *bet,
39 bgp_encap_type_ip_in_ip_to_tlv(
40 struct bgp_encap_type_ip_in_ip *bet,
44 bgp_encap_type_transmit_tunnel_endpoint(
45 struct bgp_encap_type_transmit_tunnel_endpoint *bet,
49 bgp_encap_type_ipsec_in_tunnel_mode_to_tlv(
50 struct bgp_encap_type_ipsec_in_tunnel_mode *bet,
54 bgp_encap_type_ip_in_ip_tunnel_with_ipsec_transport_mode_to_tlv(
55 struct bgp_encap_type_ip_in_ip_tunnel_with_ipsec_transport_mode *bet,
59 bgp_encap_type_mpls_in_ip_tunnel_with_ipsec_transport_mode_to_tlv(
60 struct bgp_encap_type_mpls_in_ip_tunnel_with_ipsec_transport_mode *bet,
64 bgp_encap_type_pbb_to_tlv(
65 struct bgp_encap_type_pbb *bet,
69 bgp_encap_type_vxlan_to_tlv(
70 struct bgp_encap_type_vxlan *bet,
74 bgp_encap_type_nvgre_to_tlv(
75 struct bgp_encap_type_nvgre *bet,
79 bgp_encap_type_mpls_to_tlv(
80 struct bgp_encap_type_mpls *bet,
84 bgp_encap_type_mpls_in_gre_to_tlv(
85 struct bgp_encap_type_mpls_in_gre *bet,
89 bgp_encap_type_vxlan_gpe_to_tlv(
90 struct bgp_encap_type_vxlan_gpe *bet,
94 bgp_encap_type_mpls_in_udp_to_tlv(
95 struct bgp_encap_type_mpls_in_udp *bet,
98 /***********************************************************************
99 * TUNNEL TYPE-SPECIFIC TLV DECODE
100 ***********************************************************************/
103 tlv_to_bgp_encap_type_l2tpv3overip(
104 struct bgp_attr_encap_subtlv *stlv, /* subtlv chain */
105 struct bgp_encap_type_l2tpv3_over_ip *bet); /* caller-allocated */
108 tlv_to_bgp_encap_type_gre(
109 struct bgp_attr_encap_subtlv *stlv, /* subtlv chain */
110 struct bgp_encap_type_gre *bet); /* caller-allocated */
113 tlv_to_bgp_encap_type_ip_in_ip(
114 struct bgp_attr_encap_subtlv *stlv, /* subtlv chain */
115 struct bgp_encap_type_ip_in_ip *bet); /* caller-allocated */
118 tlv_to_bgp_encap_type_transmit_tunnel_endpoint(
119 struct bgp_attr_encap_subtlv *stlv,
120 struct bgp_encap_type_transmit_tunnel_endpoint *bet);
123 tlv_to_bgp_encap_type_ipsec_in_tunnel_mode(
124 struct bgp_attr_encap_subtlv *stlv, /* subtlv chain */
125 struct bgp_encap_type_ipsec_in_tunnel_mode *bet); /* caller-allocated */
128 tlv_to_bgp_encap_type_ip_in_ip_tunnel_with_ipsec_transport_mode(
129 struct bgp_attr_encap_subtlv *stlv,
130 struct bgp_encap_type_ip_in_ip_tunnel_with_ipsec_transport_mode *bet);
133 tlv_to_bgp_encap_type_mpls_in_ip_tunnel_with_ipsec_transport_mode(
134 struct bgp_attr_encap_subtlv *stlv,
135 struct bgp_encap_type_mpls_in_ip_tunnel_with_ipsec_transport_mode *bet);
138 tlv_to_bgp_encap_type_vxlan(
139 struct bgp_attr_encap_subtlv *stlv,
140 struct bgp_encap_type_vxlan *bet);
143 tlv_to_bgp_encap_type_nvgre(
144 struct bgp_attr_encap_subtlv *stlv,
145 struct bgp_encap_type_nvgre *bet);
148 tlv_to_bgp_encap_type_mpls(
149 struct bgp_attr_encap_subtlv *stlv,
150 struct bgp_encap_type_mpls *bet);
153 tlv_to_bgp_encap_type_mpls(
154 struct bgp_attr_encap_subtlv *stlv,
155 struct bgp_encap_type_mpls *bet);
158 tlv_to_bgp_encap_type_mpls_in_gre(
159 struct bgp_attr_encap_subtlv *stlv,
160 struct bgp_encap_type_mpls_in_gre *bet);
163 tlv_to_bgp_encap_type_vxlan_gpe(
164 struct bgp_attr_encap_subtlv *stlv,
165 struct bgp_encap_type_vxlan_gpe *bet);
168 tlv_to_bgp_encap_type_mpls_in_udp(
169 struct bgp_attr_encap_subtlv *stlv,
170 struct bgp_encap_type_mpls_in_udp *bet);
173 tlv_to_bgp_encap_type_pbb(
174 struct bgp_attr_encap_subtlv *stlv, /* subtlv chain */
175 struct bgp_encap_type_pbb *bet); /* caller-allocated */
177 #endif /* _QUAGGA_BGP_ENCAP_TLV_H */