OpenNSL API Guide and Reference Manual
Welcome
OpenNSL Documentation
API Reference
Files
File List
Globals
include
opennsl
tunnelX.h
Go to the documentation of this file.
1
4
/*****************************************************************************
5
*
6
* This software is governed by the Broadcom Advanced Switch APIs license.
7
* This license is set out in the
8
* https://github.com/Broadcom-Switch/OpenNSL/Legal/LICENSE-Adv file.
9
*
10
* Copyright 2015-2016 Broadcom Corporation. All rights reserved.
11
*
12
***************************************************************************/
16
#ifndef __OPENNSL_TUNNELX_H__
17
#define __OPENNSL_TUNNELX_H__
18
19
#if defined(INCLUDE_L3)
20
21
#include <
opennsl/types.h
>
22
#include <
opennsl/l3.h
>
23
24
#define OPENNSL_TUNNEL_TERM_TUNNEL_WITH_ID 0x00000040
25
#define OPENNSL_TUNNEL_INIT_USE_INNER_DF 0x00000080
29
#define OPENNSL_TUNNEL_REPLACE 0x00010000
31
#define OPENNSL_TUNNEL_WITH_ID 0x00080000
34
typedef enum opennsl_tunnel_type_e {
35
opennslTunnelTypeVxlan
= 30,
36
}
opennsl_tunnel_type_t
;
37
/* __doxy_func_body_end__ */
38
40
typedef
struct
opennsl_tunnel_terminator_s
{
41
uint32
flags
;
42
uint32
multicast_flag
;
43
opennsl_vrf_t
vrf
;
44
opennsl_ip_t
sip
;
45
opennsl_ip_t
dip
;
46
opennsl_ip_t
sip_mask
;
47
opennsl_ip_t
dip_mask
;
48
opennsl_ip6_t
sip6
;
49
opennsl_ip6_t
dip6
;
50
opennsl_ip6_t
sip6_mask
;
51
opennsl_ip6_t
dip6_mask
;
52
uint32
udp_dst_port
;
53
uint32
udp_src_port
;
54
opennsl_tunnel_type_t
type
;
55
opennsl_pbmp_t
pbmp
;
56
opennsl_vlan_t
vlan
;
58
opennsl_gport_t
remote_port
;
59
opennsl_gport_t
tunnel_id
;
60
int
reserved1
;
61
opennsl_multicast_t
reserved2
;
62
opennsl_failover_t
reserved3
;
63
opennsl_failover_t
reserved4
;
64
opennsl_gport_t
reserved5
;
65
opennsl_if_t
tunnel_if
;
66
int
reserved6
;
67
int
qos_map_id
;
68
int
inlif_counting_profile
;
69
int
reserved7
;
70
}
opennsl_tunnel_terminator_t
;
71
/* __doxy_func_body_end__ */
72
74
typedef
enum
opennsl_tunnel_dscp_select_e
{
75
opennslTunnelDscpAssign
= 0,
77
opennslTunnelDscpPacket
= 1,
78
opennslTunnelDscpMap
= 2,
79
opennslTunnelDscpCount
= 3
80
}
opennsl_tunnel_dscp_select_t
;
81
/* __doxy_func_body_end__ */
82
84
typedef
struct
opennsl_tunnel_initiator_s
{
85
uint32
flags
;
86
opennsl_tunnel_type_t
type
;
87
int
ttl
;
88
opennsl_mac_t
dmac
;
89
opennsl_ip_t
dip
;
90
opennsl_ip_t
sip
;
91
opennsl_ip6_t
sip6
;
92
opennsl_ip6_t
dip6
;
93
uint32
flow_label
;
94
opennsl_tunnel_dscp_select_t
dscp_sel
;
95
int
dscp
;
96
int
dscp_map
;
97
opennsl_gport_t
tunnel_id
;
98
uint16
udp_dst_port
;
99
uint16
udp_src_port
;
100
opennsl_mac_t
smac
;
101
int
mtu
;
102
opennsl_vlan_t
vlan
;
103
uint16
tpid
;
104
uint8
pkt_pri
;
105
uint8
pkt_cfi
;
106
uint16
ip4_id
;
107
opennsl_if_t
l3_intf_id
;
108
uint16
span_id
;
109
uint32
aux_data
;
110
int
outlif_counting_profile
;
111
opennsl_reserved_enum_t
encap_access
;
112
}
opennsl_tunnel_initiator_t
;
113
/* __doxy_func_body_end__ */
114
115
typedef
int (*
opennsl_tunnel_initiator_traverse_cb
)(
116
int
unit,
117
opennsl_tunnel_initiator_t
*info,
118
void
*user_data);
119
120
typedef
int (*
opennsl_tunnel_terminator_traverse_cb
)(
121
int
unit,
122
opennsl_tunnel_terminator_t
*info,
123
void
*user_data);
124
125
/***************************************************************************/
139
extern
int
opennsl_tunnel_initiator_set
(
140
int
unit,
141
opennsl_l3_intf_t
*intf,
142
opennsl_tunnel_initiator_t
*
tunnel
)
LIB_DLL_EXPORTED
;
143
144
/***************************************************************************/
158
extern
int
opennsl_tunnel_initiator_create
(
159
int
unit,
160
opennsl_l3_intf_t
*intf,
161
opennsl_tunnel_initiator_t
*
tunnel
)
LIB_DLL_EXPORTED
;
162
163
/***************************************************************************/
174
extern
int
opennsl_tunnel_initiator_clear
(
175
int
unit,
176
opennsl_l3_intf_t
*intf)
LIB_DLL_EXPORTED
;
177
178
/***************************************************************************/
191
extern
int
opennsl_tunnel_initiator_get
(
192
int
unit,
193
opennsl_l3_intf_t
*intf,
194
opennsl_tunnel_initiator_t
*
tunnel
)
LIB_DLL_EXPORTED
;
195
196
/***************************************************************************/
209
extern
int
opennsl_tunnel_initiator_traverse
(
210
int
unit,
211
opennsl_tunnel_initiator_traverse_cb
cb,
212
void
*user_data)
LIB_DLL_EXPORTED
;
213
214
/***************************************************************************/
231
extern
int
opennsl_tunnel_terminator_add
(
232
int
unit,
233
opennsl_tunnel_terminator_t
*info)
LIB_DLL_EXPORTED
;
234
235
/***************************************************************************/
252
extern
int
opennsl_tunnel_terminator_create
(
253
int
unit,
254
opennsl_tunnel_terminator_t
*info)
LIB_DLL_EXPORTED
;
255
256
/***************************************************************************/
269
extern
int
opennsl_tunnel_terminator_delete
(
270
int
unit,
271
opennsl_tunnel_terminator_t
*info)
LIB_DLL_EXPORTED
;
272
273
/***************************************************************************/
286
extern
int
opennsl_tunnel_terminator_update
(
287
int
unit,
288
opennsl_tunnel_terminator_t
*info)
LIB_DLL_EXPORTED
;
289
290
/***************************************************************************/
303
extern
int
opennsl_tunnel_terminator_get
(
304
int
unit,
305
opennsl_tunnel_terminator_t
*info)
LIB_DLL_EXPORTED
;
306
307
/***************************************************************************/
320
extern
int
opennsl_tunnel_terminator_traverse
(
321
int
unit,
322
opennsl_tunnel_terminator_traverse_cb
cb,
323
void
*user_data)
LIB_DLL_EXPORTED
;
324
325
/***************************************************************************/
340
extern
void
opennsl_tunnel_initiator_t_init
(
341
opennsl_tunnel_initiator_t
*tunnel_init)
LIB_DLL_EXPORTED
;
342
343
/***************************************************************************/
358
extern
void
opennsl_tunnel_terminator_t_init
(
359
opennsl_tunnel_terminator_t
*tunnel_term)
LIB_DLL_EXPORTED
;
360
361
#endif
/* defined(INCLUDE_L3) */
362
363
#endif
/* __OPENNSL_TUNNELX_H__ */
364
© 2016-17 by Broadcom Limited. All rights reserved.