]>
Commit | Line | Data |
---|---|---|
1 | // SPDX-License-Identifier: GPL-2.0-or-later | |
2 | /* | |
3 | * Copyright 2015, LabN Consulting, L.L.C. | |
4 | */ | |
5 | ||
6 | #ifndef _QUAGGA_BGP_ENCAP_TLV_H | |
7 | #define _QUAGGA_BGP_ENCAP_TLV_H | |
8 | ||
9 | /*********************************************************************** | |
10 | * TUNNEL TYPE-SPECIFIC TLV ENCODE | |
11 | ***********************************************************************/ | |
12 | ||
13 | extern void | |
14 | bgp_encap_type_l2tpv3overip_to_tlv(struct bgp_encap_type_l2tpv3_over_ip *bet, | |
15 | struct attr *attr); | |
16 | ||
17 | extern void bgp_encap_type_gre_to_tlv(struct bgp_encap_type_gre *bet, | |
18 | struct attr *attr); | |
19 | ||
20 | extern void bgp_encap_type_ip_in_ip_to_tlv(struct bgp_encap_type_ip_in_ip *bet, | |
21 | struct attr *attr); | |
22 | ||
23 | extern void bgp_encap_type_transmit_tunnel_endpoint( | |
24 | struct bgp_encap_type_transmit_tunnel_endpoint *bet, struct attr *attr); | |
25 | ||
26 | extern void bgp_encap_type_ipsec_in_tunnel_mode_to_tlv( | |
27 | struct bgp_encap_type_ipsec_in_tunnel_mode *bet, struct attr *attr); | |
28 | ||
29 | extern void bgp_encap_type_ip_in_ip_tunnel_with_ipsec_transport_mode_to_tlv( | |
30 | struct bgp_encap_type_ip_in_ip_tunnel_with_ipsec_transport_mode *bet, | |
31 | struct attr *attr); | |
32 | ||
33 | extern void bgp_encap_type_mpls_in_ip_tunnel_with_ipsec_transport_mode_to_tlv( | |
34 | struct bgp_encap_type_mpls_in_ip_tunnel_with_ipsec_transport_mode *bet, | |
35 | struct attr *attr); | |
36 | ||
37 | extern void bgp_encap_type_pbb_to_tlv(struct bgp_encap_type_pbb *bet, | |
38 | struct attr *attr); | |
39 | ||
40 | extern void bgp_encap_type_vxlan_to_tlv(struct bgp_encap_type_vxlan *bet, | |
41 | struct attr *attr); | |
42 | ||
43 | extern void bgp_encap_type_nvgre_to_tlv(struct bgp_encap_type_nvgre *bet, | |
44 | struct attr *attr); | |
45 | ||
46 | extern void bgp_encap_type_mpls_to_tlv(struct bgp_encap_type_mpls *bet, | |
47 | struct attr *attr); | |
48 | ||
49 | extern void | |
50 | bgp_encap_type_mpls_in_gre_to_tlv(struct bgp_encap_type_mpls_in_gre *bet, | |
51 | struct attr *attr); | |
52 | ||
53 | extern void | |
54 | bgp_encap_type_vxlan_gpe_to_tlv(struct bgp_encap_type_vxlan_gpe *bet, | |
55 | struct attr *attr); | |
56 | ||
57 | extern void | |
58 | bgp_encap_type_mpls_in_udp_to_tlv(struct bgp_encap_type_mpls_in_udp *bet, | |
59 | struct attr *attr); | |
60 | ||
61 | /*********************************************************************** | |
62 | * TUNNEL TYPE-SPECIFIC TLV DECODE | |
63 | ***********************************************************************/ | |
64 | ||
65 | extern int tlv_to_bgp_encap_type_l2tpv3overip( | |
66 | struct bgp_attr_encap_subtlv *stlv, /* subtlv chain */ | |
67 | struct bgp_encap_type_l2tpv3_over_ip *bet); /* caller-allocated */ | |
68 | ||
69 | extern int tlv_to_bgp_encap_type_gre( | |
70 | struct bgp_attr_encap_subtlv *stlv, /* subtlv chain */ | |
71 | struct bgp_encap_type_gre *bet); /* caller-allocated */ | |
72 | ||
73 | extern int tlv_to_bgp_encap_type_ip_in_ip( | |
74 | struct bgp_attr_encap_subtlv *stlv, /* subtlv chain */ | |
75 | struct bgp_encap_type_ip_in_ip *bet); /* caller-allocated */ | |
76 | ||
77 | extern int tlv_to_bgp_encap_type_transmit_tunnel_endpoint( | |
78 | struct bgp_attr_encap_subtlv *stlv, | |
79 | struct bgp_encap_type_transmit_tunnel_endpoint *bet); | |
80 | ||
81 | extern int tlv_to_bgp_encap_type_ipsec_in_tunnel_mode( | |
82 | struct bgp_attr_encap_subtlv *stlv, /* subtlv chain */ | |
83 | struct bgp_encap_type_ipsec_in_tunnel_mode *bet); /* caller-allocated */ | |
84 | ||
85 | extern int tlv_to_bgp_encap_type_ip_in_ip_tunnel_with_ipsec_transport_mode( | |
86 | struct bgp_attr_encap_subtlv *stlv, | |
87 | struct bgp_encap_type_ip_in_ip_tunnel_with_ipsec_transport_mode *bet); | |
88 | ||
89 | extern int tlv_to_bgp_encap_type_mpls_in_ip_tunnel_with_ipsec_transport_mode( | |
90 | struct bgp_attr_encap_subtlv *stlv, | |
91 | struct bgp_encap_type_mpls_in_ip_tunnel_with_ipsec_transport_mode *bet); | |
92 | ||
93 | extern int tlv_to_bgp_encap_type_vxlan(struct bgp_attr_encap_subtlv *stlv, | |
94 | struct bgp_encap_type_vxlan *bet); | |
95 | ||
96 | extern int tlv_to_bgp_encap_type_nvgre(struct bgp_attr_encap_subtlv *stlv, | |
97 | struct bgp_encap_type_nvgre *bet); | |
98 | ||
99 | extern int tlv_to_bgp_encap_type_mpls(struct bgp_attr_encap_subtlv *stlv, | |
100 | struct bgp_encap_type_mpls *bet); | |
101 | ||
102 | extern int tlv_to_bgp_encap_type_mpls(struct bgp_attr_encap_subtlv *stlv, | |
103 | struct bgp_encap_type_mpls *bet); | |
104 | ||
105 | extern int | |
106 | tlv_to_bgp_encap_type_mpls_in_gre(struct bgp_attr_encap_subtlv *stlv, | |
107 | struct bgp_encap_type_mpls_in_gre *bet); | |
108 | ||
109 | extern int | |
110 | tlv_to_bgp_encap_type_vxlan_gpe(struct bgp_attr_encap_subtlv *stlv, | |
111 | struct bgp_encap_type_vxlan_gpe *bet); | |
112 | ||
113 | extern int | |
114 | tlv_to_bgp_encap_type_mpls_in_udp(struct bgp_attr_encap_subtlv *stlv, | |
115 | struct bgp_encap_type_mpls_in_udp *bet); | |
116 | ||
117 | extern int tlv_to_bgp_encap_type_pbb( | |
118 | struct bgp_attr_encap_subtlv *stlv, /* subtlv chain */ | |
119 | struct bgp_encap_type_pbb *bet); /* caller-allocated */ | |
120 | ||
121 | #endif /* _QUAGGA_BGP_ENCAP_TLV_H */ |