Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.12.0.1
Macros | Functions
This Code Implements The OpEN Protected Port API [OPENAPI_PROTECTEDPORT]

Macros

#define OPEN_PROTECTED_PORT_GROUP_NAME_SIZE   49
 

Functions

open_error_t openapiProtectedPortGroupGet (openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *groupId)
 Get the group ID for a given interface. More...
 
open_error_t openapiProtectedPortGroupIntfAdd (openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t groupId)
 Add an interface to a protected port group. More...
 
open_error_t openapiProtectedPortGroupIntfCountGet (openapiClientHandle_t *client_handle, uint32_t groupId, uint32_t *intfCount)
 Get the number of protected ports which are members of a given group ID. More...
 
open_error_t openapiProtectedPortGroupIntfDelete (openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t groupId)
 Delete an interface from a protected port group. More...
 
open_error_t openapiProtectedPortGroupIntfListGet (openapiClientHandle_t *client_handle, uint32_t groupId, open_buffdesc *intfList)
 Get all the protected ports which are members of a given group ID. More...
 
open_error_t openapiProtectedPortGroupNameGet (openapiClientHandle_t *client_handle, uint32_t groupId, open_buffdesc *groupName)
 Get the name of the group for a given group ID. More...
 
open_error_t openapiProtectedPortGroupNameSet (openapiClientHandle_t *client_handle, uint32_t groupId, open_buffdesc *groupName)
 Set the name of the group for a given group ID. More...
 
open_error_t openapiProtectedPortMaxGroups (openapiClientHandle_t *client_handle, uint32_t *maxGroupNum)
 Get the maximum number of protected port groups. More...
 
open_error_t openapiProtectedPortNextGroupGet (openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t groupId, uint32_t *NextIfNum, uint32_t *NextGroupId)
 Get the next group and interface for a given group and interface. More...
 

Detailed Description

Function Documentation

open_error_t openapiProtectedPortGroupGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
uint32_t *  groupId 
)

Get the group ID for a given interface.

Parameters
[in]client_handleclient handle from registration API
[in]ifNuminterface
[out]groupIdGroup identifier
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

open_error_t openapiProtectedPortGroupIntfAdd ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
uint32_t  groupId 
)

Add an interface to a protected port group.

Parameters
[in]client_handleclient handle from registration API
[in]ifNuminterface
[in]groupIdGroup identifier
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
Calling this API will change the running configuration of the switch

OpEN API Version: 1.26

open_error_t openapiProtectedPortGroupIntfCountGet ( openapiClientHandle_t client_handle,
uint32_t  groupId,
uint32_t *  intfCount 
)

Get the number of protected ports which are members of a given group ID.

Parameters
[in]client_handleclient handle from registration API
[in]groupIdGroup identifier
[out]intfCountNumber of interfaces
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

open_error_t openapiProtectedPortGroupIntfDelete ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
uint32_t  groupId 
)

Delete an interface from a protected port group.

Parameters
[in]client_handleclient handle from registration API
[in]ifNuminterface
[in]groupIdGroup identifier
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
Calling this API will change the running configuration of the switch

OpEN API Version: 1.26

open_error_t openapiProtectedPortGroupIntfListGet ( openapiClientHandle_t client_handle,
uint32_t  groupId,
open_buffdesc intfList 
)

Get all the protected ports which are members of a given group ID.

Parameters
[in]client_handleclient handle from registration API
[in]groupIdGroup identifier
[out]intfListList of interfaces with comma separation
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
Buffer allocated size (intfList) must be 4 * number of interfaces in the group. To get the number of interfaces in the group use @ openapiProtectedPortGroupCountGet() ne

OpEN API Version: 1.26

open_error_t openapiProtectedPortGroupNameGet ( openapiClientHandle_t client_handle,
uint32_t  groupId,
open_buffdesc groupName 
)

Get the name of the group for a given group ID.

Parameters
[in]client_handleclient handle from registration API
[in]groupIdGroup identifier
[out]groupNameName of the group
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

open_error_t openapiProtectedPortGroupNameSet ( openapiClientHandle_t client_handle,
uint32_t  groupId,
open_buffdesc groupName 
)

Set the name of the group for a given group ID.

Parameters
[in]client_handleclient handle from registration API
[in]groupIdGroup identifier
[in]groupNameName of the group
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
Calling this API will change the running configuration of the switch

OpEN API Version: 1.26

open_error_t openapiProtectedPortMaxGroups ( openapiClientHandle_t client_handle,
uint32_t *  maxGroupNum 
)

Get the maximum number of protected port groups.

Parameters
[in]client_handleclient handle from registration API
[out]maxGroupNumGroup number
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

open_error_t openapiProtectedPortNextGroupGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
uint32_t  groupId,
uint32_t *  NextIfNum,
uint32_t *  NextGroupId 
)

Get the next group and interface for a given group and interface.

Parameters
[in]client_handleclient handle from registration API
[in]ifNuminterface
[in]groupIdGroup identifier
[out]NextIfNumNext interface
[out]NextGroupIdNext group identifier
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26