OpenNSL API Guide and Reference Manual
Files | Functions
Stack control

Files

file  stack.h
 
file  stackX.h
 

Functions

int opennsl_stk_gport_sysport_get (int unit, opennsl_gport_t gport, opennsl_gport_t *sysport) LIB_DLL_EXPORTED
 Given a Gport get the SAND System-Port.
 
int opennsl_stk_modid_get (int unit, int *modid) LIB_DLL_EXPORTED
 Get or set the module ID of the local device.
 
int opennsl_stk_modid_set (int unit, int modid) LIB_DLL_EXPORTED
 Get or set the module ID of the local device.
 
int opennsl_stk_my_modid_get (int unit, int *my_modid) LIB_DLL_EXPORTED
 Get or set the module ID of the local device.
 

Detailed Description

Function Documentation

int opennsl_stk_gport_sysport_get ( int  unit,
opennsl_gport_t  gport,
opennsl_gport_t sysport 
)

Given a Gport get the SAND System-Port.

Description
Given a Gport that ie either a Modport or Trunk Gport, get the SAND System-Port.
Parameters
unit[IN] Unit number.
gport[IN] Gport (Modport or LAG)
sysport[OUT] SAND System-Port Gport
Return values
OPENNSL_E_xxx

Referenced by example_pkt_send().

int opennsl_stk_modid_get ( int  unit,
int *  modid 
)

Get or set the module ID of the local device.

Description
Set or get the device's module identifier. Each device in a system must have a unique module number. Some devices, such as switch family fabric switches, do not have a module identifier, and will return OPENNSL_E_UNAVAIL. opennsl_stk_modid_set and opennsl_stk_modid_get will do module mapping by calling =opennsl_stk_modmap_map . opennsl_stk_my_modid_set and opennsl_stk_my_modid_get control the non mapped module identifier for the device.
Parameters
unit[IN] Unit number.
modid[OUT] (for _set) Module identifier
Return values
OPENNSL_E_XXX

Referenced by example_egress_transmit_application().

int opennsl_stk_modid_set ( int  unit,
int  modid 
)

Get or set the module ID of the local device.

Description
Set or get the device's module identifier. Each device in a system must have a unique module number. Some devices, such as switch family fabric switches, do not have a module identifier, and will return OPENNSL_E_UNAVAIL. opennsl_stk_modid_set and opennsl_stk_modid_get will do module mapping by calling =opennsl_stk_modmap_map . opennsl_stk_my_modid_set and opennsl_stk_my_modid_get control the non mapped module identifier for the device.
Parameters
unit[IN] Unit number.
modid[IN] (for _set) Module identifier
Return values
OPENNSL_E_XXX
int opennsl_stk_my_modid_get ( int  unit,
int *  my_modid 
)

Get or set the module ID of the local device.

Description
Set or get the device's module identifier. Each device in a system must have a unique module number. Some devices, such as switch family fabric switches, do not have a module identifier, and will return OPENNSL_E_UNAVAIL. opennsl_stk_modid_set and opennsl_stk_modid_get will do module mapping by calling =opennsl_stk_modmap_map . opennsl_stk_my_modid_set and opennsl_stk_my_modid_get control the non mapped module identifier for the device.
Parameters
unit[IN] Unit number.
my_modid[OUT]
Return values
OPENNSL_E_XXX