This document provides a brief description of the QinQ Configuration and Status OpEN APIs. It provides the following services:
- Create a new DOT1AD service.
- Delete an existing DOT1AD service.
- Get the First service index created in the system.
- Given serviceIndex, get the next service index.
- Add the name to the service.
- Get the name of the service for a given service VLAN ID.
- Checks if the service name is a valid string.
- Get the VLAN ID of a service, given its name.
- Get the information if specified VLAN ID is configured as a DOT1AD service VLAN.
- Get the information if specified VLAN ID is configured as isolate VLAN.
- Set the service type for a given DOT1AD service.
- Set the isolated VLAN ID for E-TREE service.
- Get the service type for a given DOT1AD service.
- Get/Set the NNI Intf List for a given DOT1AD service.
- Add/Delete a subscription to/from a given DOT1AD service on a given interface.
- Reserve current subscription structure for given internal interface number and DOT1AD service VLAN ID.
- Remove current subscription structure from given internal interface number and DOT1AD service VLAN ID.
- Get/Set the name for a DOT1AD service subscription.
- Get/Set the matching Packet type for a DOT1AD subscription.
- Set the Service VLAN ID for a DOT1AD subscription.
- Get/Set the matching Customer VLAN ID for a DOT1AD subscription.
- Get/Set the matching Service VLAN ID for a DOT1AD subscription.
- Get/Set the matching dot1p priority for a DOT1AD subscription.
- Get the first subscribers entry based on interface number.
- Given subscribers entry, get the next subscribers entry.
- Given interface number, service VLAN ID and Customer VLAN ID get the next subscribers entry.
- Set the resulting Customer VLAN ID for a DOT1AD subscription.
- Get/Set the remove CTAG action for a DOT1AD subscription.
- Get/Set the NNI Interface List for a given DOT1AD service subscription.
- Get/Set the DOT1AD interface type.
- Get the Internal Interface Number of the next valid DOT1AD port.
- Get/Set the DOT1AD interface's preserve CVLAN-dot1p property.
All 'Set' operations would affect the Switch behavior and configuration.
Example C Application dot1ad_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.
dot1ad_example
dot1ad_example.c is a sample application that demonstrates the use of the DOT1AD OpEN API. dot1ad_example is started from the command line and create VLAN, switch it to e-line mode and create DOT1AD service.