]> git.proxmox.com Git - mirror_frr.git/blame - bgpd/bgp_encap_tlv.h
bgpd: support for router mac extended community
[mirror_frr.git] / bgpd / bgp_encap_tlv.h
CommitLineData
f4c89855
LB
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
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.
17 *
18 */
19
20#ifndef _QUAGGA_BGP_ENCAP_TLV_H
21#define _QUAGGA_BGP_ENCAP_TLV_H
22
23
24/***********************************************************************
25 * TUNNEL TYPE-SPECIFIC TLV ENCODE
26 ***********************************************************************/
27
28extern void
29bgp_encap_type_l2tpv3overip_to_tlv(
30 struct bgp_encap_type_l2tpv3_over_ip *bet,
31 struct attr *attr);
32
33extern void
34bgp_encap_type_gre_to_tlv(
35 struct bgp_encap_type_gre *bet,
36 struct attr *attr);
37
38extern void
39bgp_encap_type_ip_in_ip_to_tlv(
40 struct bgp_encap_type_ip_in_ip *bet,
41 struct attr *attr);
42
43extern void
44bgp_encap_type_transmit_tunnel_endpoint(
45 struct bgp_encap_type_transmit_tunnel_endpoint *bet,
46 struct attr *attr);
47
48extern void
49bgp_encap_type_ipsec_in_tunnel_mode_to_tlv(
50 struct bgp_encap_type_ipsec_in_tunnel_mode *bet,
51 struct attr *attr);
52
53extern void
54bgp_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,
56 struct attr *attr);
57
58extern void
59bgp_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,
61 struct attr *attr);
62
63extern void
64bgp_encap_type_pbb_to_tlv(
65 struct bgp_encap_type_pbb *bet,
66 struct attr *attr);
67
68extern void
69bgp_encap_type_vxlan_to_tlv(
70 struct bgp_encap_type_vxlan *bet,
71 struct attr *attr);
72
73extern void
74bgp_encap_type_nvgre_to_tlv(
75 struct bgp_encap_type_nvgre *bet,
76 struct attr *attr);
77
78extern void
79bgp_encap_type_mpls_to_tlv(
80 struct bgp_encap_type_mpls *bet,
81 struct attr *attr);
82
83extern void
84bgp_encap_type_mpls_in_gre_to_tlv(
85 struct bgp_encap_type_mpls_in_gre *bet,
86 struct attr *attr);
87
88extern void
89bgp_encap_type_vxlan_gpe_to_tlv(
90 struct bgp_encap_type_vxlan_gpe *bet,
91 struct attr *attr);
92
93extern void
94bgp_encap_type_mpls_in_udp_to_tlv(
95 struct bgp_encap_type_mpls_in_udp *bet,
96 struct attr *attr);
97
98/***********************************************************************
99 * TUNNEL TYPE-SPECIFIC TLV DECODE
100 ***********************************************************************/
101
102extern int
103tlv_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 */
106
107extern int
108tlv_to_bgp_encap_type_gre(
109 struct bgp_attr_encap_subtlv *stlv, /* subtlv chain */
110 struct bgp_encap_type_gre *bet); /* caller-allocated */
111
112extern int
113tlv_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 */
116
117extern int
118tlv_to_bgp_encap_type_transmit_tunnel_endpoint(
119 struct bgp_attr_encap_subtlv *stlv,
120 struct bgp_encap_type_transmit_tunnel_endpoint *bet);
121
122extern int
123tlv_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 */
126
127extern int
128tlv_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);
131
132extern int
133tlv_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);
136
137extern int
138tlv_to_bgp_encap_type_vxlan(
139 struct bgp_attr_encap_subtlv *stlv,
140 struct bgp_encap_type_vxlan *bet);
141
142extern int
143tlv_to_bgp_encap_type_nvgre(
144 struct bgp_attr_encap_subtlv *stlv,
145 struct bgp_encap_type_nvgre *bet);
146
147extern int
148tlv_to_bgp_encap_type_mpls(
149 struct bgp_attr_encap_subtlv *stlv,
150 struct bgp_encap_type_mpls *bet);
151
152extern int
153tlv_to_bgp_encap_type_mpls(
154 struct bgp_attr_encap_subtlv *stlv,
155 struct bgp_encap_type_mpls *bet);
156
157extern int
158tlv_to_bgp_encap_type_mpls_in_gre(
159 struct bgp_attr_encap_subtlv *stlv,
160 struct bgp_encap_type_mpls_in_gre *bet);
161
162extern int
163tlv_to_bgp_encap_type_vxlan_gpe(
164 struct bgp_attr_encap_subtlv *stlv,
165 struct bgp_encap_type_vxlan_gpe *bet);
166
167extern int
168tlv_to_bgp_encap_type_mpls_in_udp(
169 struct bgp_attr_encap_subtlv *stlv,
170 struct bgp_encap_type_mpls_in_udp *bet);
171
172extern int
173tlv_to_bgp_encap_type_pbb(
174 struct bgp_attr_encap_subtlv *stlv, /* subtlv chain */
175 struct bgp_encap_type_pbb *bet); /* caller-allocated */
176
177#endif /* _QUAGGA_BGP_ENCAP_TLV_H */