]> git.proxmox.com Git - mirror_frr.git/blob - bgpd/bgp_encap_tlv.h
bgpd: Allow shortened 'no set large-community' and 'no set large-comm-list'
[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 * TUNNEL TYPE-SPECIFIC TLV ENCODE
24 ***********************************************************************/
25
26 extern void
27 bgp_encap_type_l2tpv3overip_to_tlv(struct bgp_encap_type_l2tpv3_over_ip *bet,
28 struct attr *attr);
29
30 extern void bgp_encap_type_gre_to_tlv(struct bgp_encap_type_gre *bet,
31 struct attr *attr);
32
33 extern void bgp_encap_type_ip_in_ip_to_tlv(struct bgp_encap_type_ip_in_ip *bet,
34 struct attr *attr);
35
36 extern void bgp_encap_type_transmit_tunnel_endpoint(
37 struct bgp_encap_type_transmit_tunnel_endpoint *bet, struct attr *attr);
38
39 extern void bgp_encap_type_ipsec_in_tunnel_mode_to_tlv(
40 struct bgp_encap_type_ipsec_in_tunnel_mode *bet, struct attr *attr);
41
42 extern void bgp_encap_type_ip_in_ip_tunnel_with_ipsec_transport_mode_to_tlv(
43 struct bgp_encap_type_ip_in_ip_tunnel_with_ipsec_transport_mode *bet,
44 struct attr *attr);
45
46 extern void bgp_encap_type_mpls_in_ip_tunnel_with_ipsec_transport_mode_to_tlv(
47 struct bgp_encap_type_mpls_in_ip_tunnel_with_ipsec_transport_mode *bet,
48 struct attr *attr);
49
50 extern void bgp_encap_type_pbb_to_tlv(struct bgp_encap_type_pbb *bet,
51 struct attr *attr);
52
53 extern void bgp_encap_type_vxlan_to_tlv(struct bgp_encap_type_vxlan *bet,
54 struct attr *attr);
55
56 extern void bgp_encap_type_nvgre_to_tlv(struct bgp_encap_type_nvgre *bet,
57 struct attr *attr);
58
59 extern void bgp_encap_type_mpls_to_tlv(struct bgp_encap_type_mpls *bet,
60 struct attr *attr);
61
62 extern void
63 bgp_encap_type_mpls_in_gre_to_tlv(struct bgp_encap_type_mpls_in_gre *bet,
64 struct attr *attr);
65
66 extern void
67 bgp_encap_type_vxlan_gpe_to_tlv(struct bgp_encap_type_vxlan_gpe *bet,
68 struct attr *attr);
69
70 extern void
71 bgp_encap_type_mpls_in_udp_to_tlv(struct bgp_encap_type_mpls_in_udp *bet,
72 struct attr *attr);
73
74 /***********************************************************************
75 * TUNNEL TYPE-SPECIFIC TLV DECODE
76 ***********************************************************************/
77
78 extern int tlv_to_bgp_encap_type_l2tpv3overip(
79 struct bgp_attr_encap_subtlv *stlv, /* subtlv chain */
80 struct bgp_encap_type_l2tpv3_over_ip *bet); /* caller-allocated */
81
82 extern int tlv_to_bgp_encap_type_gre(
83 struct bgp_attr_encap_subtlv *stlv, /* subtlv chain */
84 struct bgp_encap_type_gre *bet); /* caller-allocated */
85
86 extern int tlv_to_bgp_encap_type_ip_in_ip(
87 struct bgp_attr_encap_subtlv *stlv, /* subtlv chain */
88 struct bgp_encap_type_ip_in_ip *bet); /* caller-allocated */
89
90 extern int tlv_to_bgp_encap_type_transmit_tunnel_endpoint(
91 struct bgp_attr_encap_subtlv *stlv,
92 struct bgp_encap_type_transmit_tunnel_endpoint *bet);
93
94 extern int tlv_to_bgp_encap_type_ipsec_in_tunnel_mode(
95 struct bgp_attr_encap_subtlv *stlv, /* subtlv chain */
96 struct bgp_encap_type_ipsec_in_tunnel_mode *bet); /* caller-allocated */
97
98 extern int tlv_to_bgp_encap_type_ip_in_ip_tunnel_with_ipsec_transport_mode(
99 struct bgp_attr_encap_subtlv *stlv,
100 struct bgp_encap_type_ip_in_ip_tunnel_with_ipsec_transport_mode *bet);
101
102 extern int tlv_to_bgp_encap_type_mpls_in_ip_tunnel_with_ipsec_transport_mode(
103 struct bgp_attr_encap_subtlv *stlv,
104 struct bgp_encap_type_mpls_in_ip_tunnel_with_ipsec_transport_mode *bet);
105
106 extern int tlv_to_bgp_encap_type_vxlan(struct bgp_attr_encap_subtlv *stlv,
107 struct bgp_encap_type_vxlan *bet);
108
109 extern int tlv_to_bgp_encap_type_nvgre(struct bgp_attr_encap_subtlv *stlv,
110 struct bgp_encap_type_nvgre *bet);
111
112 extern int tlv_to_bgp_encap_type_mpls(struct bgp_attr_encap_subtlv *stlv,
113 struct bgp_encap_type_mpls *bet);
114
115 extern int tlv_to_bgp_encap_type_mpls(struct bgp_attr_encap_subtlv *stlv,
116 struct bgp_encap_type_mpls *bet);
117
118 extern int
119 tlv_to_bgp_encap_type_mpls_in_gre(struct bgp_attr_encap_subtlv *stlv,
120 struct bgp_encap_type_mpls_in_gre *bet);
121
122 extern int
123 tlv_to_bgp_encap_type_vxlan_gpe(struct bgp_attr_encap_subtlv *stlv,
124 struct bgp_encap_type_vxlan_gpe *bet);
125
126 extern int
127 tlv_to_bgp_encap_type_mpls_in_udp(struct bgp_attr_encap_subtlv *stlv,
128 struct bgp_encap_type_mpls_in_udp *bet);
129
130 extern int tlv_to_bgp_encap_type_pbb(
131 struct bgp_attr_encap_subtlv *stlv, /* subtlv chain */
132 struct bgp_encap_type_pbb *bet); /* caller-allocated */
133
134 #endif /* _QUAGGA_BGP_ENCAP_TLV_H */