|
OpenNSL API Guide and Reference Manual
|
#include <opennsl/types.h>#include <opennsl/pkt.h>#include <opennsl/tx.h>#include <opennsl/mirror.h>Go to the source code of this file.
Data Structures | |
| struct | opennsl_rx_snoop_config_s |
| User-configurable, per-unit RX configuration. More... | |
| struct | opennsl_rx_trap_config_s |
| User-configurable, per-unit RX configuration. More... | |
| struct | opennsl_rx_trap_core_config_s |
| User-configurable, per-unit-core RX destination configuration. More... | |
Macros | |
| #define | OPENNSL_RX_COSQ_PACKET_TYPE_MIRROR 0x4 |
| #define | OPENNSL_RX_COSQ_PACKET_TYPE_NON_UNICAST 0x2 |
| #define | OPENNSL_RX_COSQ_PACKET_TYPE_SWITCHED 0x1 |
| #define | OPENNSL_RX_SNOOP_DEST_MULTICAST 0x00000040 |
| destination is multicast. | |
| #define | OPENNSL_RX_SNOOP_REPLACE 0x00000100 |
| Replace config of existing trap/snoop. | |
| #define | OPENNSL_RX_SNOOP_UPDATE_COLOR 0x00000004 |
| update color. | |
| #define | OPENNSL_RX_SNOOP_UPDATE_COUNTER 0x00000020 |
| update counter. | |
| #define | OPENNSL_RX_SNOOP_UPDATE_DEST 0x00000001 |
| update destination. | |
| #define | OPENNSL_RX_SNOOP_UPDATE_ETHERNET_POLICER 0x00000010 |
| update Ethernet policer. | |
| #define | OPENNSL_RX_SNOOP_UPDATE_POLICER 0x00000008 |
| update policer id. | |
| #define | OPENNSL_RX_SNOOP_UPDATE_PRIO 0x00000002 |
| update priority. | |
| #define | OPENNSL_RX_SNOOP_WITH_ID 0x00000080 |
| Use the specified trap/snoop id. | |
| #define | OPENNSL_RX_TRAP_REPLACE 0x00000800 |
| Replace config of existing trap/snoop. | |
Typedefs | |
| typedef struct opennsl_rx_snoop_config_s | opennsl_rx_snoop_config_t |
| User-configurable, per-unit RX configuration. | |
| typedef struct opennsl_rx_trap_config_s | opennsl_rx_trap_config_t |
| User-configurable, per-unit RX configuration. | |
| typedef struct opennsl_rx_trap_core_config_s | opennsl_rx_trap_core_config_t |
| User-configurable, per-unit-core RX destination configuration. | |
| typedef enum opennsl_rx_trap_forwarding_header_e | opennsl_rx_trap_forwarding_header_t |
| Forwarding header position overridden value. | |
| typedef enum opennsl_rx_trap_e | opennsl_rx_trap_t |
| Return values from PKT RX callout routines. | |
Enumerations | |
| enum | opennsl_rx_trap_e { opennslRxTrapUserDefine = 204 } |
| Return values from PKT RX callout routines. More... | |
| enum | opennsl_rx_trap_forwarding_header_e { opennslRxTrapForwardingHeaderPacketStart = 0, opennslRxTrapForwardingHeaderL2Header = 1, opennslRxTrapForwardingHeaderFirstHeader = 2, opennslRxTrapForwardingHeaderSecondHeader = 3, opennslRxTrapForwardingHeaderThirdHeader = 4, opennslRxTrapForwardingHeaderFourthHeader = 5, opennslRxTrapForwardingHeaderOamBfdPdu = 6, opennslRxTrapForwardingHeaderCount = 7 } |
| Forwarding header position overridden value. More... | |
Functions | |
| int | opennsl_rx_cos_rate_set (int unit, int cos, int pps) LIB_DLL_EXPORTED |
| Set/get the RX per-Cos rate limiting value. | |
| int | opennsl_rx_cosq_mapping_delete (int unit, int index) LIB_DLL_EXPORTED |
| Map/Un-map packets to a CPU CoS queue. | |
| int | opennsl_rx_cosq_mapping_get (int unit, int index, opennsl_rx_reasons_t *reasons, opennsl_rx_reasons_t *reasons_mask, uint8 *int_prio, uint8 *int_prio_mask, uint32 *packet_type, uint32 *packet_type_mask, opennsl_cos_queue_t *cosq) LIB_DLL_EXPORTED |
| Map/Un-map packets to a CPU CoS queue. | |
| int | opennsl_rx_cosq_mapping_reasons_get (int unit, opennsl_rx_reasons_t *reasons) LIB_DLL_EXPORTED |
| Get all the CPU CoS queue mapping reasons supported on the specified device. | |
| int | opennsl_rx_cosq_mapping_set (int unit, int index, opennsl_rx_reasons_t reasons, opennsl_rx_reasons_t reasons_mask, uint8 int_prio, uint8 int_prio_mask, uint32 packet_type, uint32 packet_type_mask, opennsl_cos_queue_t cosq) LIB_DLL_EXPORTED |
| Map/Un-map packets to a CPU CoS queue. | |
| int | opennsl_rx_cosq_mapping_size_get (int unit, int *size) LIB_DLL_EXPORTED |
| Map/Un-map packets to a CPU CoS queue. | |
| void | opennsl_rx_snoop_config_t_init (opennsl_rx_snoop_config_t *snoop_config) LIB_DLL_EXPORTED |
| Initialize the rx_snoop_config_t structure. | |
| int | opennsl_rx_snoop_create (int unit, int flags, int *snoop_cmnd) LIB_DLL_EXPORTED |
| Create snoop command. | |
| int | opennsl_rx_snoop_destroy (int unit, int flags, int snoop_cmnd) LIB_DLL_EXPORTED |
| Destroy create snoop command. | |
| int | opennsl_rx_snoop_get (int unit, int snoop_cmnd, opennsl_rx_snoop_config_t *config) LIB_DLL_EXPORTED |
| Set snoop configuration of the snoop command. | |
| int | opennsl_rx_snoop_set (int unit, int snoop_cmnd, opennsl_rx_snoop_config_t *config) LIB_DLL_EXPORTED |
| The snoop can be set for given trap-code (e.g. | |
| void | opennsl_rx_trap_config_t_init (opennsl_rx_trap_config_t *trap_config) LIB_DLL_EXPORTED |
| Initialize the rx_trap_config_t structure. | |
| int | opennsl_rx_trap_get (int unit, int trap_id, opennsl_rx_trap_config_t *config) LIB_DLL_EXPORTED |
| Get trap configuration according to trap id. | |
| int | opennsl_rx_trap_set (int unit, int trap_id, opennsl_rx_trap_config_t *config) LIB_DLL_EXPORTED |
| Set how to handle packet according to trap type. | |
| int | opennsl_rx_trap_type_create (int unit, int flags, opennsl_rx_trap_t type, int *trap_id) LIB_DLL_EXPORTED |
| Create trap handle for a given type. | |
| int | opennsl_rx_trap_type_destroy (int unit, int trap_id) LIB_DLL_EXPORTED |
| Destroy trap handle for a given trap id. | |
| int | opennsl_rx_trap_type_from_id_get (int unit, int flags, int trap_id, opennsl_rx_trap_t *trap_type) LIB_DLL_EXPORTED |
| Get trap type according to trap id. | |
| int | opennsl_rx_trap_type_get (int unit, int flags, opennsl_rx_trap_t type, int *trap_id) LIB_DLL_EXPORTED |
| Get trap id according to type. | |