Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.11.1.2
Macros | Enumerations | Functions
This Code Implements The OpEN QOS Auto VLAN APIs [OPENAPI_QOS_AUTO_VLAN]

Macros

#define OPEN_AUTO_VLAN_FIRST_MAC_OUI_INDEX   0
 
#define OPEN_AUTO_VLAN_MAX_MAC_OUIS   L7_AUTO_VLAN_MAX_MAC_OUIS
 
#define OPEN_AUTO_VLAN_OUI_DESC_STRINGLEN   AUTO_VLAN_OUI_DESC_STRINGLEN
 
#define OPEN_AUTO_VLAN_OUI_LEN   AUTO_VLAN_OUI_LEN
 
#define OPEN_AUTO_VLAN_OUI_STR_MAX_LEN   9
 
#define OPEN_DEFAULT_AUTO_CAMERA_PRIORITY   7
 
#define OPEN_DEFAULT_AUTO_CAMERA_STATUS   OPEN_DISABLE
 
#define OPEN_DEFAULT_AUTO_CAMERA_VLAN   0
 
#define OPEN_DEFAULT_AUTO_WIFI_PRIORITY   7
 
#define OPEN_DEFAULT_AUTO_WIFI_STATUS   OPEN_DISABLE
 
#define OPEN_DEFAULT_AUTO_WIFI_VLAN   0
 
#define OPEN_QOS_AUTO_VLAN_DYNAMIC_VLAN_SUPPORT   L7_FALSE
 

Enumerations

enum  OPEN_AUTO_VLAN_TYPES_t { OPEN_AUTO_VLAN_FIRST = 0, OPEN_AUTO_VLAN_CAMERA = 0, OPEN_AUTO_VLAN_WIFI, OPEN_AUTO_VLAN_LAST }
 < Auto VLAN Types More...
 

Functions

open_error_t openapiQosAutoVlanDetectedDevicesGet (openapiClientHandle_t *client_handle, OPEN_AUTO_VLAN_TYPES_t autoVlanType, uint32_t *count)
 Gets the count of devices learned for given Auto VLAN type. More...
 
open_error_t openapiQosAutoVlanGlobalModeGet (openapiClientHandle_t *client_handle, OPEN_AUTO_VLAN_TYPES_t autoVlanType, OPEN_CONTROL_t *mode)
 Gets the AUTO VLAN global status. More...
 
open_error_t openapiQosAutoVlanGlobalModeSet (openapiClientHandle_t *client_handle, OPEN_AUTO_VLAN_TYPES_t autoVlanType, OPEN_CONTROL_t mode)
 Enables or disables the AUTO VLAN global status. More...
 
open_error_t openapiQosAutoVlanIdGet (openapiClientHandle_t *client_handle, OPEN_AUTO_VLAN_TYPES_t autoVlanType, uint32_t *vlanId)
 Gets the vlan Id configured for Auto VLAN type. More...
 
open_error_t openapiQosAutoVlanIdSet (openapiClientHandle_t *client_handle, OPEN_AUTO_VLAN_TYPES_t autoVlanType, uint32_t vlanId)
 Sets the VLAN for autoVlan traffic on switch. More...
 
open_error_t openapiQosAutoVlanIndexOuiAdd (openapiClientHandle_t *client_handle, OPEN_AUTO_VLAN_TYPES_t autoVlanType, uint32_t ouiIndex, open_buffdesc *autoVlanOui, open_buffdesc *autoOuiDesc)
 Adds Auto VLAN OUI entry at particular Index. More...
 
open_error_t openapiQosAutoVlanIndexOuiRemove (openapiClientHandle_t *client_handle, uint32_t ouiIndex)
 Removes Auto VLAN OUI entry at particular Index. More...
 
open_error_t openapiQosAutoVlanIntfModeGet (openapiClientHandle_t *client_handle, OPEN_AUTO_VLAN_TYPES_t autoVlanType, uint32_t ifNum, OPEN_CONTROL_t *mode)
 Gets the status of AUTO VLAN on interface. More...
 
open_error_t openapiQosAutoVlanIntfModeSet (openapiClientHandle_t *client_handle, OPEN_AUTO_VLAN_TYPES_t autoVlanType, uint32_t ifNum, OPEN_CONTROL_t mode)
 Enables or disables the AUTO VLAN status on interface. More...
 
open_error_t openapiQoSAutoVlanIsValidIntf (openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_BOOL_t *isValid)
 Determine if the interface is valid for AUTO VLAN configuration. More...
 
open_error_t openapiQosAutoVlanLearnedEntryNextGet (openapiClientHandle_t *client_handle, uint32_t index, open_buffdesc *autoVlanMac, OPEN_AUTO_VLAN_TYPES_t *autoVlanType, uint32_t *intIfNum, uint32_t *nextIndex)
 Gets the Auto VLAN learned entry and next index. More...
 
open_error_t openapiQosAutoVlanOuiAdd (openapiClientHandle_t *client_handle, OPEN_AUTO_VLAN_TYPES_t autoVlanType, open_buffdesc *autoVlanOui, open_buffdesc *autoOuiDesc)
 Adds Auto VLAN OUI entry. More...
 
open_error_t openapiQosAutoVlanOuiCountGet (openapiClientHandle_t *client_handle, OPEN_AUTO_VLAN_TYPES_t autoVlanType, uint32_t *autoVlanOuiCount)
 Gets the count of OUIs already configured. More...
 
open_error_t openapiQosAutoVlanOuiDescGet (openapiClientHandle_t *client_handle, OPEN_AUTO_VLAN_TYPES_t autoVlanType, open_buffdesc *autoVlanOui, open_buffdesc *autoOuiDesc)
 Gets the autoVlan OUI description, given OUI entry string. More...
 
open_error_t openapiQosAutoVlanOuiEntryGet (openapiClientHandle_t *client_handle, OPEN_AUTO_VLAN_TYPES_t autoVlanType, uint32_t currentIndex, open_buffdesc *autoVlanOui, open_buffdesc *autoOuiDesc)
 Gets Auto VLAN OUI entry details. More...
 
open_error_t openapiQosAutoVlanOuiEntryNextGet (openapiClientHandle_t *client_handle, OPEN_AUTO_VLAN_TYPES_t autoVlanType, uint32_t currentIndex, uint32_t *nextOuiIndex)
 Gets Auto VLAN OUI next index. More...
 
open_error_t openapiQosAutoVlanOuiFirstEntryGet (openapiClientHandle_t *client_handle, OPEN_AUTO_VLAN_TYPES_t autoVlanType, uint32_t *firstIndex)
 Gets first Auto VLAN OUI Index. More...
 
open_error_t openapiQosAutoVlanOuiRemove (openapiClientHandle_t *client_handle, OPEN_AUTO_VLAN_TYPES_t autoVlanType, open_buffdesc *autoVlanOui)
 Removes Auto Vlan OUI entry. More...
 
open_error_t openapiQosAutoVlanPortStatusGet (openapiClientHandle_t *client_handle, OPEN_AUTO_VLAN_TYPES_t autoVlanType, uint32_t ifNum, OPEN_CONTROL_t *status)
 Gets Auto VLAN operational port status. More...
 
open_error_t openapiQosAutoVlanPriorityGet (openapiClientHandle_t *client_handle, OPEN_AUTO_VLAN_TYPES_t autoVlanType, uint32_t *autoVlanPriority)
 Gets the Priority for Auto VLAN traffic on switch. More...
 
open_error_t openapiQosAutoVlanPrioritySet (openapiClientHandle_t *client_handle, OPEN_AUTO_VLAN_TYPES_t autoVlanType, uint32_t autoVlanPriority)
 Sets the Priority for Auto VLAN traffic on switch. More...
 
open_error_t openapiQosAutoVlanValidIntfFirstGet (openapiClientHandle_t *client_handle, uint32_t *ifNum)
 Get the first interface that is valid for Auto VLAN. More...
 
open_error_t openapiQosAutoVlanValidIntfNextGet (openapiClientHandle_t *client_handle, uint32_t prevIfNum, uint32_t *nextIfNum)
 Get the next interface that is valid for auto VLAN. More...
 

Detailed Description

Enumeration Type Documentation

< Auto VLAN Types

Enumerator
OPEN_AUTO_VLAN_CAMERA 

Auto Camera VLAN Type.

OPEN_AUTO_VLAN_WIFI 

Auto Wifi VLAN Type.

Definition at line 44 of file openapi_qos_auto_vlan.h.

Function Documentation

open_error_t openapiQosAutoVlanDetectedDevicesGet ( openapiClientHandle_t client_handle,
OPEN_AUTO_VLAN_TYPES_t  autoVlanType,
uint32_t *  count 
)

Gets the count of devices learned for given Auto VLAN type.

Parameters
[in]client_handleclient handle from registration API
[in]autoVlanTypeAuto VLAN type
[out]countNumber of detected devices.
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.25

Examples:
qos_auto_vlan_example.c.
open_error_t openapiQosAutoVlanGlobalModeGet ( openapiClientHandle_t client_handle,
OPEN_AUTO_VLAN_TYPES_t  autoVlanType,
OPEN_CONTROL_t mode 
)

Gets the AUTO VLAN global status.

Parameters
[in]client_handleclient handle from registration API
[in]autoVlanTypeAuto VLAN type
[out]modeMode value ENABLE/DISABLE
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.25

Examples:
qos_auto_vlan_example.c.
open_error_t openapiQosAutoVlanGlobalModeSet ( openapiClientHandle_t client_handle,
OPEN_AUTO_VLAN_TYPES_t  autoVlanType,
OPEN_CONTROL_t  mode 
)

Enables or disables the AUTO VLAN global status.

Parameters
[in]client_handleclient handle from registration API
[in]autoVlanTypeAuto VLAN type
[in]modeMode value ENABLE/DISABLE
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.25

Examples:
qos_auto_vlan_example.c.
open_error_t openapiQosAutoVlanIdGet ( openapiClientHandle_t client_handle,
OPEN_AUTO_VLAN_TYPES_t  autoVlanType,
uint32_t *  vlanId 
)

Gets the vlan Id configured for Auto VLAN type.

Parameters
[in]client_handleclient handle from registration API
[in]autoVlanTypeAuto VLAN type
[out]vlanIdVLAN id configured for given Auto VLAN type.
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.25

Examples:
qos_auto_vlan_example.c.
open_error_t openapiQosAutoVlanIdSet ( openapiClientHandle_t client_handle,
OPEN_AUTO_VLAN_TYPES_t  autoVlanType,
uint32_t  vlanId 
)

Sets the VLAN for autoVlan traffic on switch.

Parameters
[in]client_handleclient handle from registration API
[in]autoVlanTypeAuto VLAN type
[in]vlanIdVLAN Id to be configured for given Auto VLAN type.
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.25

Examples:
qos_auto_vlan_example.c.
open_error_t openapiQosAutoVlanIndexOuiAdd ( openapiClientHandle_t client_handle,
OPEN_AUTO_VLAN_TYPES_t  autoVlanType,
uint32_t  ouiIndex,
open_buffdesc autoVlanOui,
open_buffdesc autoOuiDesc 
)

Adds Auto VLAN OUI entry at particular Index.

Parameters
[in]client_handleclient handle from registration API
[in]autoVlanTypeAuto VLAN type
[in]ouiIndexIndex number.
[in]autoVlanOuiAuto VLAN OUI Entry (string format. Example 0A020C)
[in]autoOuiDescAuto Vlan OUI description
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.25

Examples:
qos_auto_vlan_example.c.
open_error_t openapiQosAutoVlanIndexOuiRemove ( openapiClientHandle_t client_handle,
uint32_t  ouiIndex 
)

Removes Auto VLAN OUI entry at particular Index.

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

OpEN API Version: 1.25

Examples:
qos_auto_vlan_example.c.
open_error_t openapiQosAutoVlanIntfModeGet ( openapiClientHandle_t client_handle,
OPEN_AUTO_VLAN_TYPES_t  autoVlanType,
uint32_t  ifNum,
OPEN_CONTROL_t mode 
)

Gets the status of AUTO VLAN on interface.

Parameters
[in]client_handleclient handle from registration API
[in]autoVlanTypeAuto VLAN type
[in]ifNumInterface on which vlan mode needs to be checked.
[out]modeMode value ENABLE/DISABLE
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.25

Examples:
qos_auto_vlan_example.c.
open_error_t openapiQosAutoVlanIntfModeSet ( openapiClientHandle_t client_handle,
OPEN_AUTO_VLAN_TYPES_t  autoVlanType,
uint32_t  ifNum,
OPEN_CONTROL_t  mode 
)

Enables or disables the AUTO VLAN status on interface.

Parameters
[in]client_handleclient handle from registration API
[in]autoVlanTypeAuto VLAN type
[in]ifNumInterface on which auto vlan mode needs to be enabled or disabled.
[in]modeMode value ENABLE/DISABLE
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.25

Examples:
qos_auto_vlan_example.c.
open_error_t openapiQoSAutoVlanIsValidIntf ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
OPEN_BOOL_t isValid 
)

Determine if the interface is valid for AUTO VLAN configuration.

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

OpEN API Version: 1.25

Examples:
qos_auto_vlan_example.c.
open_error_t openapiQosAutoVlanLearnedEntryNextGet ( openapiClientHandle_t client_handle,
uint32_t  index,
open_buffdesc autoVlanMac,
OPEN_AUTO_VLAN_TYPES_t autoVlanType,
uint32_t *  intIfNum,
uint32_t *  nextIndex 
)

Gets the Auto VLAN learned entry and next index.

Parameters
[in]client_handleClient handle from registration API
[in]indexCurrent learned entry Index.
[out]autoVlanMacAuto VLAN MAC address
[out]autoVlanTypeAuto VLAN type
[out]intIfNumInterface number
[out]nextIndexNext learned entry index.
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.25

Examples:
qos_auto_vlan_example.c.
open_error_t openapiQosAutoVlanOuiAdd ( openapiClientHandle_t client_handle,
OPEN_AUTO_VLAN_TYPES_t  autoVlanType,
open_buffdesc autoVlanOui,
open_buffdesc autoOuiDesc 
)

Adds Auto VLAN OUI entry.

Parameters
[in]client_handleclient handle from registration API
[in]autoVlanTypeAuto VLAN type
[in]autoVlanOuiAuto VLAN OUI Entry (string format. Example 0A020C)
[in]autoOuiDescAuto Vlan OUI description
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.25

Examples:
qos_auto_vlan_example.c.
open_error_t openapiQosAutoVlanOuiCountGet ( openapiClientHandle_t client_handle,
OPEN_AUTO_VLAN_TYPES_t  autoVlanType,
uint32_t *  autoVlanOuiCount 
)

Gets the count of OUIs already configured.

Parameters
[in]client_handleclient handle from registration API
[in]autoVlanTypeAuto VLAN type
[out]autoVlanOuiCountCount of OUIs configured.
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.25

Examples:
qos_auto_vlan_example.c.
open_error_t openapiQosAutoVlanOuiDescGet ( openapiClientHandle_t client_handle,
OPEN_AUTO_VLAN_TYPES_t  autoVlanType,
open_buffdesc autoVlanOui,
open_buffdesc autoOuiDesc 
)

Gets the autoVlan OUI description, given OUI entry string.

Parameters
[in]client_handleclient handle from registration API
[in]autoVlanTypeAuto VLAN type
[in]autoVlanOuiAuto VLAN OUI
[out]autoOuiDescAuto Vlan OUI description
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.25

Examples:
qos_auto_vlan_example.c.
open_error_t openapiQosAutoVlanOuiEntryGet ( openapiClientHandle_t client_handle,
OPEN_AUTO_VLAN_TYPES_t  autoVlanType,
uint32_t  currentIndex,
open_buffdesc autoVlanOui,
open_buffdesc autoOuiDesc 
)

Gets Auto VLAN OUI entry details.

Parameters
[in]client_handleclient handle from registration API
[in]autoVlanTypeAuto VLAN type
[in]currentIndexCurrent OUI Index.
[out]autoVlanOuiAuto VLAN OUI.
[out]autoOuiDescAuto Vlan OUI description
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.25

Examples:
qos_auto_vlan_example.c.
open_error_t openapiQosAutoVlanOuiEntryNextGet ( openapiClientHandle_t client_handle,
OPEN_AUTO_VLAN_TYPES_t  autoVlanType,
uint32_t  currentIndex,
uint32_t *  nextOuiIndex 
)

Gets Auto VLAN OUI next index.

Parameters
[in]client_handleclient handle from registration API
[in]autoVlanTypeAuto VLAN type
[in]currentIndexCurrent OUI Index.
[out]nextOuiIndexNext OUI index.
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.25

Examples:
qos_auto_vlan_example.c.
open_error_t openapiQosAutoVlanOuiFirstEntryGet ( openapiClientHandle_t client_handle,
OPEN_AUTO_VLAN_TYPES_t  autoVlanType,
uint32_t *  firstIndex 
)

Gets first Auto VLAN OUI Index.

Parameters
[in]client_handleclient handle from registration API
[in]autoVlanTypeAuto VLAN type
[out]firstIndexFirst valid OUI Index.
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.25

Examples:
qos_auto_vlan_example.c.
open_error_t openapiQosAutoVlanOuiRemove ( openapiClientHandle_t client_handle,
OPEN_AUTO_VLAN_TYPES_t  autoVlanType,
open_buffdesc autoVlanOui 
)

Removes Auto Vlan OUI entry.

Parameters
[in]client_handleclient handle from registration API
[in]autoVlanTypeAuto VLAN type
[in]autoVlanOuiAuto VLAN OUI Entry (string format. Example 0A020C)
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.25

Examples:
qos_auto_vlan_example.c.
open_error_t openapiQosAutoVlanPortStatusGet ( openapiClientHandle_t client_handle,
OPEN_AUTO_VLAN_TYPES_t  autoVlanType,
uint32_t  ifNum,
OPEN_CONTROL_t status 
)

Gets Auto VLAN operational port status.

Parameters
[in]client_handleclient handle from registration API
[in]autoVlanTypeAuto VLAN type
[in]ifNumInterface number.
[out]statusInterface Operational status Enable/Disable.
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.25

Examples:
qos_auto_vlan_example.c.
open_error_t openapiQosAutoVlanPriorityGet ( openapiClientHandle_t client_handle,
OPEN_AUTO_VLAN_TYPES_t  autoVlanType,
uint32_t *  autoVlanPriority 
)

Gets the Priority for Auto VLAN traffic on switch.

Parameters
[in]client_handleclient handle from registration API
[in]autoVlanTypeAuto VLAN type
[out]autoVlanPriorityAuto VLAN-Priority value configured on the switch for given Auto VLAN type.
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.25

Examples:
qos_auto_vlan_example.c.
open_error_t openapiQosAutoVlanPrioritySet ( openapiClientHandle_t client_handle,
OPEN_AUTO_VLAN_TYPES_t  autoVlanType,
uint32_t  autoVlanPriority 
)

Sets the Priority for Auto VLAN traffic on switch.

Parameters
[in]client_handleclient handle from registration API
[in]autoVlanTypeAuto VLAN type
[in]autoVlanPriorityAuto VLAN Priority to set on the switch for given Auto VLAN type.
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.25

Examples:
qos_auto_vlan_example.c.
open_error_t openapiQosAutoVlanValidIntfFirstGet ( openapiClientHandle_t client_handle,
uint32_t *  ifNum 
)

Get the first interface that is valid for Auto VLAN.

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

OpEN API Version: 1.25

Examples:
qos_auto_vlan_example.c.
open_error_t openapiQosAutoVlanValidIntfNextGet ( openapiClientHandle_t client_handle,
uint32_t  prevIfNum,
uint32_t *  nextIfNum 
)

Get the next interface that is valid for auto VLAN.

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

OpEN API Version: 1.25

Examples:
qos_auto_vlan_example.c.