OpenNSL API Guide and Reference Manual
Welcome
OpenNSL Documentation
API Reference
Files
File List
Globals
include
opennsl
vswitchX.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_VSWITCHX_H__
17
#define __OPENNSL_VSWITCHX_H__
18
19
#include <
opennsl/types.h
>
20
#include <
opennsl/policer.h
>
21
#include <
opennsl/port.h
>
22
23
/***************************************************************************/
34
extern
int
opennsl_vswitch_init
(
35
int
unit)
LIB_DLL_EXPORTED
;
36
37
/***************************************************************************/
47
extern
int
opennsl_vswitch_detach
(
48
int
unit)
LIB_DLL_EXPORTED
;
49
50
/***************************************************************************/
60
extern
int
opennsl_vswitch_create
(
61
int
unit,
62
opennsl_vlan_t
*vsi)
LIB_DLL_EXPORTED
;
63
64
/***************************************************************************/
74
extern
int
opennsl_vswitch_create_with_id
(
75
int
unit,
76
opennsl_vlan_t
vsi)
LIB_DLL_EXPORTED
;
77
78
/***************************************************************************/
88
extern
int
opennsl_vswitch_destroy
(
89
int
unit,
90
opennsl_vlan_t
vsi)
LIB_DLL_EXPORTED
;
91
92
typedef
int (*
opennsl_vswitch_port_traverse_cb
)(
93
int
unit,
94
opennsl_vlan_t
vsi,
95
opennsl_gport_t
port
,
96
void
*user_data);
97
98
/***************************************************************************/
111
extern
int
opennsl_vswitch_port_traverse
(
112
int
unit,
113
opennsl_vlan_t
vsi,
114
opennsl_vswitch_port_traverse_cb
cb,
115
void
*user_data)
LIB_DLL_EXPORTED
;
116
117
/***************************************************************************/
128
extern
int
opennsl_vswitch_port_add
(
129
int
unit,
130
opennsl_vlan_t
vsi,
131
opennsl_gport_t
port
)
LIB_DLL_EXPORTED
;
132
133
/***************************************************************************/
145
extern
int
opennsl_vswitch_port_delete
(
146
int
unit,
147
opennsl_vlan_t
vsi,
148
opennsl_gport_t
port
)
LIB_DLL_EXPORTED
;
149
150
/***************************************************************************/
162
extern
int
opennsl_vswitch_port_delete_all
(
163
int
unit,
164
opennsl_vlan_t
vsi)
LIB_DLL_EXPORTED
;
165
166
/***************************************************************************/
179
extern
int
opennsl_vswitch_port_get
(
180
int
unit,
181
opennsl_gport_t
port
,
182
opennsl_vlan_t
*vsi)
LIB_DLL_EXPORTED
;
183
185
typedef
struct
opennsl_vswitch_cross_connect_s
{
186
opennsl_gport_t
port1
;
187
opennsl_gport_t
port2
;
188
int
encap1
;
189
int
encap2
;
190
uint32
flags
;
191
}
opennsl_vswitch_cross_connect_t
;
192
/* __doxy_func_body_end__ */
193
194
/***************************************************************************/
201
extern
void
opennsl_vswitch_cross_connect_t_init
(
202
opennsl_vswitch_cross_connect_t
*cross_connect)
LIB_DLL_EXPORTED
;
203
204
/***************************************************************************/
215
extern
int
opennsl_vswitch_cross_connect_add
(
216
int
unit,
217
opennsl_vswitch_cross_connect_t
*gports)
LIB_DLL_EXPORTED
;
218
219
/***************************************************************************/
229
extern
int
opennsl_vswitch_cross_connect_delete
(
230
int
unit,
231
opennsl_vswitch_cross_connect_t
*gports)
LIB_DLL_EXPORTED
;
232
233
/***************************************************************************/
242
extern
int
opennsl_vswitch_cross_connect_delete_all
(
243
int
unit)
LIB_DLL_EXPORTED
;
244
245
/***************************************************************************/
257
extern
int
opennsl_vswitch_cross_connect_get
(
258
int
unit,
259
opennsl_vswitch_cross_connect_t
*gports)
LIB_DLL_EXPORTED
;
260
261
#endif
/* __OPENNSL_VSWITCHX_H__ */
262
© 2016-17 by Broadcom Limited. All rights reserved.