OpenNSL API Guide and Reference Manual
Welcome
OpenNSL Documentation
API Reference
Files
File List
Globals
include
opennsl
rxX.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_RXX_H__
17
#define __OPENNSL_RXX_H__
18
19
#include <
opennsl/types.h
>
20
#include <
opennsl/pkt.h
>
21
#include <
opennsl/tx.h
>
22
#include <
opennsl/mirror.h
>
23
24
#if defined(VENDOR_BROADCOM)
25
#endif
26
#define OPENNSL_RX_COSQ_PACKET_TYPE_SWITCHED 0x1
27
#define OPENNSL_RX_COSQ_PACKET_TYPE_NON_UNICAST 0x2
28
#define OPENNSL_RX_COSQ_PACKET_TYPE_MIRROR 0x4
29
/***************************************************************************/
65
extern
int
opennsl_rx_cosq_mapping_size_get
(
66
int
unit,
67
int
*size)
LIB_DLL_EXPORTED
;
68
69
/***************************************************************************/
113
extern
int
opennsl_rx_cosq_mapping_set
(
114
int
unit,
115
int
index,
116
opennsl_rx_reasons_t
reasons,
117
opennsl_rx_reasons_t
reasons_mask,
118
uint8
int_prio,
119
uint8
int_prio_mask,
120
uint32
packet_type,
121
uint32
packet_type_mask,
122
opennsl_cos_queue_t
cosq)
LIB_DLL_EXPORTED
;
123
124
/***************************************************************************/
168
extern
int
opennsl_rx_cosq_mapping_get
(
169
int
unit,
170
int
index,
171
opennsl_rx_reasons_t
*reasons,
172
opennsl_rx_reasons_t
*reasons_mask,
173
uint8
*int_prio,
174
uint8
*int_prio_mask,
175
uint32
*packet_type,
176
uint32
*packet_type_mask,
177
opennsl_cos_queue_t
*cosq)
LIB_DLL_EXPORTED
;
178
179
/***************************************************************************/
215
extern
int
opennsl_rx_cosq_mapping_delete
(
216
int
unit,
217
int
index)
LIB_DLL_EXPORTED
;
218
219
/***************************************************************************/
233
extern
int
opennsl_rx_cosq_mapping_reasons_get
(
234
int
unit,
235
opennsl_rx_reasons_t
*reasons)
LIB_DLL_EXPORTED
;
236
237
/***************************************************************************/
257
extern
int
opennsl_rx_cos_rate_set
(
258
int
unit,
259
int
cos,
260
int
pps)
LIB_DLL_EXPORTED
;
261
262
#if defined(OPENNSL_RPC_SUPPORT) || defined(OPENNSL_RCPU_SUPPORT)
263
#endif
264
265
typedef
enum
opennsl_rx_trap_e
{
266
opennslRxTrapUserDefine
= 204,
267
}
opennsl_rx_trap_t
;
268
/* __doxy_func_body_end__ */
269
271
typedef
enum
opennsl_rx_trap_forwarding_header_e
{
272
opennslRxTrapForwardingHeaderPacketStart
= 0,
273
opennslRxTrapForwardingHeaderL2Header
= 1,
274
opennslRxTrapForwardingHeaderFirstHeader
= 2,
275
opennslRxTrapForwardingHeaderSecondHeader
= 3,
276
opennslRxTrapForwardingHeaderThirdHeader
= 4,
277
opennslRxTrapForwardingHeaderFourthHeader
= 5,
278
opennslRxTrapForwardingHeaderOamBfdPdu
= 6,
279
opennslRxTrapForwardingHeaderCount
= 7
280
}
opennsl_rx_trap_forwarding_header_t
;
281
/* __doxy_func_body_end__ */
282
284
typedef
struct
opennsl_rx_trap_core_config_s
{
285
opennsl_gport_t
dest_port
;
286
opennsl_if_t
encap_id
;
287
}
opennsl_rx_trap_core_config_t
;
288
/* __doxy_func_body_end__ */
289
291
typedef
struct
opennsl_rx_trap_config_s
{
292
uint32
flags
;
293
opennsl_gport_t
dest_port
;
294
opennsl_multicast_t
dest_group
;
295
int
prio
;
296
opennsl_color_t
color
;
297
opennsl_policer_t
ether_policer_id
;
298
opennsl_policer_t
policer_id
;
299
int
counter_num
;
300
int
trap_strength
;
302
int
snoop_cmnd
;
303
int
snoop_strength
;
305
opennsl_reserved_enum_t
forwarding_type
;
306
opennsl_rx_trap_forwarding_header_t
forwarding_header
;
308
opennsl_if_t
encap_id
;
309
opennsl_mirror_options_t
*
mirror_cmd
;
310
opennsl_rx_trap_core_config_t
*
core_config_arr
;
311
int
core_config_arr_len
;
312
int
qos_map_id
;
313
int
tunnel_termination_trap_strength
;
315
int
tunnel_termination_snoop_strength
;
317
int
meter_cmd
;
318
}
opennsl_rx_trap_config_t
;
319
/* __doxy_func_body_end__ */
320
321
/***************************************************************************/
330
extern
void
opennsl_rx_trap_config_t_init
(
331
opennsl_rx_trap_config_t
*trap_config)
LIB_DLL_EXPORTED
;
332
334
typedef
struct
opennsl_rx_snoop_config_s
{
335
uint32
flags
;
336
opennsl_gport_t
dest_port
;
337
opennsl_multicast_t
dest_group
;
338
int
prio
;
339
opennsl_color_t
color
;
340
opennsl_policer_t
policer_id
;
341
int
counter_num
;
342
int
size
;
345
int
probability
;
349
opennsl_if_t
encap_id
;
350
}
opennsl_rx_snoop_config_t
;
351
/* __doxy_func_body_end__ */
352
353
/***************************************************************************/
362
extern
void
opennsl_rx_snoop_config_t_init
(
363
opennsl_rx_snoop_config_t
*snoop_config)
LIB_DLL_EXPORTED
;
364
365
/***************************************************************************/
378
extern
int
opennsl_rx_trap_type_create
(
379
int
unit,
380
int
flags,
381
opennsl_rx_trap_t
type,
382
int
*trap_id)
LIB_DLL_EXPORTED
;
383
384
/***************************************************************************/
396
extern
int
opennsl_rx_trap_type_get
(
397
int
unit,
398
int
flags,
399
opennsl_rx_trap_t
type,
400
int
*trap_id)
LIB_DLL_EXPORTED
;
401
402
/***************************************************************************/
414
extern
int
opennsl_rx_trap_type_from_id_get
(
415
int
unit,
416
int
flags,
417
int
trap_id,
418
opennsl_rx_trap_t
*trap_type)
LIB_DLL_EXPORTED
;
419
420
/***************************************************************************/
430
extern
int
opennsl_rx_trap_type_destroy
(
431
int
unit,
432
int
trap_id)
LIB_DLL_EXPORTED
;
433
434
/***************************************************************************/
448
extern
int
opennsl_rx_trap_set
(
449
int
unit,
450
int
trap_id,
451
opennsl_rx_trap_config_t
*config)
LIB_DLL_EXPORTED
;
452
453
/***************************************************************************/
464
extern
int
opennsl_rx_trap_get
(
465
int
unit,
466
int
trap_id,
467
opennsl_rx_trap_config_t
*config)
LIB_DLL_EXPORTED
;
468
469
/***************************************************************************/
485
extern
int
opennsl_rx_snoop_set
(
486
int
unit,
487
int
snoop_cmnd,
488
opennsl_rx_snoop_config_t
*config)
LIB_DLL_EXPORTED
;
489
490
/***************************************************************************/
501
extern
int
opennsl_rx_snoop_get
(
502
int
unit,
503
int
snoop_cmnd,
504
opennsl_rx_snoop_config_t
*config)
LIB_DLL_EXPORTED
;
505
506
/***************************************************************************/
518
extern
int
opennsl_rx_snoop_create
(
519
int
unit,
520
int
flags,
521
int
*snoop_cmnd)
LIB_DLL_EXPORTED
;
522
523
/***************************************************************************/
534
extern
int
opennsl_rx_snoop_destroy
(
535
int
unit,
536
int
flags,
537
int
snoop_cmnd)
LIB_DLL_EXPORTED
;
538
539
#define OPENNSL_RX_TRAP_REPLACE 0x00000800
541
#define OPENNSL_RX_SNOOP_UPDATE_DEST 0x00000001
542
#define OPENNSL_RX_SNOOP_UPDATE_PRIO 0x00000002
543
#define OPENNSL_RX_SNOOP_UPDATE_COLOR 0x00000004
544
#define OPENNSL_RX_SNOOP_UPDATE_POLICER 0x00000008
545
#define OPENNSL_RX_SNOOP_UPDATE_ETHERNET_POLICER 0x00000010
547
#define OPENNSL_RX_SNOOP_UPDATE_COUNTER 0x00000020
548
#define OPENNSL_RX_SNOOP_DEST_MULTICAST 0x00000040
550
#define OPENNSL_RX_SNOOP_WITH_ID 0x00000080
552
#define OPENNSL_RX_SNOOP_REPLACE 0x00000100
554
#endif
/* __OPENNSL_RXX_H__ */
555
© 2016-17 by Broadcom Limited. All rights reserved.