This document provides a brief description of the QoS Auto VLAN OpEN APIs. It provides the following services:
- Gets the Auto VLAN global status.
- Enables or disables the Auto VLAN global status.
- Enables or disables the Auto VLAN status on interface.
- Gets the status of Auto VLAN on interface.
- Sets the VLAN for Auto VLAN traffic on switch.
- Gets the vlan Id configured for Auto VLAN type.
- Sets the Priority for Auto VLAN traffic on switch.
- Gets the Priority for Auto VLAN traffic on switch.
- Adds Auto VLAN OUI entry.
- Removes Auto Vlan OUI entry.
- Adds Auto VLAN OUI entry at particular Index.
- Removes Auto VLAN OUI entry at particular Index.
- Gets the count of OUIs already configured.
- Gets first Auto VLAN OUI index.
- Gets Auto VLAN OUI next index.
- Gets Auto VLAN OUI entry details.
- Gets the Auto VLAN OUI description, given OUI entry string.
- Determine if the interface is valid for Auto VLAN configuration.
- Get the first interface that is valid for Auto VLAN.
- Get the next interface that is valid for Auto VLAN.
- Gets Auto VLAN operational port status.
- Gets the count of devices learned for given Auto VLAN type.
- Gets the Auto VLAN learned entries.
Example C Application qos auto vlan_example
Initialization
In the main function, the sample application initializes the OpEN API RPC service by calling openapiClientRegister() and waits for the RPC service in switchdrvr to start. A Client Handle is returned by openapiClientRegister() which is used while invoking the OpEN APIs. The application then exercises the associated OpEN APIs and logs informational and/or error messages on the console. The example application runs to its completion and exits.
qos auto vlan_example
auto vlan_example.c is a sample application that demonstrates the use of OpEN's QoS Auto VLAN APIs. qos auto vlan_example is started from the command line and can be used to exercise the various APIs by specifying arguments on the command line.
Sample Output
- Usage: ./qos auto vlan_example <test#> <arg1> <arg2> ...
- Test 1: Gets the Auto VLAN global status: qos auto vlan_example 1 <autoVlanType><mode>
- Test 2: Enables or disables the Auto VLAN global status: qos auto vlan_example 2 <autoVlanType> <mode>
- Test 3: Enables or disables the Auto VLAN status on interface: qos auto vlan_example 3 <autoVlanType> <ifNum> <mode>
- Test 4: Gets the status of Auto VLAN on interface: qos auto vlan_example 4 <autoVlanType> <ifNum>
- Test 5: Sets the VLAN for Auto VLAN traffic on switch: qos auto vlan_example 5 <autoVlanType> <vlanId>
- Test 6: Gets the vlan Id configured for Auto VLAN type: qos auto vlan_example 6 <autoVlanType> <vlanId>
- Test 7: Sets the Priority for Auto VLAN traffic on switch: qos auto vlan_example 7 <autoVlanType> <autoVlanPriority>
- Test 8: Gets the Priority for Auto VLAN traffic on switch: qos auto vlan_example 8 <autoVlanType> <autoVlanPriority>
- Test 9: Adds Auto VLAN OUI entry: qos auto vlan_example 9 <autoVlanType> <autoVlanOui> <autoOuiDesc>
- Test 10: Removes Auto Vlan OUI entry: qos auto vlan_example 10 <autoVlanType> <autoVlanOui>
- Test 11: Adds Auto VLAN OUI entry at particular Index: qos auto vlan_example 11 <autoVlanType> <ouiIndex> <autoVlanOui> <autoOuiDesc>
- Test 12: Removes Auto VLAN OUI entry at particular Index: qos auto vlan_example 12 <ouiIndex>
- Test 13: Gets the count of OUIs already configured: qos auto vlan_example 13 <autoVlanType>
- Test 14: Gets first Auto VLAN OUI index: qos auto vlan_example 14 <autoVlanType> <firstIndex>
- Test 15: Gets Auto VLAN OUI next index: qos auto vlan_example 15 <autoVlanType> <currentIndex>
- Test 16: Gets Auto VLAN OUI entry details: qos auto vlan_example 16 <autoVlanType> <currentIndex>
- Test 17: Gets the Auto VLAN OUI description, given OUI entry string: qos auto vlan_example 17 <autoVlanType> <autoVlanOui>
- Test 18: Determine if the interface is valid for Auto VLAN configuration: qos auto vlan_example 18 <ifNum>
- Test 19: Get the first interface that is valid for Auto VLAN: qos auto vlan_example 19 <ifNum>
- Test 20: Get the next interface that is valid for Auto VLAN: qos auto vlan_example 20 <prevIfNum> <nextIfNum>
- Test 21: Gets Auto VLAN operational port status: qos auto vlan_example 21 <autoVlanType> <ifNum>
- Test 22: Gets the count of devices learned for given Auto VLAN type: qos auto vlan_example 22 <autoVlanType>
- Test 23: Run API sanity checks: qos auto vlan_example 23
- Test 24: Gets the Auto VLAN learned entries: qos auto vlan_example 24
QoS Auto VLAN CLI/API Cross Reference