OpenNSL API Guide and Reference Manual
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 /***************************************************************************/
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,
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,
178 
179 /***************************************************************************/
216  int unit,
217  int index) LIB_DLL_EXPORTED ;
218 
219 /***************************************************************************/
234  int unit,
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 {
268 /* __doxy_func_body_end__ */
269 
281 /* __doxy_func_body_end__ */
282 
288 /* __doxy_func_body_end__ */
289 
291 typedef struct opennsl_rx_trap_config_s {
295  int prio;
317  int meter_cmd;
319 /* __doxy_func_body_end__ */
320 
321 /***************************************************************************/
332 
338  int prio;
342  int size;
351 /* __doxy_func_body_end__ */
352 
353 /***************************************************************************/
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 /***************************************************************************/
415  int unit,
416  int flags,
417  int trap_id,
418  opennsl_rx_trap_t *trap_type) LIB_DLL_EXPORTED ;
419 
420 /***************************************************************************/
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,
452 
453 /***************************************************************************/
464 extern int opennsl_rx_trap_get(
465  int unit,
466  int trap_id,
468 
469 /***************************************************************************/
485 extern int opennsl_rx_snoop_set(
486  int unit,
487  int snoop_cmnd,
489 
490 /***************************************************************************/
501 extern int opennsl_rx_snoop_get(
502  int unit,
503  int snoop_cmnd,
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