Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.12.0.1
Macros | Enumerations | Functions
LAG Configuration And Status [OPENAPI_LAG]

Macros

#define OPEN_LAG_MEMBER_BUFFER_SIZE   (sizeof(uint32_t) * OPEN_MAX_MEMBERS_PER_LAG)
 
#define OPEN_LAG_PORT_ACTOR_PORT_PRIORITY_DEFAULT   128
 
#define OPEN_LAG_PORT_ACTOR_PORT_PRIORITY_MAX   65535
 
#define OPEN_LAG_PORT_ACTOR_PORT_PRIORITY_MIN   0
 
#define OPEN_LAG_PORT_ACTOR_SYSTEM_PRIORITY_DEFAULT   32768
 
#define OPEN_LAG_PORT_ACTOR_SYSTEM_PRIORITY_MAX   65535
 
#define OPEN_LAG_PORT_ACTOR_SYSTEM_PRIORITY_MIN   0
 
#define OPEN_MAX_MEMBERS_PER_LAG   32
 

Enumerations

enum  OPEN_DOT3AD_STATE_TYPE_t { OPEN_DOT3AD_STATE_AGGREGATION = 0, OPEN_DOT3AD_STATE_LACP_TIMEOUT = 1, OPEN_DOT3AD_STATE_LACP_ACTIVITY = 2 }
 OpEN uses these enumerations to indicate DOT3AD state types. More...
 
enum  OPEN_LAG_HASH_MODE_t {
  OPEN_LAG_HASHING_MODE_SA_VLAN = 0, OPEN_LAG_HASHING_MODE_DA_VLAN = 1, OPEN_LAG_HASHING_MODE_SDA_VLAN = 2, OPEN_LAG_HASHING_MODE_SIP_SPORT = 3,
  OPEN_LAG_HASHING_MODE_DIP_DPORT = 4, OPEN_LAG_HASHING_MODE_SDIP_DPORT = 5, OPEN_LAG_HASHING_MODE_ENHANCED = 6
}
 Hash Mode names. More...
 

Functions

open_error_t openapiDot3adAggPortActorAdminStateGet (openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_DOT3AD_STATE_TYPE_t type, OPEN_CONTROL_t *state)
 Gets the LACP actor admin state. More...
 
open_error_t openapiDot3adAggPortActorAdminStateSet (openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_DOT3AD_STATE_TYPE_t type, OPEN_CONTROL_t mode)
 Sets the LACP actor admin state. More...
 
open_error_t openapiDot3adAggPortLacpModeGet (openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_CONTROL_t *lacpMode)
 Gets the LACP mode of the physical interface. More...
 
open_error_t openapiDot3adAggPortLacpModeSet (openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_CONTROL_t lacpMode)
 Sets the LACP mode of the physical interface. More...
 
open_error_t openapiLagActiveMembersGet (openapiClientHandle_t *client_handle, uint32_t lagIfNum, uint32_t *count, open_buffdesc *bufd)
 Gets the list of active member ports for the LAG interface. More...
 
open_error_t openapiLagActiveMembersListGet (openapiClientHandle_t *client_handle, uint32_t lagIfNum, uint32_t *count, open_buffdesc *bufd)
 Gets a comma-delimited list of active member ports for the LAG interface. More...
 
open_error_t openapiLagAdminModeGet (openapiClientHandle_t *client_handle, uint32_t lagIfNum, OPEN_CONTROL_t *adminMode)
 Get the administrative mode of a LAG interface. More...
 
open_error_t openapiLagAdminModeSet (openapiClientHandle_t *client_handle, uint32_t lagIfNum, OPEN_CONTROL_t adminMode)
 Set the administrative mode of a LAG interface. More...
 
open_error_t openapiLagAggPortActorPortPriorityGet (openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *val)
 Get the priority assigned to this aggregation port. More...
 
open_error_t openapiLagAggPortActorPortPrioritySet (openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t val)
 Set the priority of this aggregation port. More...
 
open_error_t openapiLagAggPortActorSystemPriorityGet (openapiClientHandle_t *client_handle, uint32_t *val)
 Get the priority value associated with the system actor's ID. More...
 
open_error_t openapiLagAggPortActorSystemPrioritySet (openapiClientHandle_t *client_handle, uint32_t val)
 Set the priority value associated with the system actor's ID. More...
 
open_error_t openapiLagAutoLAGAvbProfileModeGet (openapiClientHandle_t *client_handle, OPEN_CONTROL_t *adminMode)
 Get the Auto-LAG global AVB profile mode. More...
 
open_error_t openapiLagAutoLAGAvbProfileModeSet (openapiClientHandle_t *client_handle, OPEN_CONTROL_t adminMode)
 Set the Auto-LAG global AVB profile mode. More...
 
open_error_t openapiLagAutoLAGHashModeGet (openapiClientHandle_t *client_handle, OPEN_LAG_HASH_MODE_t *hashMode)
 Get the Auto-LAG global hash mode. More...
 
open_error_t openapiLagAutoLAGHashModeSet (openapiClientHandle_t *client_handle, OPEN_LAG_HASH_MODE_t hashMode)
 Set the Auto-LAG global hash mode. More...
 
open_error_t openapiLagAutoLAGModeGet (openapiClientHandle_t *client_handle, OPEN_CONTROL_t *adminMode)
 Get the Auto-LAG administrative mode. More...
 
open_error_t openapiLagAutoLAGModeSet (openapiClientHandle_t *client_handle, OPEN_CONTROL_t adminMode)
 Set the Auto-LAG administrative mode. More...
 
open_error_t openapiLagAutoLAGStatusGet (openapiClientHandle_t *client_handle, uint32_t lagIntIfNum, OPEN_BOOL_t *autoLagStatus)
 Get the Auto-LAG status of the LAG interface. More...
 
open_error_t openapiLagAvbProfileModeGet (openapiClientHandle_t *client_handle, uint32_t lagIntIfNum, OPEN_CONTROL_t *adminMode)
 Get the AVB profile mode of the LAG interface. More...
 
open_error_t openapiLagCountGet (openapiClientHandle_t *client_handle, uint32_t *lagCount)
 Get the current number of LAGs in the system (static and dynamic). More...
 
open_error_t openapiLagIfIndexGetFirst (openapiClientHandle_t *client_handle, uint32_t *intfIndex)
 Get the interface index number of the first LAG interface. More...
 
open_error_t openapiLagIfIndexGetNext (openapiClientHandle_t *client_handle, uint32_t intfIndex, uint32_t *nextIntfIndex)
 Get the interface index number of the next successive LAG interface. More...
 
open_error_t openapiLagLinkTrapGet (openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *val)
 Get the link trap mode of a configured LAG. More...
 
open_error_t openapiLagLinkTrapSet (openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t val)
 Set the link trap mode of a configured LAG. More...
 
open_error_t openapiLagLoadBalanceModeGet (openapiClientHandle_t *client_handle, uint32_t lagIfNum, OPEN_LAG_HASH_MODE_t *lbMode)
 Gets load balancing mode of the LAG interface. More...
 
open_error_t openapiLagLoadBalanceModeSet (openapiClientHandle_t *client_handle, uint32_t lagIfNum, OPEN_LAG_HASH_MODE_t lbMode)
 Sets load balancing mode of the LAG interface. More...
 
open_error_t openapiLagMaxMemberCountGet (openapiClientHandle_t *client_handle, uint32_t *memberMax)
 Get the maximum number of members allowed for a LAG. More...
 
open_error_t openapiLagMembersGet (openapiClientHandle_t *client_handle, uint32_t lagIfNum, uint32_t *count, open_buffdesc *bufd)
 Gets the list of member ports for the LAG interface. More...
 
open_error_t openapiLagMembersListGet (openapiClientHandle_t *client_handle, uint32_t lagIfNum, uint32_t *count, open_buffdesc *bufd)
 Gets a comma-delimited list of member ports for the LAG interface. More...
 
open_error_t openapiLagMinUplinksGet (openapiClientHandle_t *client_handle, uint32_t lagIfNum, uint32_t *minUpLinks)
 Gets minimum uplinks for the LAG interface. More...
 
open_error_t openapiLagMinUplinksSet (openapiClientHandle_t *client_handle, uint32_t lagIfNum, uint32_t minUpLinks)
 Sets minimum uplinks for the LAG interface. More...
 
open_error_t openapiLagNameGet (openapiClientHandle_t *client_handle, uint32_t lagIfNum, open_buffdesc *name)
 Gets name of the LAG interface. More...
 
open_error_t openapiLagNameMaxLengthGet (openapiClientHandle_t *client_handle, uint32_t *maxLen)
 Get the maximum LAG name length. More...
 
open_error_t openapiLagNameSet (openapiClientHandle_t *client_handle, uint32_t lagIfNum, open_buffdesc *name)
 Sets name of the LAG interface. More...
 
open_error_t openapiLagPortAdd (openapiClientHandle_t *client_handle, uint32_t lagIfNum, uint32_t phyIfNum)
 Adds a physical interface to a LAG interface. More...
 
open_error_t openapiLagPortChannelIdGet (openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *portChannelId)
 Get the port channel ID for a given interface number. More...
 
open_error_t openapiLagPortDelete (openapiClientHandle_t *client_handle, uint32_t lagIfNum, uint32_t phyIfNum)
 Delete a physical interface from a LAG interface. More...
 
open_error_t openapiLagStaticModeGet (openapiClientHandle_t *client_handle, uint32_t lagIfNum, OPEN_CONTROL_t *staticMode)
 Gets static mode of the LAG interface. More...
 
open_error_t openapiLagStaticModeSet (openapiClientHandle_t *client_handle, uint32_t lagIfNum, OPEN_CONTROL_t staticMode)
 Sets static mode of the LAG interface. More...
 
open_error_t openapiLagThresholdMinMaxGet (openapiClientHandle_t *client_handle, uint32_t *minThreshold, uint32_t *maxThreshold)
 Get the LAG Threshold minimum and maximum values. More...
 

Detailed Description

Enumeration Type Documentation

OpEN uses these enumerations to indicate DOT3AD state types.

Enumerator
OPEN_DOT3AD_STATE_AGGREGATION 

aggregation.

OPEN_DOT3AD_STATE_LACP_TIMEOUT 

short timeout.

OPEN_DOT3AD_STATE_LACP_ACTIVITY 

active.

Definition at line 60 of file openapi_lag.h.

Hash Mode names.

Enumerator
OPEN_LAG_HASHING_MODE_SA_VLAN 

Src MAC, VLAN, EType, incoming port.

OPEN_LAG_HASHING_MODE_DA_VLAN 

Dest MAC, VLAN, EType, incoming port.

OPEN_LAG_HASHING_MODE_SDA_VLAN 

Src/Dest MAC, VLAN, EType, incoming port.

OPEN_LAG_HASHING_MODE_SIP_SPORT 

Src IP and Src TCP/UDP Port fields.

OPEN_LAG_HASHING_MODE_DIP_DPORT 

Dest IP and Dest TCP/UDP Port fields.

OPEN_LAG_HASHING_MODE_SDIP_DPORT 

Src/Dest IP and TCP/UDP Port fields.

OPEN_LAG_HASHING_MODE_ENHANCED 

Enhanced hashing mode.

Definition at line 48 of file openapi_lag.h.

Function Documentation

open_error_t openapiDot3adAggPortActorAdminStateGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
OPEN_DOT3AD_STATE_TYPE_t  type,
OPEN_CONTROL_t state 
)

Gets the LACP actor admin state.

Parameters
[in]client_handleclient handle from registration API
[in]ifNumphysical interface number.
[in]typetype of the LACP actor admin state.
[out]stateLACP actor admin state.
Return values
OPEN_E_NONELACP actor admin state get successfully.
OPEN_E_FAILFailed to get LACP actor admin state.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.1

Examples:
lag_example.c.
open_error_t openapiDot3adAggPortActorAdminStateSet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
OPEN_DOT3AD_STATE_TYPE_t  type,
OPEN_CONTROL_t  mode 
)

Sets the LACP actor admin state.

Parameters
[in]client_handleclient handle from registration API
[in]ifNumphysical interface number.
[in]typetype of the LACP actor admin state.
[in]modeLACP actor admin state.
Return values
OPEN_E_NONELACP actor admin state set successfully.
OPEN_E_FAILFailed to set LACP actor admin state.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.1

Examples:
lag_example.c.
open_error_t openapiDot3adAggPortLacpModeGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
OPEN_CONTROL_t lacpMode 
)

Gets the LACP mode of the physical interface.

Parameters
[in]client_handleclient handle from registration API
[in]ifNumphysical interface number.
[out]lacpModeLACP mode of the physical interface.
Return values
OPEN_E_NONELACP mode of the physical interface returned.
OPEN_E_FAILFailed to get LACP mode of the physical interface.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.1

Examples:
lag_example.c.
open_error_t openapiDot3adAggPortLacpModeSet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
OPEN_CONTROL_t  lacpMode 
)

Sets the LACP mode of the physical interface.

Parameters
[in]client_handleclient handle from registration API
[in]ifNumphysical interface number.
[in]lacpModeLACP mode of the physical interface.
Return values
OPEN_E_NONELACP mode of the physical interface set successfully.
OPEN_E_FAILFailed to set LACP mode of the physical interface.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.1

Examples:
lag_example.c.
open_error_t openapiLagActiveMembersGet ( openapiClientHandle_t client_handle,
uint32_t  lagIfNum,
uint32_t *  count,
open_buffdesc bufd 
)

Gets the list of active member ports for the LAG interface.

Parameters
[in]client_handleclient handle from registration API
[in]lagIfNumLAG interface number.
[in,out]countsize of LAG member list Input: maximum number of LAG members to output Output: actual number of LAG member ports in list
[out]bufdbuffer for outputting list of LAG members. returns array of Physical interfaces that are part of LAG
Note
Maximum number of LAG members is determined by calling openapiLagMaxMemberCountGet().
Return values
OPEN_E_NONEmembers list returned successfully.
OPEN_E_FAILFailed to set the minimum uplinks for a LAG.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.1

Examples:
lag_example.c.
open_error_t openapiLagActiveMembersListGet ( openapiClientHandle_t client_handle,
uint32_t  lagIfNum,
uint32_t *  count,
open_buffdesc bufd 
)

Gets a comma-delimited list of active member ports for the LAG interface.

Parameters
[in]client_handleclient handle from registration API
[in]lagIfNumLAG interface number.
[in,out]countsize of LAG member list Input: maximum number of LAG members to output Output: actual number of LAG member ports in list
[out]bufdbuffer for outputting comma separated list of LAG members. Comma separated list of LAG member internal interface numbers
Note
Maximum number of LAG members is determined by calling openapiLagMaxMemberCountGet().
Return values
OPEN_E_NONEactive members list returned successfully.
OPEN_E_FAILFailed to get members list for the given LAG.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.7

open_error_t openapiLagAdminModeGet ( openapiClientHandle_t client_handle,
uint32_t  lagIfNum,
OPEN_CONTROL_t adminMode 
)

Get the administrative mode of a LAG interface.

Parameters
[in]client_handleclient handle from registration API
[in]lagIfNuminternal interface number of a configured LAG
[out]adminModeLACP administrative mode value
Return values
OPEN_E_NONELACP admin state get successfully.
OPEN_E_FAILFailed to get LACP admin state.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.19

Examples:
lag_example.c.
open_error_t openapiLagAdminModeSet ( openapiClientHandle_t client_handle,
uint32_t  lagIfNum,
OPEN_CONTROL_t  adminMode 
)

Set the administrative mode of a LAG interface.

Parameters
[in]client_handleclient handle from registration API
[in]lagIfNuminternal interface number of a configured LAG
[in]adminModeLACP administrative mode value
Return values
OPEN_E_NONELACP admin state set successfully.
OPEN_E_FAILFailed to set LACP admin state.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.19

Examples:
lag_example.c.
open_error_t openapiLagAggPortActorPortPriorityGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
uint32_t *  val 
)

Get the priority assigned to this aggregation port.

Parameters
[in]client_handleclient handle from registration API
[in]ifNuminternal interface number of a configured LAG
[out]vallocation to output the value of priority (0..65535)
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
lag_example.c.
open_error_t openapiLagAggPortActorPortPrioritySet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
uint32_t  val 
)

Set the priority of this aggregation port.

Parameters
[in]client_handleclient handle from registration API
[in]ifNuminternal interface number of a configured LAG
[in]valpriority (0..65535)
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
lag_example.c.
open_error_t openapiLagAggPortActorSystemPriorityGet ( openapiClientHandle_t client_handle,
uint32_t *  val 
)

Get the priority value associated with the system actor's ID.

Parameters
[in]client_handleclient handle from registration API
[out]vallocation to output the value of priority (0..65535)
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
lag_example.c.
open_error_t openapiLagAggPortActorSystemPrioritySet ( openapiClientHandle_t client_handle,
uint32_t  val 
)

Set the priority value associated with the system actor's ID.

Parameters
[in]client_handleclient handle from registration API
[in]valpriority (0..65535)
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
lag_example.c.
open_error_t openapiLagAutoLAGAvbProfileModeGet ( openapiClientHandle_t client_handle,
OPEN_CONTROL_t adminMode 
)

Get the Auto-LAG global AVB profile mode.

Parameters
[in]client_handleclient handle from registration API.
[out]adminModeauto-LAG global AVB profile mode.
Return values
OPEN_E_NONEAuto-LAG AVB profile mode get successfully.
OPEN_E_FAILFailed to get AVB profile mode.
OPEN_E_PARAMError in parameter passed.
OPEN_E_UNAVAILAuto-LAG Feature not present.
OPEN_E_INTERNALInternal application failure.

OpEN API Version: 1.26

Examples:
lag_example.c.
open_error_t openapiLagAutoLAGAvbProfileModeSet ( openapiClientHandle_t client_handle,
OPEN_CONTROL_t  adminMode 
)

Set the Auto-LAG global AVB profile mode.

Parameters
[in]client_handleclient handle from registration API.
[in]adminModeauto-LAG global AVB profile mode.
Return values
OPEN_E_NONEAuto-LAG AVB profile mode set successfully.
OPEN_E_FAILFailed to get AVB profile mode.
OPEN_E_PARAMError in parameter passed.
OPEN_E_DEPENDENCY_NOT_METAVB features not present.
OPEN_E_UNAVAILAuto-LAG Feature not present.
OPEN_E_INTERNALInternal application failure.

OpEN API Version: 1.26

Examples:
lag_example.c.
open_error_t openapiLagAutoLAGHashModeGet ( openapiClientHandle_t client_handle,
OPEN_LAG_HASH_MODE_t hashMode 
)

Get the Auto-LAG global hash mode.

Parameters
[in]client_handleclient handle from registration API.
[out]hashModeauto-LAG global hash mode.
Return values
OPEN_E_NONEAuto-LAG global hash mode get successfully.
OPEN_E_FAILFailed to get Auto-LAG global hash mode.
OPEN_E_PARAMError in parameter passed.
OPEN_E_UNAVAILAuto-LAG Feature not present.
OPEN_E_INTERNALInternal application failure.

OpEN API Version: 1.26

Examples:
lag_example.c.
open_error_t openapiLagAutoLAGHashModeSet ( openapiClientHandle_t client_handle,
OPEN_LAG_HASH_MODE_t  hashMode 
)

Set the Auto-LAG global hash mode.

Parameters
[in]client_handleclient handle from registration API.
[in]hashModeauto-LAG global hash mode.
Return values
OPEN_E_NONEAuto-LAG global hash mode set successfully.
OPEN_E_FAILFailed to set Auto-LAG global hash mode.
OPEN_E_PARAMError in parameter passed.
OPEN_E_UNAVAILAuto-LAG Feature not present.
OPEN_E_INTERNALInternal application failure.

OpEN API Version: 1.26

Examples:
lag_example.c.
open_error_t openapiLagAutoLAGModeGet ( openapiClientHandle_t client_handle,
OPEN_CONTROL_t adminMode 
)

Get the Auto-LAG administrative mode.

Parameters
[in]client_handleclient handle from registration API.
[out]adminModeauto-LAG administrative mode value.
Return values
OPEN_E_NONEAuto-LAG global admin mode get successfully.
OPEN_E_FAILFailed to get Auto-LAG admin mode.
OPEN_E_PARAMError in parameter passed.
OPEN_E_UNAVAILAuto-LAG Feature not present.
OPEN_E_INTERNALInternal application failure.

OpEN API Version: 1.26

Examples:
lag_example.c.
open_error_t openapiLagAutoLAGModeSet ( openapiClientHandle_t client_handle,
OPEN_CONTROL_t  adminMode 
)

Set the Auto-LAG administrative mode.

Parameters
[in]client_handleclient handle from registration API.
[in]adminModeauto-LAG administrative mode value.
Return values
OPEN_E_NONEAuto-LAG global admin mode set successfully.
OPEN_E_FAILFailed to set Auto-LAG admin mode.
OPEN_E_PARAMError in parameter passed.
OPEN_E_UNAVAILAuto-LAG Feature not present.
OPEN_E_INTERNALInternal application failure.

OpEN API Version: 1.26

Examples:
lag_example.c.
open_error_t openapiLagAutoLAGStatusGet ( openapiClientHandle_t client_handle,
uint32_t  lagIntIfNum,
OPEN_BOOL_t autoLagStatus 
)

Get the Auto-LAG status of the LAG interface.

Parameters
[in]client_handleclient handle from registration API.
[in]lagIntIfNumLAG internal interface number.
[out]autoLagStatusauto-LAG status of the LAG interface.
Return values
OPEN_E_NONEAuto-LAG Status get successfully.
OPEN_E_FAILFailed to get Auto-LAG status.
OPEN_E_PARAMError in parameter passed.
OPEN_E_UNAVAILAuto-LAG Feature not present.
OPEN_E_INTERNALInternal application failure.

OpEN API Version: 1.26

Examples:
lag_example.c.
open_error_t openapiLagAvbProfileModeGet ( openapiClientHandle_t client_handle,
uint32_t  lagIntIfNum,
OPEN_CONTROL_t adminMode 
)

Get the AVB profile mode of the LAG interface.

Parameters
[in]client_handleclient handle from registration API.
[in]lagIntIfNumLAG internal interface number.
[out]adminModeAVB profile mode.
Return values
OPEN_E_NONEAVB profile mode get successfully.
OPEN_E_FAILFailed to get AVB profile mode.
OPEN_E_PARAMError in parameter passed.
OPEN_E_DEPENDENCY_NOT_METAVB features not present.
OPEN_E_UNAVAILAuto-LAG Feature not present.
OPEN_E_INTERNALInternal application failure.

OpEN API Version: 1.26

Examples:
lag_example.c.
open_error_t openapiLagCountGet ( openapiClientHandle_t client_handle,
uint32_t *  lagCount 
)

Get the current number of LAGs in the system (static and dynamic).

Parameters
[in]client_handleclient handle from registration API
[out]lagCountNumber of LAGs present on the device
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
lag_example.c.
open_error_t openapiLagIfIndexGetFirst ( openapiClientHandle_t client_handle,
uint32_t *  intfIndex 
)

Get the interface index number of the first LAG interface.

Parameters
[in]client_handleclient handle from registration API
[out]intfIndexinterface index of first LAG interface
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
lag_example.c.
open_error_t openapiLagIfIndexGetNext ( openapiClientHandle_t client_handle,
uint32_t  intfIndex,
uint32_t *  nextIntfIndex 
)

Get the interface index number of the next successive LAG interface.

Parameters
[in]client_handleclient handle from registration API
[in]intfIndexinterface index of the LAG from which to start searching
[out]nextIntfIndexinterface index of the next successive LAG interface
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
lag_example.c.
open_error_t openapiLagLinkTrapGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
uint32_t *  val 
)

Get the link trap mode of a configured LAG.

Parameters
[in]client_handleclient handle from registration API
[in]ifNuminternal interface number of a configured LAG
[out]vallocation to output the link trap value
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
lag_example.c.
open_error_t openapiLagLinkTrapSet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
uint32_t  val 
)

Set the link trap mode of a configured LAG.

Parameters
[in]client_handleclient handle from registration API
[in]ifNuminternal interface number of a configured LAG
[in]valset link trap mode
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
lag_example.c.
open_error_t openapiLagLoadBalanceModeGet ( openapiClientHandle_t client_handle,
uint32_t  lagIfNum,
OPEN_LAG_HASH_MODE_t lbMode 
)

Gets load balancing mode of the LAG interface.

Parameters
[in]client_handleclient handle from registration API
[in]lagIfNumLAG interface number.
[out]lbModeload balance mode of the LAG interface.
Return values
OPEN_E_NONEload balancing mode returned.
OPEN_E_FAILFailed to get the load balance mode of the LAG.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.1

Examples:
lag_example.c.
open_error_t openapiLagLoadBalanceModeSet ( openapiClientHandle_t client_handle,
uint32_t  lagIfNum,
OPEN_LAG_HASH_MODE_t  lbMode 
)

Sets load balancing mode of the LAG interface.

Parameters
[in]client_handleclient handle from registration API
[in]lagIfNumLAG interface number.
[in]lbModeload balance mode of the LAG interface.
Return values
OPEN_E_NONEload balance mode set.
OPEN_E_FAILFailed to set the load balance mode of the LAG.
OPEN_E_PARAMError in parameter passed.
Note
Calling this API will change the running configuration of the switch

OpEN API Version: 1.1

Examples:
lag_example.c.
open_error_t openapiLagMaxMemberCountGet ( openapiClientHandle_t client_handle,
uint32_t *  memberMax 
)

Get the maximum number of members allowed for a LAG.

Parameters
[in]client_handleClient handle from registration API
[out]memberMaxMaximum members
Return values
OPEN_E_NONEif member maximum is returned successfully.
OPEN_E_PARAMif invalid parameter is passed.

OpEN API Version: 1.1

Examples:
lag_example.c.
open_error_t openapiLagMembersGet ( openapiClientHandle_t client_handle,
uint32_t  lagIfNum,
uint32_t *  count,
open_buffdesc bufd 
)

Gets the list of member ports for the LAG interface.

Parameters
[in]client_handleclient handle from registration API
[in]lagIfNumLAG interface number.
[in,out]countsize of LAG member list Input: maximum number of LAG members to output Output: actual number of LAG member ports in list
[out]bufdbuffer for outputting list of LAG members. returns array of Physical interfaces that are part of LAG
Note
Maximum number of LAG members is determined by calling openapiLagMaxMemberCountGet().
Return values
OPEN_E_NONEmembers list returned successfully.
OPEN_E_FAILFailed to set the minimum uplinks for a LAG.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.1

Examples:
lag_example.c.
open_error_t openapiLagMembersListGet ( openapiClientHandle_t client_handle,
uint32_t  lagIfNum,
uint32_t *  count,
open_buffdesc bufd 
)

Gets a comma-delimited list of member ports for the LAG interface.

Parameters
[in]client_handleclient handle from registration API
[in]lagIfNumLAG interface number.
[in,out]countsize of LAG member list Input: maximum number of LAG members to output Output: actual number of LAG member ports in list
[out]bufdbuffer for outputting comma separated list of LAG members. Comma separated list of LAG member internal interface numbers
Note
Maximum number of LAG members is determined by calling openapiLagMaxMemberCountGet().
Return values
OPEN_E_NONEmembers list returned successfully.
OPEN_E_FAILFailed to get members list for the given LAG.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.1

Examples:
lag_example.c.
open_error_t openapiLagMinUplinksGet ( openapiClientHandle_t client_handle,
uint32_t  lagIfNum,
uint32_t *  minUpLinks 
)

Gets minimum uplinks for the LAG interface.

      These are the minimum number of physical interfaces that needs to
      to be UP for the LAG interface to UP
Parameters
[in]client_handleclient handle from registration API
[in]lagIfNumLAG interface number.
[out]minUpLinksminimum uplinks of the LAG interface.
Return values
OPEN_E_NONEminimum uplinks returned.
OPEN_E_FAILFailed to get the minimum uplinks for a LAG.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.1

Examples:
lag_example.c.
open_error_t openapiLagMinUplinksSet ( openapiClientHandle_t client_handle,
uint32_t  lagIfNum,
uint32_t  minUpLinks 
)

Sets minimum uplinks for the LAG interface.

      These are the minimum number of physical interfaces that needs to
      to be UP for the LAG interface to UP
Parameters
[in]client_handleclient handle from registration API
[in]lagIfNumLAG interface number.
[in]minUpLinksminimum uplinks of the LAG interface.
Return values
OPEN_E_NONEminimum uplinks successfully set.
OPEN_E_FAILFailed to set the minimum uplinks for a LAG.
OPEN_E_PARAMError in parameter passed.
Note
Calling this API will change the running configuration of the switch

OpEN API Version: 1.1

Examples:
lag_example.c.
open_error_t openapiLagNameGet ( openapiClientHandle_t client_handle,
uint32_t  lagIfNum,
open_buffdesc name 
)

Gets name of the LAG interface.

Parameters
[in]client_handleclient handle from registration API
[in]lagIfNumLAG interface number.
[out]nameName of the LAG interface. dmx
Return values
OPEN_E_NONELAG name returned.
OPEN_E_FAILFailed to get the name of the LAG.
OPEN_E_PARAMError in parameter passed.
Note
Maximum size for LAG name is determined by calling openapiLagNameMaxLengthGet().

OpEN API Version: 1.1

Examples:
lag_example.c.
open_error_t openapiLagNameMaxLengthGet ( openapiClientHandle_t client_handle,
uint32_t *  maxLen 
)

Get the maximum LAG name length.

Parameters
[in]client_handleClient handle from registration API
[out]maxLenMaximum length for a LAG name.
Return values
OPEN_E_NONEif LAD name maximum length is returned.
OPEN_E_PARAMif invalid parameter is passed.

OpEN API Version: 1.1

open_error_t openapiLagNameSet ( openapiClientHandle_t client_handle,
uint32_t  lagIfNum,
open_buffdesc name 
)

Sets name of the LAG interface.

Parameters
[in]client_handleclient handle from registration API
[in]lagIfNumLAG interface number.
[in]nameName of the LAG interface.
Return values
OPEN_E_NONELAG name successfully set.
OPEN_E_FAILFailed to set the name of the LAG.
OPEN_E_PARAMError in parameter passed.
Note
Calling this API will change the running configuration of the switch
Maximum size for LAG name is determined by calling openapiLagNameMaxLengthGet().

OpEN API Version: 1.1

Examples:
lag_example.c.
open_error_t openapiLagPortAdd ( openapiClientHandle_t client_handle,
uint32_t  lagIfNum,
uint32_t  phyIfNum 
)

Adds a physical interface to a LAG interface.

Parameters
[in]client_handleclient handle from registration API
[in]lagIfNumLAG interface number.
[in]phyIfNumphysical interface.
Return values
OPEN_E_NONEphysical interface added to LAG.
OPEN_E_FAILFailed to add physical interface to LAG.
OPEN_E_PARAMError in parameter passed.
Note
Calling this API will change the running configuration of the switch

OpEN API Version: 1.1

Examples:
lag_example.c.
open_error_t openapiLagPortChannelIdGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
uint32_t *  portChannelId 
)

Get the port channel ID for a given interface number.

Parameters
[in]client_handleClient handle from registration API
[in]ifNumInterface
[out]portChannelIdPort channel Id, if the specified interface is a member of LAG
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
OPEN_E_ERRORIf the specified interface is not a member of any LAG.

OpEN API Version: 1.26

Examples:
lag_example.c.
open_error_t openapiLagPortDelete ( openapiClientHandle_t client_handle,
uint32_t  lagIfNum,
uint32_t  phyIfNum 
)

Delete a physical interface from a LAG interface.

Parameters
[in]client_handleclient handle from registration API
[in]lagIfNumLAG interface number.
[in]phyIfNumphysical interface.
Return values
OPEN_E_NONEphysical interface deleted from LAG.
OPEN_E_FAILFailed to delete physical interface to LAG.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.1

Examples:
lag_example.c.
open_error_t openapiLagStaticModeGet ( openapiClientHandle_t client_handle,
uint32_t  lagIfNum,
OPEN_CONTROL_t staticMode 
)

Gets static mode of the LAG interface.

Parameters
[in]client_handleclient handle from registration API
[in]lagIfNumLAG interface number.
[out]staticModeOPEN_ENABLE if static OPEN_DISABLE if dynamic.
Return values
OPEN_E_NONELAG static mode returned.
OPEN_E_FAILFailed to get the static mode of the LAG.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.1

Examples:
lag_example.c.
open_error_t openapiLagStaticModeSet ( openapiClientHandle_t client_handle,
uint32_t  lagIfNum,
OPEN_CONTROL_t  staticMode 
)

Sets static mode of the LAG interface.

Parameters
[in]client_handleclient handle from registration API
[in]lagIfNumLAG interface number.
[in]staticModeOPEN_ENABLE if static OPEN_DISABLE if dynamic.
Return values
OPEN_E_NONELAG static mode successfully set.
OPEN_E_FAILFailed to set the static mode of the LAG.
OPEN_E_PARAMError in parameter passed.
OPEN_E_FULLTable is full. This may occur when a LAG's mode is set to dynamic and maximum number of dynamic lags are already present in the system
Note
Calling this API will change the running configuration of the switch

OpEN API Version: 1.1

Examples:
lag_example.c.
open_error_t openapiLagThresholdMinMaxGet ( openapiClientHandle_t client_handle,
uint32_t *  minThreshold,
uint32_t *  maxThreshold 
)

Get the LAG Threshold minimum and maximum values.

Parameters
[in]client_handleClient handle from registration API
[out]minThresholdMinimum threshold
[out]maxThresholdMaximum threshold
Return values
OPEN_E_NONEif min and max values are returned.
OPEN_E_FAILif failed to get the range values.
OPEN_E_PARAMerror in parameter passed.

OpEN API Version: 1.1

Examples:
lag_example.c.