OpenNSL API Guide and Reference Manual
Data Structures | Macros | Typedefs | Enumerations | Functions
port.h File Reference
#include <shared/portmode.h>
#include <shared/port.h>
#include <shared/phyconfig.h>
#include <shared/phyreg.h>
#include <shared/switch.h>
#include <opennsl/types.h>
#include <opennsl/stat.h>
#include <shared/port_ability.h>
#include <opennsl/portX.h>

Go to the source code of this file.

Data Structures

struct  opennsl_port_config_s
 Port Configuration structure. More...
 
struct  opennsl_port_info_s
 opennsl_port_info_s More...
 
struct  opennsl_port_priority_group_config_s
 Priority Group attributes. More...
 

Macros

#define OPENNSL_PIPES_MAX   _SHR_SWITCH_MAX_PIPES
 
#define OPENNSL_PORT_ABIL_1000MB   _SHR_PM_1000MB
 
#define OPENNSL_PORT_ABIL_1000MB_FD   _SHR_PM_1000MB_FD
 
#define OPENNSL_PORT_ABIL_1000MB_HD   _SHR_PM_1000MB_HD
 
#define OPENNSL_PORT_ABIL_100MB   _SHR_PM_100MB
 
#define OPENNSL_PORT_ABIL_100MB_FD   _SHR_PM_100MB_FD
 
#define OPENNSL_PORT_ABIL_100MB_HD   _SHR_PM_100MB_HD
 
#define OPENNSL_PORT_ABIL_10B   OPENNSL_PORT_ABIL_TBI
 Deprecated.
 
#define OPENNSL_PORT_ABIL_10GB   _SHR_PM_10GB
 
#define OPENNSL_PORT_ABIL_10GB_FD   _SHR_PM_10GB_FD
 
#define OPENNSL_PORT_ABIL_10GB_HD   _SHR_PM_10GB_HD
 
#define OPENNSL_PORT_ABIL_10MB   _SHR_PM_10MB
 
#define OPENNSL_PORT_ABIL_10MB_FD   _SHR_PM_10MB_FD
 
#define OPENNSL_PORT_ABIL_10MB_HD   _SHR_PM_10MB_HD
 
#define OPENNSL_PORT_ABIL_12GB   _SHR_PM_12GB
 
#define OPENNSL_PORT_ABIL_12GB_FD   _SHR_PM_12GB_FD
 
#define OPENNSL_PORT_ABIL_12GB_HD   _SHR_PM_12GB_HD
 
#define OPENNSL_PORT_ABIL_13GB   _SHR_PM_13GB
 
#define OPENNSL_PORT_ABIL_13GB_FD   _SHR_PM_13GB_FD
 
#define OPENNSL_PORT_ABIL_13GB_HD   _SHR_PM_13GB_HD
 
#define OPENNSL_PORT_ABIL_16GB   _SHR_PM_16GB
 
#define OPENNSL_PORT_ABIL_16GB_FD   _SHR_PM_16GB_FD
 
#define OPENNSL_PORT_ABIL_16GB_HD   _SHR_PM_16GB_HD
 
#define OPENNSL_PORT_ABIL_2500MB   _SHR_PM_2500MB
 
#define OPENNSL_PORT_ABIL_2500MB_FD   _SHR_PM_2500MB_FD
 
#define OPENNSL_PORT_ABIL_2500MB_HD   _SHR_PM_2500MB_HD
 
#define OPENNSL_PORT_ABIL_3000MB   _SHR_PM_3000MB
 
#define OPENNSL_PORT_ABIL_3000MB_FD   _SHR_PM_3000MB_FD
 
#define OPENNSL_PORT_ABIL_3000MB_HD   _SHR_PM_3000MB_HD
 
#define OPENNSL_PORT_ABIL_AN   _SHR_PM_AN
 
#define OPENNSL_PORT_ABIL_COMBO   _SHR_PM_COMBO
 
#define OPENNSL_PORT_ABIL_FD   _SHR_PM_FD
 
#define OPENNSL_PORT_ABIL_GMII   _SHR_PM_GMII
 
#define OPENNSL_PORT_ABIL_HD   _SHR_PM_HD
 
#define OPENNSL_PORT_ABIL_LB_MAC   _SHR_PM_LB_MAC
 
#define OPENNSL_PORT_ABIL_LB_NONE   _SHR_PM_LB_NONE
 
#define OPENNSL_PORT_ABIL_LB_PHY   _SHR_PM_LB_PHY
 
#define OPENNSL_PORT_ABIL_MII   _SHR_PM_MII
 
#define OPENNSL_PORT_ABIL_PAUSE   _SHR_PM_PAUSE
 Both TX and RX.
 
#define OPENNSL_PORT_ABIL_PAUSE_ASYMM   _SHR_PM_PAUSE_ASYMM
 The following is used only by opennsl_port_ability_get, and indicates that a port can support having PAUSE_TX be different than PAUSE_RX.
 
#define OPENNSL_PORT_ABIL_PAUSE_RX   _SHR_PM_PAUSE_RX
 
#define OPENNSL_PORT_ABIL_PAUSE_TX   _SHR_PM_PAUSE_TX
 
#define OPENNSL_PORT_ABIL_SGMII   _SHR_PM_SGMII
 
#define OPENNSL_PORT_ABIL_SPD_ANY   _SHR_PM_SPEED_ALL
 
#define OPENNSL_PORT_ABIL_SPD_MAX(abil)   _SHR_PM_SPEED_MAX(abil)
 
#define OPENNSL_PORT_ABIL_TBI   _SHR_PM_TBI
 
#define OPENNSL_PORT_ABIL_XGMII   _SHR_PM_XGMII
 
#define OPENNSL_PORT_ABILITY_1000MB   _SHR_PA_SPEED_1000MB
 
#define OPENNSL_PORT_ABILITY_100GB   _SHR_PA_SPEED_100GB
 
#define OPENNSL_PORT_ABILITY_100MB   _SHR_PA_SPEED_100MB
 
#define OPENNSL_PORT_ABILITY_106GB   _SHR_PA_SPEED_106GB
 
#define OPENNSL_PORT_ABILITY_10GB   _SHR_PA_SPEED_10GB
 
#define OPENNSL_PORT_ABILITY_10MB   _SHR_PA_SPEED_10MB
 
#define OPENNSL_PORT_ABILITY_11GB   _SHR_PA_SPEED_11GB
 
#define OPENNSL_PORT_ABILITY_120GB   _SHR_PA_SPEED_120GB
 
#define OPENNSL_PORT_ABILITY_127GB   _SHR_PA_SPEED_127GB
 
#define OPENNSL_PORT_ABILITY_12GB   _SHR_PA_SPEED_12GB
 
#define OPENNSL_PORT_ABILITY_12P5GB   _SHR_PA_SPEED_12P5GB
 
#define OPENNSL_PORT_ABILITY_13GB   _SHR_PA_SPEED_13GB
 
#define OPENNSL_PORT_ABILITY_15GB   _SHR_PA_SPEED_15GB
 
#define OPENNSL_PORT_ABILITY_16GB   _SHR_PA_SPEED_16GB
 
#define OPENNSL_PORT_ABILITY_20GB   _SHR_PA_SPEED_20GB
 
#define OPENNSL_PORT_ABILITY_21GB   _SHR_PA_SPEED_21GB
 
#define OPENNSL_PORT_ABILITY_23GB   _SHR_PA_SPEED_23GB
 
#define OPENNSL_PORT_ABILITY_24GB   _SHR_PA_SPEED_24GB
 
#define OPENNSL_PORT_ABILITY_2500MB   _SHR_PA_SPEED_2500MB
 
#define OPENNSL_PORT_ABILITY_25GB   _SHR_PA_SPEED_25GB
 
#define OPENNSL_PORT_ABILITY_27GB   _SHR_PA_SPEED_27GB
 
#define OPENNSL_PORT_ABILITY_3000MB   _SHR_PA_SPEED_3000MB
 
#define OPENNSL_PORT_ABILITY_30GB   _SHR_PA_SPEED_30GB
 
#define OPENNSL_PORT_ABILITY_32GB   _SHR_PA_SPEED_32GB
 
#define OPENNSL_PORT_ABILITY_40GB   _SHR_PA_SPEED_40GB
 
#define OPENNSL_PORT_ABILITY_42GB   _SHR_PA_SPEED_42GB
 
#define OPENNSL_PORT_ABILITY_48GB   _SHR_PA_SPEED_48GB
 
#define OPENNSL_PORT_ABILITY_5000MB   _SHR_PA_SPEED_5000MB
 
#define OPENNSL_PORT_ABILITY_50GB   _SHR_PA_SPEED_50GB
 
#define OPENNSL_PORT_ABILITY_53GB   _SHR_PA_SPEED_53GB
 
#define OPENNSL_PORT_ABILITY_6000MB   _SHR_PA_SPEED_6000MB
 
#define OPENNSL_PORT_ABILITY_AUTONEG   _SHR_PA_AUTONEG
 
#define OPENNSL_PORT_ABILITY_CHANNEL_LONG   _SHR_PA_CHANNEL_LONG
 port is long channel.
 
#define OPENNSL_PORT_ABILITY_CHANNEL_SHORT   _SHR_PA_CHANNEL_SHORT
 port is short channel.
 
#define OPENNSL_PORT_ABILITY_COMBO   _SHR_PA_COMBO
 
#define OPENNSL_PORT_ABILITY_EEE_100MB_BASETX   _SHR_PA_EEE_100MB_BASETX
 EEE ability at 100M-BaseTX.
 
#define OPENNSL_PORT_ABILITY_EEE_10GB_BASET   _SHR_PA_EEE_10GB_BASET
 EEE ability at 10G-BaseT.
 
#define OPENNSL_PORT_ABILITY_EEE_10GB_KR   _SHR_PA_EEE_10GB_KR
 EEE ability at 10GB-KR.
 
#define OPENNSL_PORT_ABILITY_EEE_10GB_KX   _SHR_PA_EEE_10GB_KX
 EEE ability at 10GB-KX.
 
#define OPENNSL_PORT_ABILITY_EEE_10GB_KX4   _SHR_PA_EEE_10GB_KX4
 EEE ability at 10GB-KX4.
 
#define OPENNSL_PORT_ABILITY_EEE_1GB_BASET   _SHR_PA_EEE_1GB_BASET
 EEE ability at 1G-BaseT.
 
#define OPENNSL_PORT_ABILITY_FEC_CL74   _SHR_PA_FEC_CL74
 FEC CL74 request.
 
#define OPENNSL_PORT_ABILITY_FEC_CL91   _SHR_PA_FEC_CL91
 FEC CL91 request.
 
#define OPENNSL_PORT_ABILITY_FEC_NONE   _SHR_PA_FEC_NONE
 No FEC request.
 
#define OPENNSL_PORT_ABILITY_INTERFACE_CGMII   _SHR_PA_INTF_CGMII
 
#define OPENNSL_PORT_ABILITY_INTERFACE_GMII   _SHR_PA_INTF_GMII
 
#define OPENNSL_PORT_ABILITY_INTERFACE_MII   _SHR_PA_INTF_MII
 
#define OPENNSL_PORT_ABILITY_INTERFACE_QSGMII   _SHR_PA_INTF_QSGMII
 
#define OPENNSL_PORT_ABILITY_INTERFACE_SGMII   _SHR_PA_INTF_SGMII
 
#define OPENNSL_PORT_ABILITY_INTERFACE_TBI   _SHR_PA_INTF_TBI
 
#define OPENNSL_PORT_ABILITY_INTERFACE_XGMII   _SHR_PA_INTF_XGMII
 
#define OPENNSL_PORT_ABILITY_LB_LINE   _SHR_PA_LB_LINE
 
#define OPENNSL_PORT_ABILITY_LB_MAC   _SHR_PA_LB_MAC
 
#define OPENNSL_PORT_ABILITY_LB_NONE   _SHR_PA_LB_NONE
 
#define OPENNSL_PORT_ABILITY_LB_PHY   _SHR_PA_LB_PHY
 
#define OPENNSL_PORT_ABILITY_MEDIUM_BACKPLANE   _SHR_PA_MEDIUM_BACKPLANE
 
#define OPENNSL_PORT_ABILITY_MEDIUM_COPPER   _SHR_PA_MEDIUM_COPPER
 
#define OPENNSL_PORT_ABILITY_MEDIUM_FIBER   _SHR_PA_MEDIUM_FIBER
 
#define OPENNSL_PORT_ABILITY_PAUSE   _SHR_PA_PAUSE
 Both TX and RX.
 
#define OPENNSL_PORT_ABILITY_PAUSE_ASYMM   _SHR_PA_PAUSE_ASYMM
 The following is used only by opennsl_port_ability_get, and indicates that a port can support having PAUSE_TX be different than PAUSE_RX.
 
#define OPENNSL_PORT_ABILITY_PAUSE_RX   _SHR_PA_PAUSE_RX
 
#define OPENNSL_PORT_ABILITY_PAUSE_TX   _SHR_PA_PAUSE_TX
 
#define OPENNSL_PORT_ABILITY_SPEED_MAX(abil)   _SHR_PA_SPEED_MAX(abil)
 
#define OPENNSL_PORT_ATTR2_PORT_ABILITY   0x00000001
 
#define OPENNSL_PORT_ATTR_ABILITY_MASK   0x04000000
 Get only.
 
#define OPENNSL_PORT_ATTR_ALL_MASK   0xffffffff
 
#define OPENNSL_PORT_ATTR_AUTONEG_MASK   0x00000004
 
#define OPENNSL_PORT_ATTR_DISCARD_MASK   0x00000080
 
#define OPENNSL_PORT_ATTR_DUPLEX_MASK   0x00000010
 
#define OPENNSL_PORT_ATTR_ENABLE_MASK   0x00000001
 
#define OPENNSL_PORT_ATTR_ENCAP_MASK   0x00200000
 
#define OPENNSL_PORT_ATTR_FAULT_MASK   0x80000000
 Get only.
 
#define OPENNSL_PORT_ATTR_FRAME_MAX_MASK   0x08000000
 
#define OPENNSL_PORT_ATTR_INTERFACE_MASK   0x00008000
 
#define OPENNSL_PORT_ATTR_LEARN_MASK   0x00000040
 
#define OPENNSL_PORT_ATTR_LINKSCAN_MASK   0x00000020
 
#define OPENNSL_PORT_ATTR_LINKSTAT_MASK   0x00000002
 Get only.
 
#define OPENNSL_PORT_ATTR_LOCAL_ADVERT_MASK   0x00080000
 
#define OPENNSL_PORT_ATTR_LOOPBACK_MASK   0x00002000
 
#define OPENNSL_PORT_ATTR_MDIX_MASK   0x10000000
 
#define OPENNSL_PORT_ATTR_MDIX_STATUS_MASK   0x20000000
 
#define OPENNSL_PORT_ATTR_MEDIUM_MASK   0x40000000
 
#define OPENNSL_PORT_ATTR_PAUSE_MAC_MASK   0x00040000
 
#define OPENNSL_PORT_ATTR_PAUSE_RX_MASK   0x00020000
 
#define OPENNSL_PORT_ATTR_PAUSE_TX_MASK   0x00010000
 
#define OPENNSL_PORT_ATTR_PFM_MASK   0x00001000
 
#define OPENNSL_PORT_ATTR_PHY_MASTER_MASK   0x00004000
 
#define OPENNSL_PORT_ATTR_RATE_BCAST_MASK   0x00800000
 
#define OPENNSL_PORT_ATTR_RATE_DLFBC_MASK   0x01000000
 
#define OPENNSL_PORT_ATTR_RATE_MCAST_MASK   0x00400000
 
#define OPENNSL_PORT_ATTR_REMOTE_ADVERT_MASK   0x00100000
 Get only.
 
#define OPENNSL_PORT_ATTR_SPEED_MASK   0x00000008
 
#define OPENNSL_PORT_ATTR_SPEED_MAX_MASK   0x02000000
 Get only.
 
#define OPENNSL_PORT_ATTR_STP_STATE_MASK   0x00000800
 
#define OPENNSL_PORT_ATTR_UNTAG_PRI_MASK   0x00000200
 
#define OPENNSL_PORT_ATTR_UNTAG_VLAN_MASK   0x00000400
 
#define OPENNSL_PORT_ATTR_VLANFILTER_MASK   0x00000100
 
#define OPENNSL_PORT_CONTROL_SAMPLE_DEST_CPU   0x1
 Copy packet samples to CPU.
 
#define OPENNSL_PORT_CONTROL_SAMPLE_DEST_MIRROR   0x2
 Copy packet samples to all mirror destinations created with OPENNSL_MIRROR_PORT_SFLOW flag.
 
#define OPENNSL_PORT_DSCP_MAP_ALL   2
 Map all.
 
#define OPENNSL_PORT_DSCP_MAP_DEFAULT   4
 Map according to default mapping,Not looking at PCP or TOS.
 
#define OPENNSL_PORT_DSCP_MAP_NONE   0
 Disable DSCP mapping.
 
#define OPENNSL_PORT_DSCP_MAP_UNTAGGED_ONLY   3
 Map only when packet is untagged.
 
#define OPENNSL_PORT_DSCP_MAP_ZERO   1
 Map only if incoming DSCP = 0.
 
#define OPENNSL_PORT_DTAG_MODE_EXTERNAL   2
 Customer port.
 
#define OPENNSL_PORT_DTAG_MODE_INTERNAL   1
 Service Provider port.
 
#define OPENNSL_PORT_DTAG_MODE_NONE   0
 No double tagging.
 
#define OPENNSL_PORT_DUPLEX_COUNT   _SHR_PORT_DUPLEX_COUNT
 
#define OPENNSL_PORT_DUPLEX_FULL   _SHR_PORT_DUPLEX_FULL
 
#define OPENNSL_PORT_DUPLEX_HALF   _SHR_PORT_DUPLEX_HALF
 
#define OPENNSL_PORT_FLOOD_BLOCK_ALL   0x8
 
#define OPENNSL_PORT_FLOOD_BLOCK_BCAST   0x1
 
#define OPENNSL_PORT_FLOOD_BLOCK_KNOWN_MCAST   0x40
 
#define OPENNSL_PORT_FLOOD_BLOCK_UNKNOWN_IP_MCAST   0x10
 
#define OPENNSL_PORT_FLOOD_BLOCK_UNKNOWN_MCAST   0x4
 
#define OPENNSL_PORT_FLOOD_BLOCK_UNKNOWN_NONIP_MCAST   0x20
 
#define OPENNSL_PORT_FLOOD_BLOCK_UNKNOWN_UCAST   0x2
 
#define OPENNSL_PORT_IF_10B   OPENNSL_PORT_IF_TBI
 Deprecated.
 
#define OPENNSL_PORT_IF_CAUI   _SHR_PORT_IF_CAUI
 
#define OPENNSL_PORT_IF_CAUI4   _SHR_PORT_IF_CAUI4
 CAUI4 100G interface.
 
#define OPENNSL_PORT_IF_CAUI_C2C   _SHR_PORT_IF_CAUI_C2C
 CAUI 100G C2C interface.
 
#define OPENNSL_PORT_IF_CAUI_C2M   _SHR_PORT_IF_CAUI_C2M
 CAUI 100G C2M interface.
 
#define OPENNSL_PORT_IF_COUNT   _SHR_PORT_IF_COUNT
 
#define OPENNSL_PORT_IF_CPU   _SHR_PORT_IF_CPU
 
#define OPENNSL_PORT_IF_CR   _SHR_PORT_IF_CR
 Copper 10 GbE 64B/66B interface.
 
#define OPENNSL_PORT_IF_CR10   _SHR_PORT_IF_CR10
 Copper CR10 64B/66B interface.
 
#define OPENNSL_PORT_IF_CR2   _SHR_PORT_IF_CR2
 Copper 2x10GbE 64B/66B interface.
 
#define OPENNSL_PORT_IF_CR4   _SHR_PORT_IF_CR4
 Copper 4x10 GbE 64B/66B interface.
 
#define OPENNSL_PORT_IF_CX   _SHR_PORT_IF_CX
 Copper 10G 10B/8B interface.
 
#define OPENNSL_PORT_IF_CX2   _SHR_PORT_IF_CX2
 Copper 2x10G 10B/8B interface.
 
#define OPENNSL_PORT_IF_CX4   _SHR_PORT_IF_CX4
 Copper 4x10G 10B/8B interface.
 
#define OPENNSL_PORT_IF_ER   _SHR_PORT_IF_ER
 Fiber ER 64B/66B interface.
 
#define OPENNSL_PORT_IF_ER2   _SHR_PORT_IF_ER2
 Fiber ER2 2x10G 64B/66B interface.
 
#define OPENNSL_PORT_IF_ER4   _SHR_PORT_IF_ER4
 Fiber ER4 4x10G 64B/66B interface.
 
#define OPENNSL_PORT_IF_ERP   _SHR_PORT_IF_ERP
 
#define OPENNSL_PORT_IF_EVENTOR   _SHR_PORT_IF_EVENTOR
 
#define OPENNSL_PORT_IF_FAT_PIPE   _SHR_PORT_IF_FAT_PIPE
 
#define OPENNSL_PORT_IF_GMII   _SHR_PORT_IF_GMII
 GMII Operating mode, not supported on all ports.
 
#define OPENNSL_PORT_IF_ILKN   _SHR_PORT_IF_ILKN
 
#define OPENNSL_PORT_IF_KR   _SHR_PORT_IF_KR
 Backplane 10 GbE 64B/66B interface.
 
#define OPENNSL_PORT_IF_KR10   _SHR_PORT_IF_KR10
 Backplane KR10 64B/66B interface.
 
#define OPENNSL_PORT_IF_KR2   _SHR_PORT_IF_KR2
 Backplane 2x10GbE 64B/66B interface.
 
#define OPENNSL_PORT_IF_KR4   _SHR_PORT_IF_KR4
 Backplane 4x10 GbE 64B/66B interface.
 
#define OPENNSL_PORT_IF_KX   _SHR_PORT_IF_KX
 
#define OPENNSL_PORT_IF_LBG   _SHR_PORT_IF_LBG
 Link bonding interface.
 
#define OPENNSL_PORT_IF_LR   _SHR_PORT_IF_LR
 Fiber LR 64B/66B interface.
 
#define OPENNSL_PORT_IF_LR10   _SHR_PORT_IF_LR10
 Fiber LR10 64B/66B interface.
 
#define OPENNSL_PORT_IF_LR2   _SHR_PORT_IF_LR2
 Fiber 2x10Gbe LR 64B/66B interface.
 
#define OPENNSL_PORT_IF_LR4   _SHR_PORT_IF_LR4
 Fiber LR4 64B/66B interface.
 
#define OPENNSL_PORT_IF_LRM   _SHR_PORT_IF_LRM
 Fiber LRM multipoint 64B/66B interface.
 
#define OPENNSL_PORT_IF_MII   _SHR_PORT_IF_MII
 MII Operating mode, not supported on all ports.
 
#define OPENNSL_PORT_IF_NOCXN   _SHR_PORT_IF_NOCXN
 
#define OPENNSL_PORT_IF_NULL   _SHR_PORT_IF_NULL
 
#define OPENNSL_PORT_IF_OAMP   _SHR_PORT_IF_OAMP
 
#define OPENNSL_PORT_IF_OLP   _SHR_PORT_IF_OLP
 
#define OPENNSL_PORT_IF_OTL   _SHR_PORT_IF_OTL
 Fiber 4x25 GbE OTL interface.
 
#define OPENNSL_PORT_IF_QSGMII   _SHR_PORT_IF_QSGMII
 
#define OPENNSL_PORT_IF_RCY   _SHR_PORT_IF_RCY
 
#define OPENNSL_PORT_IF_RCY_MIRROR   _SHR_PORT_IF_RCY_MIRROR
 
#define OPENNSL_PORT_IF_RGMII   _SHR_PORT_IF_RGMII
 Reduced Gigabit Media Independent Interface.
 
#define OPENNSL_PORT_IF_RXAUI   _SHR_PORT_IF_RXAUI
 
#define OPENNSL_PORT_IF_SAT   _SHR_PORT_IF_SAT
 
#define OPENNSL_PORT_IF_SFI   _SHR_PORT_IF_SFI
 SFI 10-Gigabit serial electrical interface.
 
#define OPENNSL_PORT_IF_SGMII   _SHR_PORT_IF_SGMII
 
#define OPENNSL_PORT_IF_SPAUI   _SHR_PORT_IF_SPAUI
 
#define OPENNSL_PORT_IF_SR   _SHR_PORT_IF_SR
 Fiber SR/LR 64B/66B interface.
 
#define OPENNSL_PORT_IF_SR10   _SHR_PORT_IF_SR10
 Fiber SR10 64B/66B interface.
 
#define OPENNSL_PORT_IF_SR2   _SHR_PORT_IF_SR2
 Fiber 2x10GbE 64B/66B interface.
 
#define OPENNSL_PORT_IF_SR4   _SHR_PORT_IF_SR4
 Fiber SR4 64B/66B interface.
 
#define OPENNSL_PORT_IF_TBI   _SHR_PORT_IF_TBI
 TBI interface supported on Gigabit Ethernet ports operating at gigabit speeds.
 
#define OPENNSL_PORT_IF_VSR   _SHR_PORT_IF_VSR
 Fiber VSR 10G 64B/66B interface.
 
#define OPENNSL_PORT_IF_XAUI   _SHR_PORT_IF_XAUI
 
#define OPENNSL_PORT_IF_XFI   _SHR_PORT_IF_XFI
 XFI 10-Gigabit serial electrical interface.
 
#define OPENNSL_PORT_IF_XGMII   _SHR_PORT_IF_XGMII
 10-Gigabit interface
 
#define OPENNSL_PORT_IF_XLAUI   _SHR_PORT_IF_XLAUI
 40 Gigabit Attachment Unit Interface
 
#define OPENNSL_PORT_IF_XLAUI2   _SHR_PORT_IF_XLAUI2
 40 Gigabit Attachment Unit Interface over 2 lanes
 
#define OPENNSL_PORT_IF_XLPPI   _SHR_PORT_IF_XLPPI
 40G parallel physical interface
 
#define OPENNSL_PORT_IF_ZR   _SHR_PORT_IF_ZR
 Fiber ZR 64B/66B interface.
 
#define OPENNSL_PORT_IFILTER_OFF   0
 
#define OPENNSL_PORT_IFILTER_ON   1
 
#define OPENNSL_PORT_LEARN_ARL   0x01
 Learn SLF address.
 
#define OPENNSL_PORT_LEARN_CPU   0x02
 Copy SLF packet to CPU.
 
#define OPENNSL_PORT_LEARN_FWD   0x04
 Forward SLF packet.
 
#define OPENNSL_PORT_LEARN_PENDING   0x08
 Mark learned SLF as pending.
 
#define OPENNSL_PORT_LINK_STATUS_UP   1
 
#define OPENNSL_PORT_MDIX_AUTO   _SHR_PORT_MDIX_AUTO
 
#define OPENNSL_PORT_MDIX_COUNT   _SHR_PORT_MDIX_COUNT
 
#define OPENNSL_PORT_MDIX_FORCE_AUTO   _SHR_PORT_MDIX_FORCE_AUTO
 
#define OPENNSL_PORT_MDIX_NORMAL   _SHR_PORT_MDIX_NORMAL
 
#define OPENNSL_PORT_MDIX_STATUS_COUNT   _SHR_PORT_MDIX_STATUS_COUNT
 
#define OPENNSL_PORT_MDIX_STATUS_NORMAL   _SHR_PORT_MDIX_STATUS_NORMAL
 
#define OPENNSL_PORT_MDIX_STATUS_XOVER   _SHR_PORT_MDIX_STATUS_XOVER
 
#define OPENNSL_PORT_MDIX_XOVER   _SHR_PORT_MDIX_XOVER
 
#define OPENNSL_PORT_MEDIUM_COPPER   _SHR_PORT_MEDIUM_COPPER
 
#define OPENNSL_PORT_MEDIUM_COUNT   _SHR_PORT_MEDIUM_COUNT
 
#define OPENNSL_PORT_MEDIUM_FIBER   _SHR_PORT_MEDIUM_FIBER
 
#define OPENNSL_PORT_MEDIUM_NONE   _SHR_PORT_MEDIUM_NONE
 
#define OPENNSL_PORT_PHY_CLAUSE45   _SHR_PORT_PHY_CLAUSE45
 
#define OPENNSL_PORT_PHY_CLAUSE45_ADDR(_devad, _regad)   _SHR_PORT_PHY_CLAUSE45_ADDR(_devad, _regad)
 
#define OPENNSL_PORT_PHY_CONTROL_FEC_OFF   _SHR_PORT_PHY_CONTROL_FEC_OFF
 
#define OPENNSL_PORT_PHY_CONTROL_FEC_ON   _SHR_PORT_PHY_CONTROL_FEC_ON
 
#define OPENNSL_PORT_PHY_CONTROL_FORWARD_ERROR_CORRECTION   _SHR_PORT_PHY_CONTROL_FORWARD_ERROR_CORRECTION
 
#define OPENNSL_PORT_PHY_CONTROL_RX_LOS_FIRMWARE   _SHR_PORT_PHY_CONTROL_RX_LOS_FIRMWARE
 
#define OPENNSL_PORT_PHY_CONTROL_RX_LOS_NONE   _SHR_PORT_PHY_CONTROL_RX_LOS_NONE
 
#define OPENNSL_PORT_PHY_CONTROL_RX_LOS_SOFTWARE   _SHR_PORT_PHY_CONTROL_RX_LOS_SOFTWARE
 
#define OPENNSL_PORT_PHY_CONTROL_SOFTWARE_RX_LOS   _SHR_PORT_PHY_CONTROL_SOFTWARE_RX_LOS
 
#define OPENNSL_PORT_PHY_CONTROL_SOFTWARE_RX_LOS_LINK_WAIT_TIMER_US   _SHR_PORT_PHY_CONTROL_SOFTWARE_RX_LOS_LINK_WAIT_TIMER_US
 
#define OPENNSL_PORT_PHY_CONTROL_SOFTWARE_RX_LOS_RESTART_TIMER_US   _SHR_PORT_PHY_CONTROL_SOFTWARE_RX_LOS_RESTART_TIMER_US
 
#define OPENNSL_PORT_PRBS_POLYNOMIAL_X11_X9_1   _SHR_PORT_PRBS_POLYNOMIAL_X11_X9_1
 
#define OPENNSL_PORT_PRBS_POLYNOMIAL_X15_X14_1   _SHR_PORT_PRBS_POLYNOMIAL_X15_X14_1
 
#define OPENNSL_PORT_PRBS_POLYNOMIAL_X23_X18_1   _SHR_PORT_PRBS_POLYNOMIAL_X23_X18_1
 
#define OPENNSL_PORT_PRBS_POLYNOMIAL_X31_X28_1   _SHR_PORT_PRBS_POLYNOMIAL_X31_X28_1
 
#define OPENNSL_PORT_PRBS_POLYNOMIAL_X58_X31_1   _SHR_PORT_PRBS_POLYNOMIAL_X58_X31_1
 
#define OPENNSL_PORT_PRBS_POLYNOMIAL_X7_X6_1   _SHR_PORT_PRBS_POLYNOMIAL_X7_X6_1
 
#define OPENNSL_PORT_PRBS_POLYNOMIAL_X9_X5_1   _SHR_PORT_PRBS_POLYNOMIAL_X9_X5_1
 
#define OPENNSL_PORT_VLAN_MEMBER_EGRESS   0x00000002
 
#define OPENNSL_PORT_VLAN_MEMBER_INGRESS   0x00000001
 

Typedefs

typedef _shr_port_mode_t opennsl_port_abil_t
 Port ability mask.
 
typedef _shr_port_ability_t opennsl_port_ability_t
 Port ability.
 
typedef enum opennsl_port_class_e opennsl_port_class_t
 opennsl_port_class_e
 
typedef struct
opennsl_port_config_s 
opennsl_port_config_t
 Port Configuration structure.
 
typedef enum opennsl_port_control_e opennsl_port_control_t
 Features that can be controlled on a per-port basis.
 
typedef _shr_port_duplex_t opennsl_port_duplex_t
 opennsl_port_duplex_t
 
typedef enum
opennsl_port_field_egress_class_select_e 
opennsl_port_field_egress_class_select_t
 Parameter for opennslPortControlFieldEgressClassSelect.
 
typedef _shr_port_if_t opennsl_port_if_t
 opennsl_port_if_t
 
typedef struct opennsl_port_info_s opennsl_port_info_t
 opennsl_port_info_s
 
typedef enum
opennsl_port_loopback_e 
opennsl_port_loopback_t
 Port loopback modes.
 
typedef _shr_port_mdix_status_t opennsl_port_mdix_status_t
 MDI crossover status.
 
typedef _shr_port_mdix_t opennsl_port_mdix_t
 MDI crossover control.
 
typedef _shr_port_medium_t opennsl_port_medium_t
 Combo port control/status.
 
typedef enum opennsl_port_pause_e opennsl_port_pause_t
 Port pause modes (mainly used by the OPENNSLX layer).
 
typedef _shr_port_phy_control_t opennsl_port_phy_control_t
 opennsl_port_phy_control_t
 
typedef struct
opennsl_port_priority_group_config_s 
opennsl_port_priority_group_config_t
 Priority Group attributes.
 

Enumerations

enum  opennsl_port_class_e {
  opennslPortClassFieldLookup = 0,
  opennslPortClassFieldIngress = 1,
  opennslPortClassFieldEgress = 2,
  opennslPortClassId = 5,
  opennslPortClassFieldIngressPacketProcessing = 6,
  opennslPortClassFieldEgressPacketProcessing = 7,
  opennslPortClassEgress = 14
}
 opennsl_port_class_e More...
 
enum  opennsl_port_control_e {
  opennslPortControlIP4 = 8,
  opennslPortControlIP6 = 9,
  opennslPortControlTrustIncomingVlan = 22,
  opennslPortControlDoNotCheckVlan = 23,
  opennslPortControlPrbsMode = 27,
  opennslPortControlPrbsPolynomial = 28,
  opennslPortControlPrbsTxInvertData = 29,
  opennslPortControlPrbsForceTxError = 30,
  opennslPortControlPrbsTxEnable = 31,
  opennslPortControlPrbsRxEnable = 32,
  opennslPortControlPrbsRxStatus = 33,
  opennslPortControlEgressVlanPriUsesPktPri = 43,
  opennslPortControlLanes = 55,
  opennslPortControlPFCReceive = 59,
  opennslPortControlPFCTransmit = 60,
  opennslPortControlPFCClasses = 61,
  opennslPortControlPFCPassFrames = 62,
  opennslPortControlL2Move = 70,
  opennslPortControlEEETransmitWakeTime = 82,
  opennslPortControlStatOversize = 92,
  opennslPortControlEEEEnable = 94,
  opennslPortControlEEETransmitIdleTime = 96,
  opennslPortControlVxlanEnable = 187,
  opennslPortControlVxlanTunnelbasedVnId = 188,
  opennslPortControlVxlanDefaultTunnelEnable = 189,
  opennslPortControlMmuDrain = 285,
  opennslPortControlMmuTrafficEnable = 286,
  opennslPortControlSampleIngressDest = 304,
  opennslPortControlSampleFlexDest = 305,
  opennslPortControlSampleFlexRate = 306
}
 Features that can be controlled on a per-port basis. More...
 
enum  opennsl_port_field_egress_class_select_e { opennslPortEgressClassSelectPort = 1 }
 Parameter for opennslPortControlFieldEgressClassSelect. More...
 
enum  opennsl_port_loopback_e {
  OPENNSL_PORT_LOOPBACK_NONE = 0,
  OPENNSL_PORT_LOOPBACK_MAC = 1,
  OPENNSL_PORT_LOOPBACK_PHY = 2,
  OPENNSL_PORT_LOOPBACK_PHY_REMOTE = 3,
  OPENNSL_PORT_LOOPBACK_MAC_REMOTE = 4,
  OPENNSL_PORT_LOOPBACK_COUNT = 5
}
 Port loopback modes. More...
 
enum  opennsl_port_pause_e {
  OPENNSL_PORT_PAUSE_NONE = 0,
  OPENNSL_PORT_PAUSE_ASYM_RX = 1,
  OPENNSL_PORT_PAUSE_ASYM_TX = 2,
  OPENNSL_PORT_PAUSE_SYM = 3
}
 Port pause modes (mainly used by the OPENNSLX layer). More...
 

Functions

int opennsl_port_ability_advert_get (int unit, opennsl_port_t port, opennsl_port_ability_t *ability_mask) LIB_DLL_EXPORTED
 Set or retrieve auto-negotiation abilities for a port.
 
int opennsl_port_ability_advert_set (int unit, opennsl_port_t port, opennsl_port_ability_t *ability_mask) LIB_DLL_EXPORTED
 Set or retrieve auto-negotiation abilities for a port.
 
int opennsl_port_ability_get (int unit, opennsl_port_t port, opennsl_port_abil_t *local_ability_mask) LIB_DLL_EXPORTED
 
int opennsl_port_ability_local_get (int unit, opennsl_port_t port, opennsl_port_ability_t *local_ability_mask) LIB_DLL_EXPORTED
 Retrieve the valid abilities of a local port.
 
int opennsl_port_ability_remote_get (int unit, opennsl_port_t port, opennsl_port_ability_t *ability_mask) LIB_DLL_EXPORTED
 Retrieve the valid abilities of a remote port.
 
void opennsl_port_ability_t_init (opennsl_port_ability_t *ability) LIB_DLL_EXPORTED
 Initialize a Port Ability structure.
 
int opennsl_port_advert_get (int unit, opennsl_port_t port, opennsl_port_abil_t *ability_mask) LIB_DLL_EXPORTED
 
int opennsl_port_advert_remote_get (int unit, opennsl_port_t port, opennsl_port_abil_t *ability_mask) LIB_DLL_EXPORTED
 
int opennsl_port_advert_set (int unit, opennsl_port_t port, opennsl_port_abil_t ability_mask) LIB_DLL_EXPORTED
 
int opennsl_port_autoneg_get (int unit, opennsl_port_t port, int *autoneg) LIB_DLL_EXPORTED
 Configure or retrieve the current auto-negotiation settings for a port, or restart auto-negotiation if already enabled.
 
int opennsl_port_autoneg_set (int unit, opennsl_port_t port, int autoneg) LIB_DLL_EXPORTED
 Configure or retrieve the current auto-negotiation settings for a port, or restart auto-negotiation if already enabled.
 
int opennsl_port_class_get (int unit, opennsl_port_t port, opennsl_port_class_t pclass, uint32 *class_id) LIB_DLL_EXPORTED
 Set or get port classification ID to aggregate a group of ports for further processing such as VLAN translation and field processing.
 
int opennsl_port_class_set (int unit, opennsl_port_t port, opennsl_port_class_t pclass, uint32 class_id) LIB_DLL_EXPORTED
 Set or get port classification ID to aggregate a group of ports for further processing such as VLAN translation and field processing.
 
int opennsl_port_clear (int unit) LIB_DLL_EXPORTED
 Initialize the port subsystem without affecting the current state of stack ports.
 
int opennsl_port_config_get (int unit, opennsl_port_config_t *config) LIB_DLL_EXPORTED
 Retrieved the port configuration for the specified device.
 
void opennsl_port_config_t_init (opennsl_port_config_t *pconfig) LIB_DLL_EXPORTED
 Initialize a Port Configuration structure.
 
int opennsl_port_control_get (int unit, opennsl_port_t port, opennsl_port_control_t type, int *value) LIB_DLL_EXPORTED
 Get or set various features at the port level.
 
int opennsl_port_control_set (int unit, opennsl_port_t port, opennsl_port_control_t type, int value) LIB_DLL_EXPORTED
 Get or set various features at the port level.
 
int opennsl_port_detach (int unit, opennsl_pbmp_t pbmp, opennsl_pbmp_t *detached) LIB_DLL_EXPORTED
 Detach ports from the OPENNSL API.
 
int opennsl_port_dscp_map_get (int unit, opennsl_port_t port, int srccp, int *mapcp, int *prio) LIB_DLL_EXPORTED
 Control mapping of Differentiated Services Code Points (DSCP).
 
int opennsl_port_dscp_map_mode_get (int unit, opennsl_port_t port, int *mode) LIB_DLL_EXPORTED
 Control mapping of Differentiated Services Code Points (DSCP).
 
int opennsl_port_dscp_map_mode_set (int unit, opennsl_port_t port, int mode) LIB_DLL_EXPORTED
 Control mapping of Differentiated Services Code Points (DSCP).
 
int opennsl_port_dscp_map_set (int unit, opennsl_port_t port, int srccp, int mapcp, int prio) LIB_DLL_EXPORTED
 Control mapping of Differentiated Services Code Points (DSCP).
 
int opennsl_port_dtag_mode_get (int unit, opennsl_port_t port, int *mode) LIB_DLL_EXPORTED
 Set or retrieve the current double tagging mode for a port.
 
int opennsl_port_dtag_mode_set (int unit, opennsl_port_t port, int mode) LIB_DLL_EXPORTED
 Set or retrieve the current double tagging mode for a port.
 
int opennsl_port_duplex_get (int unit, opennsl_port_t port, int *duplex) LIB_DLL_EXPORTED
 Get or set the current duplex mode of a port.
 
int opennsl_port_duplex_set (int unit, opennsl_port_t port, int duplex) LIB_DLL_EXPORTED
 Get or set the current duplex mode of a port.
 
int opennsl_port_egress_get (int unit, opennsl_port_t port, int modid, opennsl_pbmp_t *pbmp) LIB_DLL_EXPORTED
 Configure ports to block or allow packets from a given ingress port.
 
int opennsl_port_egress_set (int unit, opennsl_port_t port, int modid, opennsl_pbmp_t pbmp) LIB_DLL_EXPORTED
 Configure ports to block or allow packets from a given ingress port.
 
int opennsl_port_enable_get (int unit, opennsl_port_t port, int *enable) LIB_DLL_EXPORTED
 Enable or disable a port.
 
int opennsl_port_enable_set (int unit, opennsl_port_t port, int enable) LIB_DLL_EXPORTED
 Enable or disable a port.
 
int opennsl_port_flood_block_get (int unit, opennsl_port_t ingress_port, opennsl_port_t egress_port, uint32 *flags) LIB_DLL_EXPORTED
 Selectively block flooding traffic.
 
int opennsl_port_flood_block_set (int unit, opennsl_port_t ingress_port, opennsl_port_t egress_port, uint32 flags) LIB_DLL_EXPORTED
 Selectively block flooding traffic.
 
int opennsl_port_frame_max_get (int unit, opennsl_port_t port, int *size) LIB_DLL_EXPORTED
 Set or retrieve the current maximum packet size permitted on a port.
 
int opennsl_port_frame_max_set (int unit, opennsl_port_t port, int size) LIB_DLL_EXPORTED
 Set or retrieve the current maximum packet size permitted on a port.
 
int opennsl_port_gport_get (int unit, opennsl_port_t port, opennsl_gport_t *gport) LIB_DLL_EXPORTED
 Get the GPORT ID for the specified local port number.
 
int opennsl_port_ifilter_set (int unit, opennsl_port_t port, int mode) LIB_DLL_EXPORTED
 Set or retrieve current behavior of tagged packets arriving on a port not a member of the specified VLAN.
 
void opennsl_port_info_t_init (opennsl_port_info_t *info) LIB_DLL_EXPORTED
 Initializes the opennsl_port_info_t structure.
 
int opennsl_port_init (int unit) LIB_DLL_EXPORTED
 Initialize the port subsystem.
 
int opennsl_port_interface_get (int unit, opennsl_port_t port, opennsl_port_if_t *intf) LIB_DLL_EXPORTED
 Configure the physical interface between the MAC and the PHY for the specified port.
 
int opennsl_port_interface_set (int unit, opennsl_port_t port, opennsl_port_if_t intf) LIB_DLL_EXPORTED
 Configure the physical interface between the MAC and the PHY for the specified port.
 
int opennsl_port_l3_mtu_get (int unit, opennsl_port_t port, int *size) LIB_DLL_EXPORTED
 Set or retrieve the current maximum L3 packet size permitted on a port.
 
int opennsl_port_l3_mtu_set (int unit, opennsl_port_t port, int size) LIB_DLL_EXPORTED
 Set or retrieve the current maximum L3 packet size permitted on a port.
 
int opennsl_port_learn_get (int unit, opennsl_port_t port, uint32 *flags) LIB_DLL_EXPORTED
 Control the hardware and software learning support on a port.
 
int opennsl_port_learn_set (int unit, opennsl_port_t port, uint32 flags) LIB_DLL_EXPORTED
 Control the hardware and software learning support on a port.
 
int opennsl_port_link_failed_clear (int unit, opennsl_port_t port) LIB_DLL_EXPORTED
 Clear failed link status from a port which has undergone LAG failover.
 
int opennsl_port_link_status_get (int unit, opennsl_port_t port, int *status) LIB_DLL_EXPORTED
 Retrieve the current link status of a port.
 
int opennsl_port_linkscan_get (int unit, opennsl_port_t port, int *linkscan) LIB_DLL_EXPORTED
 Get or set the current linkscan mode for the specified port.
 
int opennsl_port_linkscan_set (int unit, opennsl_port_t port, int linkscan) LIB_DLL_EXPORTED
 Get or set the current linkscan mode for the specified port.
 
int opennsl_port_local_get (int unit, opennsl_gport_t gport, opennsl_port_t *local_port) LIB_DLL_EXPORTED
 Get local port number encoded within a GPORT ID.
 
int opennsl_port_loopback_get (int unit, opennsl_port_t port, int *loopback) LIB_DLL_EXPORTED
 Set or retrieve the current loopback mode of a port.
 
int opennsl_port_loopback_set (int unit, opennsl_port_t port, int loopback) LIB_DLL_EXPORTED
 Set or retrieve the current loopback mode of a port.
 
char * opennsl_port_name (int unit, int port) LIB_DLL_EXPORTED
 
int opennsl_port_pause_addr_get (int unit, opennsl_port_t port, opennsl_mac_t mac) LIB_DLL_EXPORTED
 Get or set the source MAC address transmitted in MAC control pause frames.
 
int opennsl_port_pause_addr_set (int unit, opennsl_port_t port, opennsl_mac_t mac) LIB_DLL_EXPORTED
 Get or set the source MAC address transmitted in MAC control pause frames.
 
int opennsl_port_pause_get (int unit, opennsl_port_t port, int *pause_tx, int *pause_rx) LIB_DLL_EXPORTED
 Enable or disable transmission of pause frames and honoring received pause frames on a port.
 
int opennsl_port_pause_set (int unit, opennsl_port_t port, int pause_tx, int pause_rx) LIB_DLL_EXPORTED
 Enable or disable transmission of pause frames and honoring received pause frames on a port.
 
int opennsl_port_pause_sym_get (int unit, opennsl_port_t port, int *pause) LIB_DLL_EXPORTED
 Configure or retrieve asymmetric pause setting for a port.
 
int opennsl_port_pause_sym_set (int unit, opennsl_port_t port, int pause) LIB_DLL_EXPORTED
 Configure or retrieve asymmetric pause setting for a port.
 
int opennsl_port_phy_control_get (int unit, opennsl_port_t port, opennsl_port_phy_control_t type, uint32 *value) LIB_DLL_EXPORTED
 Set/Get PHY specific configurations.
 
int opennsl_port_phy_control_set (int unit, opennsl_port_t port, opennsl_port_phy_control_t type, uint32 value) LIB_DLL_EXPORTED
 Set/Get PHY specific configurations.
 
int opennsl_port_phy_modify (int unit, opennsl_port_t port, uint32 flags, uint32 phy_reg_addr, uint32 phy_data, uint32 phy_mask) LIB_DLL_EXPORTED
 Read or write PHY registers associated with a port.
 
int opennsl_port_priority_color_get (int unit, opennsl_port_t port, int prio, opennsl_color_t *color) LIB_DLL_EXPORTED
 Set or retrieve color assignment for a given port and priority.
 
int opennsl_port_priority_color_set (int unit, opennsl_port_t port, int prio, opennsl_color_t color) LIB_DLL_EXPORTED
 Set or retrieve color assignment for a given port and priority.
 
int opennsl_port_priority_group_config_get (int unit, opennsl_gport_t gport, int priority_group, opennsl_port_priority_group_config_t *prigrp_config) LIB_DLL_EXPORTED
 Set/get the port priority group configuration.
 
int opennsl_port_priority_group_config_set (int unit, opennsl_gport_t gport, int priority_group, opennsl_port_priority_group_config_t *prigrp_config) LIB_DLL_EXPORTED
 Set/get the port priority group configuration.
 
void opennsl_port_priority_group_config_t_init (opennsl_port_priority_group_config_t *prigrp_config) LIB_DLL_EXPORTED
 Initialize a port priority group configuration struct.
 
int opennsl_port_priority_group_mapping_get (int unit, opennsl_gport_t gport, int prio, int *priority_group) LIB_DLL_EXPORTED
 Assign/retrieve the Priority Group mapped to the input priority.
 
int opennsl_port_priority_group_mapping_set (int unit, opennsl_gport_t gport, int prio, int priority_group) LIB_DLL_EXPORTED
 Assign/retrieve the Priority Group mapped to the input priority.
 
int opennsl_port_probe (int unit, opennsl_pbmp_t pbmp, opennsl_pbmp_t *okay_pbmp) LIB_DLL_EXPORTED
 Probe the port to determine the proper MAC and PHY drivers.
 
int opennsl_port_queued_count_get (int unit, opennsl_port_t port, uint32 *count) LIB_DLL_EXPORTED
 Get the current count of cells or packets queued on a port for transmission.
 
int opennsl_port_sample_rate_get (int unit, opennsl_port_t port, int *ingress_rate, int *egress_rate) LIB_DLL_EXPORTED
 Control the sampling of packets ingressing or egressing a port.
 
int opennsl_port_sample_rate_set (int unit, opennsl_port_t port, int ingress_rate, int egress_rate) LIB_DLL_EXPORTED
 Control the sampling of packets ingressing or egressing a port.
 
int opennsl_port_selective_get (int unit, opennsl_port_t port, opennsl_port_info_t *info) LIB_DLL_EXPORTED
 Get or set multiple port characteristics.
 
int opennsl_port_selective_set (int unit, opennsl_port_t port, opennsl_port_info_t *info) LIB_DLL_EXPORTED
 Get or set multiple port characteristics.
 
int opennsl_port_speed_get (int unit, opennsl_port_t port, int *speed) LIB_DLL_EXPORTED
 Get or set the current operating speed of a port.
 
int opennsl_port_speed_max (int unit, opennsl_port_t port, int *speed) LIB_DLL_EXPORTED
 Get or set the current operating speed of a port.
 
int opennsl_port_speed_set (int unit, opennsl_port_t port, int speed) LIB_DLL_EXPORTED
 Get or set the current operating speed of a port.
 
int opennsl_port_stat_enable_set (int unit, opennsl_gport_t port, int enable) LIB_DLL_EXPORTED
 Enable/disable packet and byte counters for the selected gport.
 
int opennsl_port_stp_get (int unit, opennsl_port_t port, int *state) LIB_DLL_EXPORTED
 Set the spanning tree state for a port (single instance spanning tree only).
 
int opennsl_port_stp_set (int unit, opennsl_port_t port, int state) LIB_DLL_EXPORTED
 Set the spanning tree state for a port (single instance spanning tree only).
 
int opennsl_port_subsidiary_ports_get (int unit, opennsl_port_t port, opennsl_pbmp_t *pbmp) LIB_DLL_EXPORTED
 Get the list of ancillary/flex ports belonging to the same port block as the controlling port.
 
int opennsl_port_untagged_priority_get (int unit, opennsl_port_t port, int *priority) LIB_DLL_EXPORTED
 Get or set the default priority for packets that ingress untagged.
 
int opennsl_port_untagged_priority_set (int unit, opennsl_port_t port, int priority) LIB_DLL_EXPORTED
 Get or set the default priority for packets that ingress untagged.
 
int opennsl_port_untagged_vlan_get (int unit, opennsl_port_t port, opennsl_vlan_t *vid_ptr) LIB_DLL_EXPORTED
 Get or set the default VLAN for packets that ingress untagged.
 
int opennsl_port_untagged_vlan_set (int unit, opennsl_port_t port, opennsl_vlan_t vid) LIB_DLL_EXPORTED
 Get or set the default VLAN for packets that ingress untagged.
 
int opennsl_port_vlan_member_get (int unit, opennsl_port_t port, uint32 *flags) LIB_DLL_EXPORTED
 Set or retrieve current behavior of tagged packets arriving/leaving on a port not a member of the specified VLAN.
 
int opennsl_port_vlan_member_set (int unit, opennsl_port_t port, uint32 flags) LIB_DLL_EXPORTED
 Set or retrieve current behavior of tagged packets arriving/leaving on a port not a member of the specified VLAN.
 
int opennsl_port_vlan_priority_map_get (int unit, opennsl_port_t port, int pkt_pri, int cfi, int *internal_pri, opennsl_color_t *color) LIB_DLL_EXPORTED
 
int opennsl_port_vlan_priority_map_set (int unit, opennsl_port_t port, int pkt_pri, int cfi, int internal_pri, opennsl_color_t color) LIB_DLL_EXPORTED