]>
Commit | Line | Data |
---|---|---|
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 | ||
28 | extern void | |
29 | bgp_encap_type_l2tpv3overip_to_tlv( | |
30 | struct bgp_encap_type_l2tpv3_over_ip *bet, | |
31 | struct attr *attr); | |
32 | ||
33 | extern void | |
34 | bgp_encap_type_gre_to_tlv( | |
35 | struct bgp_encap_type_gre *bet, | |
36 | struct attr *attr); | |
37 | ||
38 | extern void | |
39 | bgp_encap_type_ip_in_ip_to_tlv( | |
40 | struct bgp_encap_type_ip_in_ip *bet, | |
41 | struct attr *attr); | |
42 | ||
43 | extern void | |
44 | bgp_encap_type_transmit_tunnel_endpoint( | |
45 | struct bgp_encap_type_transmit_tunnel_endpoint *bet, | |
46 | struct attr *attr); | |
47 | ||
48 | extern void | |
49 | bgp_encap_type_ipsec_in_tunnel_mode_to_tlv( | |
50 | struct bgp_encap_type_ipsec_in_tunnel_mode *bet, | |
51 | struct attr *attr); | |
52 | ||
53 | extern void | |
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, | |
56 | struct attr *attr); | |
57 | ||
58 | extern void | |
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, | |
61 | struct attr *attr); | |
62 | ||
63 | extern void | |
64 | bgp_encap_type_pbb_to_tlv( | |
65 | struct bgp_encap_type_pbb *bet, | |
66 | struct attr *attr); | |
67 | ||
68 | extern void | |
69 | bgp_encap_type_vxlan_to_tlv( | |
70 | struct bgp_encap_type_vxlan *bet, | |
71 | struct attr *attr); | |
72 | ||
73 | extern void | |
74 | bgp_encap_type_nvgre_to_tlv( | |
75 | struct bgp_encap_type_nvgre *bet, | |
76 | struct attr *attr); | |
77 | ||
78 | extern void | |
79 | bgp_encap_type_mpls_to_tlv( | |
80 | struct bgp_encap_type_mpls *bet, | |
81 | struct attr *attr); | |
82 | ||
83 | extern void | |
84 | bgp_encap_type_mpls_in_gre_to_tlv( | |
85 | struct bgp_encap_type_mpls_in_gre *bet, | |
86 | struct attr *attr); | |
87 | ||
88 | extern void | |
89 | bgp_encap_type_vxlan_gpe_to_tlv( | |
90 | struct bgp_encap_type_vxlan_gpe *bet, | |
91 | struct attr *attr); | |
92 | ||
93 | extern void | |
94 | bgp_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 | ||
102 | extern int | |
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 */ | |
106 | ||
107 | extern int | |
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 */ | |
111 | ||
112 | extern int | |
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 */ | |
116 | ||
117 | extern int | |
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); | |
121 | ||
122 | extern int | |
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 */ | |
126 | ||
127 | extern int | |
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); | |
131 | ||
132 | extern int | |
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); | |
136 | ||
137 | extern int | |
138 | tlv_to_bgp_encap_type_vxlan( | |
139 | struct bgp_attr_encap_subtlv *stlv, | |
140 | struct bgp_encap_type_vxlan *bet); | |
141 | ||
142 | extern int | |
143 | tlv_to_bgp_encap_type_nvgre( | |
144 | struct bgp_attr_encap_subtlv *stlv, | |
145 | struct bgp_encap_type_nvgre *bet); | |
146 | ||
147 | extern int | |
148 | tlv_to_bgp_encap_type_mpls( | |
149 | struct bgp_attr_encap_subtlv *stlv, | |
150 | struct bgp_encap_type_mpls *bet); | |
151 | ||
152 | extern int | |
153 | tlv_to_bgp_encap_type_mpls( | |
154 | struct bgp_attr_encap_subtlv *stlv, | |
155 | struct bgp_encap_type_mpls *bet); | |
156 | ||
157 | extern int | |
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); | |
161 | ||
162 | extern int | |
163 | tlv_to_bgp_encap_type_vxlan_gpe( | |
164 | struct bgp_attr_encap_subtlv *stlv, | |
165 | struct bgp_encap_type_vxlan_gpe *bet); | |
166 | ||
167 | extern int | |
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); | |
171 | ||
172 | extern int | |
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 */ | |
176 | ||
177 | #endif /* _QUAGGA_BGP_ENCAP_TLV_H */ |