Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.9.0.2
Enumerations | Functions
MVRP Open API(s) [OPENAPI_MVRP]
API Definitions

Enumerations

enum  OPEN_MVRP_STATS_t {
  OPEN_MVRP_STATS_RX = 0, OPEN_MVRP_STATS_RX_BAD_HEADER, OPEN_MVRP_STATS_RX_BAD_FORMAT, OPEN_MVRP_STATS_TX,
  OPEN_MVRP_STATS_TX_FAILURE, OPEN_MVRP_STATS_MSG, OPEN_MVRP_STATS_REG_FAIL
}
 
enum  OPEN_MVRP_VLAN_TYPE_t { OPEN_MVRP_VLAN_REGISTERED = 0, OPEN_MVRP_VLAN_DECLARED }
 

Functions

open_error_t openapiMvrpIntfModeGet (openapiClientHandle_t *client_handle, uint32_t intIfNum, OPEN_CONTROL_t *mode)
 Get the MVRP mode for the specified interface.
 
open_error_t openapiMvrpIntfModeSet (openapiClientHandle_t *client_handle, uint32_t intIfNum, OPEN_CONTROL_t mode)
 Set the MVRP mode for the given interface.
 
open_error_t openapiMvrpIntfTrafficPduCounterGet (openapiClientHandle_t *client_handle, uint32_t intIfNum, OPEN_MVRP_STATS_t type, uint32_t *counter)
 Get the value of specified MVRP counter for an interface.
 
open_error_t openapiMvrpIntfVlanArrayGet (openapiClientHandle_t *client_handle, uint32_t intIfNum, OPEN_MVRP_VLAN_TYPE_t vlanType, OPEN_VLAN_LIST_t *vlanList, uint32_t *count)
 Get MVRP VLAN array on an interface.
 
open_error_t openapiMvrpIsValidIntfGet (openapiClientHandle_t *client_handle, uint32_t intIfNum, OPEN_BOOL_t *isValid)
 Check if the current interface is valid for MVRP.
 
open_error_t openapiMvrpModeGet (openapiClientHandle_t *client_handle, OPEN_CONTROL_t *mode)
 Get the global MVRP mode.
 
open_error_t openapiMvrpModeSet (openapiClientHandle_t *client_handle, OPEN_CONTROL_t mode)
 set the global MVRP mode.
 
open_error_t openapiMvrpPeriodicStateMachineModeGet (openapiClientHandle_t *client_handle, OPEN_CONTROL_t *mode)
 Gets the MVRP periodic state machine mode.
 
open_error_t openapiMvrpPeriodicStateMachineModeSet (openapiClientHandle_t *client_handle, OPEN_CONTROL_t mode)
 Sets the MVRP periodic state machine mode.
 
open_error_t openapiMvrpTrafficCountersClear (openapiClientHandle_t *client_handle)
 Clear all MVRP traffic counters.
 
open_error_t openapiMvrpTrafficCountersPerIfClear (openapiClientHandle_t *client_handle, uint32_t intIfNum)
 Clear MVRP traffic counters on specified interface.
 
open_error_t openapiMvrpTrafficGlobalCountersClear (openapiClientHandle_t *client_handle)
 Clear global MVRP traffic counters.
 
open_error_t openapiMvrpTrafficPduCounterGet (openapiClientHandle_t *client_handle, OPEN_MVRP_STATS_t type, uint32_t *counter)
 Get the value of specified MVRP counter.
 
open_error_t openapiMvrpValidIntfNextGet (openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t *nextIfNum)
 Given the current interface, get the next valid MVRP interface.
 
open_error_t openapiMvrpVlanArrayGet (openapiClientHandle_t *client_handle, OPEN_MVRP_VLAN_TYPE_t vlanType, OPEN_VLAN_LIST_t *vlanList, uint32_t *count)
 Get MVRP VLAN array in the system.
 

Detailed Description

Enumeration Type Documentation

Enumerator:
OPEN_MVRP_STATS_RX 

all received mvrp PDUs

OPEN_MVRP_STATS_RX_BAD_HEADER 

received mvrp PDUs with bad header

OPEN_MVRP_STATS_RX_BAD_FORMAT 

received mvrp PDUs with bad data field

OPEN_MVRP_STATS_TX 

all transmitted mvrp PDUs

OPEN_MVRP_STATS_TX_FAILURE 

mvrp PDUs which failed

OPEN_MVRP_STATS_MSG 

message queue send failed

OPEN_MVRP_STATS_REG_FAIL 

registration failed

Definition at line 50 of file openapi_mvrp.h.

Enumerator:
OPEN_MVRP_VLAN_REGISTERED 

Registered VLAN.

OPEN_MVRP_VLAN_DECLARED 

Declared VLAN.

Definition at line 44 of file openapi_mvrp.h.

Function Documentation

open_error_t openapiMvrpIntfModeGet ( openapiClientHandle_t client_handle,
uint32_t  intIfNum,
OPEN_CONTROL_t mode 
)

Get the MVRP mode for the specified interface.

Parameters
[in]client_handleclient handle from registration API
[in]intIfNumInterface Number.
[out]modeInterface MVRP admin mode.
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
OPEN_E_UNAVAILMVRP feature is not supported.
Note
MVRP Can be enabled/disabled at global or interface level. This API gets the interface admin mode status.

OpEN API Version: 1.20

Examples:
mvrp_example.c.
open_error_t openapiMvrpIntfModeSet ( openapiClientHandle_t client_handle,
uint32_t  intIfNum,
OPEN_CONTROL_t  mode 
)

Set the MVRP mode for the given interface.

Parameters
[in]client_handleclient handle from registration API
[in]intIfNumInterface Number.
[in]modeInterface MVRP admin mode.
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
OPEN_E_UNAVAILMVRP feature is not supported.
Note
MVRP Can be enabled/disabled at global or interface level. This API sets the interface admin mode status.

OpEN API Version: 1.20

Examples:
mvrp_example.c.
open_error_t openapiMvrpIntfTrafficPduCounterGet ( openapiClientHandle_t client_handle,
uint32_t  intIfNum,
OPEN_MVRP_STATS_t  type,
uint32_t *  counter 
)

Get the value of specified MVRP counter for an interface.

Parameters
[in]client_handleclient handle from registration API
[in]intIfNumInterface Number.
[in]typeType of counter.
[out]counterCounter value.
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
OPEN_E_UNAVAILMVRP feature is not supported.

OpEN API Version: 1.20

Examples:
mvrp_example.c.
open_error_t openapiMvrpIntfVlanArrayGet ( openapiClientHandle_t client_handle,
uint32_t  intIfNum,
OPEN_MVRP_VLAN_TYPE_t  vlanType,
OPEN_VLAN_LIST_t vlanList,
uint32_t *  count 
)

Get MVRP VLAN array on an interface.

Parameters
[in]client_handleclient handle from registration API
[in]intIfNumInterface Number.
[in]vlanTypeFlag to tell if vlan is Declared/Registered.
[out]vlanListMVRP VLAN List on the interface given.
[out]countNumber of MVRP Vlans.
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
OPEN_E_UNAVAILMVRP feature is not supported.
OPEN_E_INTERNALMore than max allowed VLANs(4096) are returned by application/ Something is wrong internally.

OpEN API Version: 1.20

Examples:
mvrp_example.c.
open_error_t openapiMvrpIsValidIntfGet ( openapiClientHandle_t client_handle,
uint32_t  intIfNum,
OPEN_BOOL_t isValid 
)

Check if the current interface is valid for MVRP.

Parameters
[in]client_handleclient handle from registration API
[in]intIfNumInterface Number.
[out]isValidFlag to tell if Interface is valid MVRP interface.
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
OPEN_E_UNAVAILMVRP feature is not supported.

OpEN API Version: 1.20

Examples:
mvrp_example.c.
open_error_t openapiMvrpModeGet ( openapiClientHandle_t client_handle,
OPEN_CONTROL_t mode 
)

Get the global MVRP mode.

Parameters
[in]client_handleclient handle from registration API
[out]modeGlobal admin mode.
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
OPEN_E_UNAVAILMVRP feature is not supported.
Note
MVRP Can be enabled/disabled at global or interface level. This API gets the global admin mode status.

OpEN API Version: 1.20

Examples:
mvrp_example.c.
open_error_t openapiMvrpModeSet ( openapiClientHandle_t client_handle,
OPEN_CONTROL_t  mode 
)

set the global MVRP mode.

Parameters
[in]client_handleclient handle from registration API
[in]modeGlobal admin mode.
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
OPEN_E_UNAVAILMVRP feature is not supported.
Note
MVRP Can be enabled/disabled at global or interface level. This API sets the global admin mode status.

OpEN API Version: 1.20

Examples:
mvrp_example.c.
open_error_t openapiMvrpPeriodicStateMachineModeGet ( openapiClientHandle_t client_handle,
OPEN_CONTROL_t mode 
)

Gets the MVRP periodic state machine mode.

Parameters
[in]client_handleclient handle from registration API
[out]modePeriodic state machine mode.
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
OPEN_E_UNAVAILMVRP feature is not supported.

OpEN API Version: 1.20

Examples:
mvrp_example.c.
open_error_t openapiMvrpPeriodicStateMachineModeSet ( openapiClientHandle_t client_handle,
OPEN_CONTROL_t  mode 
)

Sets the MVRP periodic state machine mode.

Parameters
[in]client_handleclient handle from registration API
[in]modePeriodic state machine mode.
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
OPEN_E_UNAVAILMVRP feature is not supported.

OpEN API Version: 1.20

Examples:
mvrp_example.c.
open_error_t openapiMvrpTrafficCountersClear ( openapiClientHandle_t client_handle)

Clear all MVRP traffic counters.

Parameters
[in]client_handleclient handle from registration API
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
OPEN_E_UNAVAILMVRP feature is not supported.

OpEN API Version: 1.20

Examples:
mvrp_example.c.
open_error_t openapiMvrpTrafficCountersPerIfClear ( openapiClientHandle_t client_handle,
uint32_t  intIfNum 
)

Clear MVRP traffic counters on specified interface.

Parameters
[in]client_handleclient handle from registration API
[in]intIfNumInterface Number.
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
OPEN_E_UNAVAILMVRP feature is not supported.

OpEN API Version: 1.20

Examples:
mvrp_example.c.
open_error_t openapiMvrpTrafficGlobalCountersClear ( openapiClientHandle_t client_handle)

Clear global MVRP traffic counters.

Parameters
[in]client_handleclient handle from registration API
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
OPEN_E_UNAVAILMVRP feature is not supported.

OpEN API Version: 1.20

Examples:
mvrp_example.c.
open_error_t openapiMvrpTrafficPduCounterGet ( openapiClientHandle_t client_handle,
OPEN_MVRP_STATS_t  type,
uint32_t *  counter 
)

Get the value of specified MVRP counter.

Parameters
[in]client_handleclient handle from registration API
[in]typeType of counter.
[out]counterCounter value.
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
OPEN_E_UNAVAILMVRP feature is not supported.

OpEN API Version: 1.20

Examples:
mvrp_example.c.
open_error_t openapiMvrpValidIntfNextGet ( openapiClientHandle_t client_handle,
uint32_t  intIfNum,
uint32_t *  nextIfNum 
)

Given the current interface, get the next valid MVRP interface.

Parameters
[in]client_handleclient handle from registration API
[in]intIfNumInterface Number.
[out]nextIfNumNext valid MVRP Interface Number.
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
OPEN_E_UNAVAILMVRP feature is not supported.

OpEN API Version: 1.20

Examples:
mvrp_example.c.
open_error_t openapiMvrpVlanArrayGet ( openapiClientHandle_t client_handle,
OPEN_MVRP_VLAN_TYPE_t  vlanType,
OPEN_VLAN_LIST_t vlanList,
uint32_t *  count 
)

Get MVRP VLAN array in the system.

Parameters
[in]client_handleclient handle from registration API
[in]vlanTypeFlag to tell if vlan is Declared/Registered.
[out]vlanListMVRP VLAN List in the system.
[out]countNumber of MVRP Vlans.
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
OPEN_E_UNAVAILMVRP feature is not supported.
OPEN_E_INTERNALMore than max allowed VLANs(4096) are returned by application/ Something is wrong internally.

OpEN API Version: 1.20

Examples:
mvrp_example.c.