Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.6.0.3
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_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 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 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 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 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.