]> git.proxmox.com Git - mirror_frr.git/blame - bgpd/bgp_encap_tlv.h
Merge pull request #582 from qlyoung/ospf6-df-areaid
[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 *
896014f4
DL
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
f4c89855
LB
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
27extern void
28bgp_encap_type_l2tpv3overip_to_tlv(
29 struct bgp_encap_type_l2tpv3_over_ip *bet,
30 struct attr *attr);
31
32extern void
33bgp_encap_type_gre_to_tlv(
34 struct bgp_encap_type_gre *bet,
35 struct attr *attr);
36
37extern void
38bgp_encap_type_ip_in_ip_to_tlv(
39 struct bgp_encap_type_ip_in_ip *bet,
40 struct attr *attr);
41
42extern void
43bgp_encap_type_transmit_tunnel_endpoint(
44 struct bgp_encap_type_transmit_tunnel_endpoint *bet,
45 struct attr *attr);
46
47extern void
48bgp_encap_type_ipsec_in_tunnel_mode_to_tlv(
49 struct bgp_encap_type_ipsec_in_tunnel_mode *bet,
50 struct attr *attr);
51
52extern void
53bgp_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
57extern void
58bgp_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
62extern void
63bgp_encap_type_pbb_to_tlv(
64 struct bgp_encap_type_pbb *bet,
65 struct attr *attr);
66
67extern void
68bgp_encap_type_vxlan_to_tlv(
69 struct bgp_encap_type_vxlan *bet,
70 struct attr *attr);
71
72extern void
73bgp_encap_type_nvgre_to_tlv(
74 struct bgp_encap_type_nvgre *bet,
75 struct attr *attr);
76
77extern void
78bgp_encap_type_mpls_to_tlv(
79 struct bgp_encap_type_mpls *bet,
80 struct attr *attr);
81
82extern void
83bgp_encap_type_mpls_in_gre_to_tlv(
84 struct bgp_encap_type_mpls_in_gre *bet,
85 struct attr *attr);
86
87extern void
88bgp_encap_type_vxlan_gpe_to_tlv(
89 struct bgp_encap_type_vxlan_gpe *bet,
90 struct attr *attr);
91
92extern void
93bgp_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
101extern int
102tlv_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
106extern int
107tlv_to_bgp_encap_type_gre(
108 struct bgp_attr_encap_subtlv *stlv, /* subtlv chain */
109 struct bgp_encap_type_gre *bet); /* caller-allocated */
110
111extern int
112tlv_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
116extern int
117tlv_to_bgp_encap_type_transmit_tunnel_endpoint(
118 struct bgp_attr_encap_subtlv *stlv,
119 struct bgp_encap_type_transmit_tunnel_endpoint *bet);
120
121extern int
122tlv_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
126extern int
127tlv_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
131extern int
132tlv_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
136extern int
137tlv_to_bgp_encap_type_vxlan(
138 struct bgp_attr_encap_subtlv *stlv,
139 struct bgp_encap_type_vxlan *bet);
140
141extern int
142tlv_to_bgp_encap_type_nvgre(
143 struct bgp_attr_encap_subtlv *stlv,
144 struct bgp_encap_type_nvgre *bet);
145
146extern int
147tlv_to_bgp_encap_type_mpls(
148 struct bgp_attr_encap_subtlv *stlv,
149 struct bgp_encap_type_mpls *bet);
150
151extern int
152tlv_to_bgp_encap_type_mpls(
153 struct bgp_attr_encap_subtlv *stlv,
154 struct bgp_encap_type_mpls *bet);
155
156extern int
157tlv_to_bgp_encap_type_mpls_in_gre(
158 struct bgp_attr_encap_subtlv *stlv,
159 struct bgp_encap_type_mpls_in_gre *bet);
160
161extern int
162tlv_to_bgp_encap_type_vxlan_gpe(
163 struct bgp_attr_encap_subtlv *stlv,
164 struct bgp_encap_type_vxlan_gpe *bet);
165
166extern int
167tlv_to_bgp_encap_type_mpls_in_udp(
168 struct bgp_attr_encap_subtlv *stlv,
169 struct bgp_encap_type_mpls_in_udp *bet);
170
171extern int
172tlv_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 */