]> git.proxmox.com Git - mirror_frr.git/blob - bgpd/bgp_encap_tlv.h
Merge remote-tracking branch 'origin/master' into pim_crash_a_boo
[mirror_frr.git] / bgpd / bgp_encap_tlv.h
1 /*
2 * Copyright 2015, LabN Consulting, L.L.C.
3 *
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.
8 *
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.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program; see the file COPYING; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18
19 #ifndef _QUAGGA_BGP_ENCAP_TLV_H
20 #define _QUAGGA_BGP_ENCAP_TLV_H
21
22
23 /***********************************************************************
24 * TUNNEL TYPE-SPECIFIC TLV ENCODE
25 ***********************************************************************/
26
27 extern void
28 bgp_encap_type_l2tpv3overip_to_tlv(
29 struct bgp_encap_type_l2tpv3_over_ip *bet,
30 struct attr *attr);
31
32 extern void
33 bgp_encap_type_gre_to_tlv(
34 struct bgp_encap_type_gre *bet,
35 struct attr *attr);
36
37 extern void
38 bgp_encap_type_ip_in_ip_to_tlv(
39 struct bgp_encap_type_ip_in_ip *bet,
40 struct attr *attr);
41
42 extern void
43 bgp_encap_type_transmit_tunnel_endpoint(
44 struct bgp_encap_type_transmit_tunnel_endpoint *bet,
45 struct attr *attr);
46
47 extern void
48 bgp_encap_type_ipsec_in_tunnel_mode_to_tlv(
49 struct bgp_encap_type_ipsec_in_tunnel_mode *bet,
50 struct attr *attr);
51
52 extern void
53 bgp_encap_type_ip_in_ip_tunnel_with_ipsec_transport_mode_to_tlv(
54 struct bgp_encap_type_ip_in_ip_tunnel_with_ipsec_transport_mode *bet,
55 struct attr *attr);
56
57 extern void
58 bgp_encap_type_mpls_in_ip_tunnel_with_ipsec_transport_mode_to_tlv(
59 struct bgp_encap_type_mpls_in_ip_tunnel_with_ipsec_transport_mode *bet,
60 struct attr *attr);
61
62 extern void
63 bgp_encap_type_pbb_to_tlv(
64 struct bgp_encap_type_pbb *bet,
65 struct attr *attr);
66
67 extern void
68 bgp_encap_type_vxlan_to_tlv(
69 struct bgp_encap_type_vxlan *bet,
70 struct attr *attr);
71
72 extern void
73 bgp_encap_type_nvgre_to_tlv(
74 struct bgp_encap_type_nvgre *bet,
75 struct attr *attr);
76
77 extern void
78 bgp_encap_type_mpls_to_tlv(
79 struct bgp_encap_type_mpls *bet,
80 struct attr *attr);
81
82 extern void
83 bgp_encap_type_mpls_in_gre_to_tlv(
84 struct bgp_encap_type_mpls_in_gre *bet,
85 struct attr *attr);
86
87 extern void
88 bgp_encap_type_vxlan_gpe_to_tlv(
89 struct bgp_encap_type_vxlan_gpe *bet,
90 struct attr *attr);
91
92 extern void
93 bgp_encap_type_mpls_in_udp_to_tlv(
94 struct bgp_encap_type_mpls_in_udp *bet,
95 struct attr *attr);
96
97 /***********************************************************************
98 * TUNNEL TYPE-SPECIFIC TLV DECODE
99 ***********************************************************************/
100
101 extern int
102 tlv_to_bgp_encap_type_l2tpv3overip(
103 struct bgp_attr_encap_subtlv *stlv, /* subtlv chain */
104 struct bgp_encap_type_l2tpv3_over_ip *bet); /* caller-allocated */
105
106 extern int
107 tlv_to_bgp_encap_type_gre(
108 struct bgp_attr_encap_subtlv *stlv, /* subtlv chain */
109 struct bgp_encap_type_gre *bet); /* caller-allocated */
110
111 extern int
112 tlv_to_bgp_encap_type_ip_in_ip(
113 struct bgp_attr_encap_subtlv *stlv, /* subtlv chain */
114 struct bgp_encap_type_ip_in_ip *bet); /* caller-allocated */
115
116 extern int
117 tlv_to_bgp_encap_type_transmit_tunnel_endpoint(
118 struct bgp_attr_encap_subtlv *stlv,
119 struct bgp_encap_type_transmit_tunnel_endpoint *bet);
120
121 extern int
122 tlv_to_bgp_encap_type_ipsec_in_tunnel_mode(
123 struct bgp_attr_encap_subtlv *stlv, /* subtlv chain */
124 struct bgp_encap_type_ipsec_in_tunnel_mode *bet); /* caller-allocated */
125
126 extern int
127 tlv_to_bgp_encap_type_ip_in_ip_tunnel_with_ipsec_transport_mode(
128 struct bgp_attr_encap_subtlv *stlv,
129 struct bgp_encap_type_ip_in_ip_tunnel_with_ipsec_transport_mode *bet);
130
131 extern int
132 tlv_to_bgp_encap_type_mpls_in_ip_tunnel_with_ipsec_transport_mode(
133 struct bgp_attr_encap_subtlv *stlv,
134 struct bgp_encap_type_mpls_in_ip_tunnel_with_ipsec_transport_mode *bet);
135
136 extern int
137 tlv_to_bgp_encap_type_vxlan(
138 struct bgp_attr_encap_subtlv *stlv,
139 struct bgp_encap_type_vxlan *bet);
140
141 extern int
142 tlv_to_bgp_encap_type_nvgre(
143 struct bgp_attr_encap_subtlv *stlv,
144 struct bgp_encap_type_nvgre *bet);
145
146 extern int
147 tlv_to_bgp_encap_type_mpls(
148 struct bgp_attr_encap_subtlv *stlv,
149 struct bgp_encap_type_mpls *bet);
150
151 extern int
152 tlv_to_bgp_encap_type_mpls(
153 struct bgp_attr_encap_subtlv *stlv,
154 struct bgp_encap_type_mpls *bet);
155
156 extern int
157 tlv_to_bgp_encap_type_mpls_in_gre(
158 struct bgp_attr_encap_subtlv *stlv,
159 struct bgp_encap_type_mpls_in_gre *bet);
160
161 extern int
162 tlv_to_bgp_encap_type_vxlan_gpe(
163 struct bgp_attr_encap_subtlv *stlv,
164 struct bgp_encap_type_vxlan_gpe *bet);
165
166 extern int
167 tlv_to_bgp_encap_type_mpls_in_udp(
168 struct bgp_attr_encap_subtlv *stlv,
169 struct bgp_encap_type_mpls_in_udp *bet);
170
171 extern int
172 tlv_to_bgp_encap_type_pbb(
173 struct bgp_attr_encap_subtlv *stlv, /* subtlv chain */
174 struct bgp_encap_type_pbb *bet); /* caller-allocated */
175
176 #endif /* _QUAGGA_BGP_ENCAP_TLV_H */