Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.12.0.1
Data Structures | Macros | Enumerations | Functions
VLAN Configuration And Status [OPENAPI_VLAN]

Data Structures

struct  OPEN_VLAN_LIST_t
 

Macros

#define OPEN_DOT1Q_TAGGED   1
 
#define OPEN_DOT1Q_UNTAGGED   0
 
#define OPEN_VLAN_LIST_MAX_ENTRIES   4096
 VLAN list.
 

Enumerations

enum  OPEN_DOT1Q_PVLAN_PORT_TYPE_t { OPEN_PRIVATE_VLAN_UNCONFIGURED_PORT, OPEN_PRIVATE_VLAN_HOST_PORT, OPEN_PRIVATE_VLAN_COMMUNITY_PORT, OPEN_PRIVATE_VLAN_PROMISCOUS_PORT }
 
enum  OPEN_DOT1Q_PVLAN_TYPE_t { OPEN_PRIVATE_VLAN_UNCONFIGURED = 0, OPEN_PRIVATE_VLAN_PRIMARY, OPEN_PRIVATE_VLAN_SECONDARY_ISOLATED, OPEN_PRIVATE_VLAN_SECONDARY_COMMUNITY }
 
enum  OPEN_DOT1Q_SWPORT_MODE_t {
  OPEN_DOT1Q_SWPORT_MODE_NONE = 0, OPEN_DOT1Q_SWPORT_MODE_GENERAL = 1, OPEN_DOT1Q_SWPORT_MODE_ACCESS = 2, OPEN_DOT1Q_SWPORT_MODE_TRUNK = 3,
  OPEN_DOT1Q_SWPORT_MODE_PRIVATE_HOST = 4, OPEN_DOT1Q_SWPORT_MODE_PRIVATE_PROMISC = 5, OPEN_DOT1Q_SWPORT_MODE_PRIVATE_PROMISC_TRUNK = 6, OPEN_DOT1Q_SWPORT_MODE_PRIVATE_ISOLATED_TRUNK = 7,
  OPEN_DOT1Q_SWPORT_MODE_AUTO_TRUNK = 8
}
 < Dot1q port modes. More...
 
enum  OPEN_DOT1Q_VLAN_TYPE_t {
  OPEN_DOT1Q_VLAN_TYPE_NOT_PARTICIPATING, OPEN_DOT1Q_VLAN_TYPE_DEFAULT, OPEN_DOT1Q_VLAN_TYPE_ADMIN, OPEN_DOT1Q_VLAN_TYPE_GVRP_REGISTERED,
  OPEN_DOT1Q_VLAN_TYPE_WS_L2_TNNL_REGISTERED, OPEN_DOT1Q_VLAN_TYPE_IP_INTERNAL_VLAN, OPEN_DOT1Q_VLAN_TYPE_AUTHMGR_REGISTERED, OPEN_DOT1Q_VLAN_TYPE_MVRP_REGISTERED,
  OPEN_DOT1Q_VLAN_TYPE_OPENFLOW_REGISTERED, OPEN_DOT1Q_VLAN_TYPE_AUTO_VIDEO_REGISTERED, OPEN_DOT1Q_VLAN_TYPE_EVC_REGISTERED, OPEN_DOT1Q_VLAN_TYPE_PBB_REGISTERED
}
 

Functions

open_error_t openapiDot1qApiPrivateVlanAssocAdd (openapiClientHandle_t *client_handle, uint32_t vlanId, OPEN_VLAN_LIST_t vidList)
 Setup a VLAN bindings for private VLAN domain. More...
 
open_error_t openapiDot1qApiPrivateVlanAssocRemove (openapiClientHandle_t *client_handle, uint32_t vlanId, OPEN_VLAN_LIST_t vidList)
 Remove VLAN bindings for private VLAN domain. More...
 
open_error_t openapiDot1qIntfPVlanHostAssocSet (openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t primary_vlan, uint32_t sec_vlan)
 Set VLAN bindings for private VLAN interface. More...
 
open_error_t openapiDot1qIntfPVlanPromiscAssocSet (openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t primary_vlan, OPEN_VLAN_LIST_t vidList)
 Set VLAN bindings for private VLAN interface. More...
 
open_error_t openapiDot1qMaxSupportedVlansGet (openapiClientHandle_t *client_handle, uint32_t *val)
 Get dot1q Max Supported VLANs. More...
 
open_error_t openapiDot1qOperAutoTrunkModeGet (openapiClientHandle_t *client_handle, uint32_t intIfNum, OPEN_BOOL_t *autoTrunkOperMode)
 Get the operational auto-trunk mode of the interface. More...
 
open_error_t openapiDot1qPortIngressFiltering (openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *val)
 Get VLAN ingress filtering status per port. More...
 
open_error_t openapiDot1qPrivateVlanAssociationGet (openapiClientHandle_t *client_handle, uint32_t vlanId, OPEN_VLAN_LIST_t *vidList)
 Get VLAN bindings for private VLAN domain. More...
 
open_error_t openapiDot1qPrivateVlanEnable (openapiClientHandle_t *client_handle, uint32_t vlanId, OPEN_DOT1Q_PVLAN_TYPE_t pvlanType)
 Setup a VLAN as private VLAN. More...
 
open_error_t openapiDot1qPrivateVlanGet (openapiClientHandle_t *client_handle, uint32_t vlanId, OPEN_DOT1Q_PVLAN_TYPE_t *pvlanType)
 Get the configured private VLAN type. More...
 
open_error_t openapiDot1qPVlanIntfHostAssocRemove (openapiClientHandle_t *client_handle, uint32_t ifNum)
 Clear VLAN bindings for private VLAN interface. More...
 
open_error_t openapiDot1qPVlanIntfPromiscAssocRemove (openapiClientHandle_t *client_handle, uint32_t ifNum)
 Clear VLAN bindings for private VLAN interface. More...
 
open_error_t openapiDot1qRxPacketsNotForwardedCountGet (openapiClientHandle_t *client_handle, uint32_t ifNum, uint64_t *totalRxPktsNotForwarded)
 Get the total number of received packets that are not forwarded of the interafce. More...
 
open_error_t openapiDot1qSwPortAccessVlanGet (openapiClientHandle_t *client_handle, uint32_t intf, uint32_t *vlanId)
 Get the Access VLAN ID for a port. More...
 
open_error_t openapiDot1qSwPortAccessVlanSet (openapiClientHandle_t *client_handle, uint32_t intf, uint32_t vlanId)
 Set the Access VLAN ID for a port. More...
 
open_error_t openapiDot1qSwPortDynamicallyAddedVlanListGet (openapiClientHandle_t *client_handle, uint32_t intf, OPEN_VLAN_LIST_t *vidList)
 Get the dynamically added VLAN list for the interface when the interface is in general mode. More...
 
open_error_t openapiDot1qSwPortForbiddenVlanListGet (openapiClientHandle_t *client_handle, uint32_t intf, OPEN_VLAN_LIST_t *vidList)
 Get the forbidden VLAN list for the interface when the interface is in general mode. More...
 
open_error_t openapiDot1qSwPortModeGet (openapiClientHandle_t *client_handle, uint32_t intf, OPEN_DOT1Q_SWPORT_MODE_t *mode)
 Get the Switchport Configuration Mode for a port. More...
 
open_error_t openapiDot1qSwPortModeSet (openapiClientHandle_t *client_handle, uint32_t intf, OPEN_DOT1Q_SWPORT_MODE_t mode)
 Set the Switchport Configuration Mode for a port. More...
 
open_error_t openapiDot1qSwPortTaggedVlanListGet (openapiClientHandle_t *client_handle, uint32_t intf, OPEN_VLAN_LIST_t *vidList)
 Get the tagged VLAN list for the interface when the interface is in general mode. More...
 
open_error_t openapiDot1qSwPortTrunkAllowedVlanListGet (openapiClientHandle_t *client_handle, uint32_t intf, OPEN_VLAN_LIST_t *vidList)
 Get the list of VLANs allowed on an interface when the interface is in trunking mode. More...
 
open_error_t openapiDot1qSwPortTrunkAllowedVlanListSet (openapiClientHandle_t *client_handle, uint32_t intf, OPEN_VLAN_LIST_t *vidList)
 Set the list of VLANs allowed on an interface when the interface is in trunking mode. More...
 
open_error_t openapiDot1qSwPortTrunkNativeVlanGet (openapiClientHandle_t *client_handle, uint32_t intf, uint32_t *vlanId)
 Get the Native VLAN ID for a port when in trunking mode. More...
 
open_error_t openapiDot1qSwPortTrunkNativeVlanSet (openapiClientHandle_t *client_handle, uint32_t intf, uint32_t vlanId)
 Set the native VLAN ID for a port when in trunking mode. More...
 
open_error_t openapiDot1qSwPortUntaggedVlanListGet (openapiClientHandle_t *client_handle, uint32_t intf, OPEN_VLAN_LIST_t *vidList)
 Get the untagged VLAN list for the interface when the interface is in general mode. More...
 
open_error_t openapiDot1qVlanNumDeletesGet (openapiClientHandle_t *client_handle, uint32_t *val)
 Get the number of times a VLAN entry has been deleted from DOT1Q table. More...
 
open_error_t openapiDynamicVlanEntriesGet (openapiClientHandle_t *client_handle, uint32_t *val)
 Get the number of dynamic VLANs. More...
 
open_error_t openapiMostVlanEntriesGet (openapiClientHandle_t *client_handle, uint32_t *val)
 Get the max VLAN entries allowed. More...
 
open_error_t openapiNextVlanGet (openapiClientHandle_t *client_handle, uint32_t vid, uint32_t *nextVid)
 Gets the next VLAN ID. More...
 
open_error_t openapiPvlanIntfHostAssocGet (openapiClientHandle_t *client_handle, uint32_t intf, uint32_t *primaryVid, uint32_t *secondaryVid)
 Get the private VLAN association for a host mode interface. More...
 
open_error_t openapiPvlanIntfIsolatedTrunkAssocNextGet (openapiClientHandle_t *client_handle, uint32_t intf, uint32_t primaryVid, uint32_t *nextPrimaryVid, uint32_t *secondaryVid)
 Get the next primary VLAN and any associated secondary VLAN for an isolated trunk interface in a private VLAN. More...
 
open_error_t openapiPvlanIntfModeGet (openapiClientHandle_t *client_handle, uint32_t intf, OPEN_DOT1Q_SWPORT_MODE_t *mode)
 Get the private VLAN mode for an interface. More...
 
open_error_t openapiPvlanIntfOperAssocGet (openapiClientHandle_t *client_handle, uint32_t intf, OPEN_VLAN_LIST_t *operationalVidList)
 Get the list of operational VLAN(s) for a private VLAN interface. More...
 
open_error_t openapiPvlanIntfPromiscAssocGet (openapiClientHandle_t *client_handle, uint32_t intf, uint32_t *primaryVid, OPEN_VLAN_LIST_t *secondaryVidList)
 Get the private VLAN association for a promiscuous mode interface. More...
 
open_error_t openapiPvlanIntfPromiscTrunkAssocNextGet (openapiClientHandle_t *client_handle, uint32_t intf, uint32_t primaryVid, uint32_t *nextPrimaryVid, OPEN_VLAN_LIST_t *secondaryVidList)
 Get the next primary VLAN and any associated secondary VLAN(s) for a promiscuous trunk interface in a private VLAN. More...
 
open_error_t openapiPvlanIntfTrunkAllowedVlanListGet (openapiClientHandle_t *client_handle, uint32_t intf, OPEN_VLAN_LIST_t *normalVidList)
 Get the list of normal VLAN(s) carried by a promiscuous or isolated trunk interface in a private VLAN. More...
 
open_error_t openapiPvlanIntfTrunkNativeVlanGet (openapiClientHandle_t *client_handle, uint32_t intf, uint32_t *nativeVid)
 Get the native VLAN for a promiscuous or isolated trunk interface in a private VLAN. More...
 
open_error_t openapiQportsCurrentIngressFilteringGet (openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *val)
 Get the Current Ingress Filtering configuration for a port. More...
 
open_error_t openapiQportsEnableIngressFilteringGet (openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *val)
 Get the Ingress Filtering configuration for a port. More...
 
open_error_t openapiQportsEnableIngressFilteringSet (openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t mode)
 Set the Ingress Filtering configuration for a port. More...
 
open_error_t openapiStaticVlanEntriesGet (openapiClientHandle_t *client_handle, uint32_t *val)
 Get the number of static VLANs. More...
 
open_error_t openapiVlanCreate (openapiClientHandle_t *client_handle, uint32_t vlanNum)
 Creates the VLAN with the ID specified on the switch. More...
 
open_error_t openapiVlanCreatedCheck (openapiClientHandle_t *client_handle, uint32_t vlanNum)
 Test if the given VLAN has been configured on the switch. More...
 
open_error_t openapiVlanDelete (openapiClientHandle_t *client_handle, uint32_t vlanNum)
 Deletes the VLAN with the ID specified on the switch. More...
 
open_error_t openapiVlanGlobalAutoTrunkGet (openapiClientHandle_t *client_handle, OPEN_CONTROL_t *adminMode)
 Get the Auto-Trunk administrative mode. More...
 
open_error_t openapiVlanGlobalAutoTrunkSet (openapiClientHandle_t *client_handle, OPEN_CONTROL_t adminMode)
 Set the Auto-Trunk administrative mode. More...
 
open_error_t openapiVlanIfAcceptFrameTypeGet (openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_DOT1Q_ACCEPT_FRAME_TYPE_t *type)
 Get the Acceptable Frame Type configuration for a port. More...
 
open_error_t openapiVlanIfAcceptFrameTypeSet (openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_DOT1Q_ACCEPT_FRAME_TYPE_t type)
 Set the Acceptable Frame Type configuration for a port. More...
 
open_error_t openapiVlanIfDefaultUserPriorityGet (openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *priority)
 Gets an interface's default user priority. More...
 
open_error_t openapiVlanIfDefaultUserPrioritySet (openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t priority)
 Sets an interface's default user priority. More...
 
open_error_t openapiVlanIfNumTrafficClassesGet (openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *numTrafficClasses)
 Gets an interface's number of traffic classes supported. More...
 
open_error_t openapiVlanIfParticipationGet (openapiClientHandle_t *client_handle, uint32_t vlanNum, uint32_t ifNum, OPEN_VLAN_PARTICIPATION_MODE_t *participationMode)
 Gets an interface's configured participation mode for the specified VLAN. More...
 
open_error_t openapiVlanIfParticipationSet (openapiClientHandle_t *client_handle, uint32_t vlanNum, uint32_t ifNum, OPEN_VLAN_PARTICIPATION_MODE_t participationMode)
 Sets an interface's participation mode configuration for the specified VLAN. More...
 
open_error_t openapiVlanIfParticipationStatusGet (openapiClientHandle_t *client_handle, uint32_t vlanNum, uint32_t ifNum, uint32_t *participating)
 Gets an interface's participation status for the specified VLAN. More...
 
open_error_t openapiVlanIfPvidGet (openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *vlanNum)
 Gets an interface's PVID. More...
 
open_error_t openapiVlanIfPvidSet (openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t vlanNum)
 Sets an interface's VLAN ID (PVID). More...
 
open_error_t openapiVlanIfTaggingGet (openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t vlanNum, OPEN_CONTROL_t *tagging)
 Gets an interface's tagging setting for the specified VLAN. More...
 
open_error_t openapiVlanIfTaggingSet (openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t vlanNum, OPEN_CONTROL_t tagging)
 Sets an interface's tagging mode for the given VLAN. More...
 
int openapiVlanIsStatic (openapiClientHandle_t *client_handle, uint32_t vlanNum)
 Returns whether the VLAN is static. More...
 
open_error_t openapiVlanMacAdd (openapiClientHandle_t *client_handle, open_buffdesc *mac, uint32_t vlanId)
 To add a mac to a VLAN. More...
 
open_error_t openapiVlanMacDelete (openapiClientHandle_t *client_handle, open_buffdesc *mac, uint32_t vlanId)
 To delete a mac from a VLAN. More...
 
open_error_t openapiVlanMacGet (openapiClientHandle_t *client_handle, open_buffdesc *mac, uint32_t *vlanId)
 To get the details of the mac vlan entry. More...
 
open_error_t openapiVlanMacGetNext (openapiClientHandle_t *client_handle, open_buffdesc *mac, open_buffdesc *nextmac, uint32_t *nextvlanId)
 Gets the next MAC vlan entry details of a given MAC. More...
 
open_error_t openapiVlanNameGet (openapiClientHandle_t *client_handle, uint32_t vlanNum, open_buffdesc *vlanName)
 Gets the VLAN Name. More...
 
open_error_t openapiVlanNameLenGet (openapiClientHandle_t *client_handle, uint32_t *strLen)
 Gets the VLAN Name string length. More...
 
open_error_t openapiVlanNameSet (openapiClientHandle_t *client_handle, uint32_t vlanNum, open_buffdesc *vlanName)
 Configures a VLAN Name. More...
 
open_error_t openapiVlanNextChangedGet (openapiClientHandle_t *client_handle, uint32_t vlanNum, uint32_t *nextVlanNum, uint32_t *delete_pending)
 Gets the next VLAN which has a pending change or a pending deletion. More...
 
open_error_t openapiVlanNextGet (openapiClientHandle_t *client_handle, uint32_t vlanNum, uint32_t *nextVlanNum)
 Gets the next VLAN number that has been configured on the switch. More...
 
open_error_t openapiVlanTaggedSetGet (openapiClientHandle_t *client_handle, uint32_t vlanId, uint32_t ifNum, uint32_t *val)
 Get the tagging configuration of a port. More...
 
open_error_t openapiVlanTypeGet (openapiClientHandle_t *client_handle, uint32_t vlanNum, OPEN_DOT1Q_VLAN_TYPE_t *vlanType)
 Gets the VLAN type for the specified VLAN. More...
 
open_error_t openapiVlanVIDListGet (openapiClientHandle_t *client_handle, uint32_t intfNum, OPEN_VLAN_LIST_t *data, uint32_t *numOfElements)
 Get a list of VLANs an interface is a member of. More...
 

Detailed Description

Enumeration Type Documentation

Enumerator
OPEN_PRIVATE_VLAN_UNCONFIGURED_PORT 

Unconfigured port.

OPEN_PRIVATE_VLAN_HOST_PORT 

Host port.

OPEN_PRIVATE_VLAN_COMMUNITY_PORT 

Community port.

OPEN_PRIVATE_VLAN_PROMISCOUS_PORT 

Promiscous port.

Definition at line 81 of file openapi_vlan.h.

Enumerator
OPEN_PRIVATE_VLAN_UNCONFIGURED 

Unconfigured.

OPEN_PRIVATE_VLAN_PRIMARY 

Primary.

OPEN_PRIVATE_VLAN_SECONDARY_ISOLATED 

Secondary isolated.

OPEN_PRIVATE_VLAN_SECONDARY_COMMUNITY 

Secondary community.

Definition at line 71 of file openapi_vlan.h.

< Dot1q port modes.

Enumerator
OPEN_DOT1Q_SWPORT_MODE_NONE 

This is used by applications like gvrp who do not care about the mode.

OPEN_DOT1Q_SWPORT_MODE_GENERAL 

Switchport general mode.

OPEN_DOT1Q_SWPORT_MODE_ACCESS 

Switchport access mode.

OPEN_DOT1Q_SWPORT_MODE_TRUNK 

Switchport trunk mode.

OPEN_DOT1Q_SWPORT_MODE_PRIVATE_HOST 

Switchport private host mode.

OPEN_DOT1Q_SWPORT_MODE_PRIVATE_PROMISC 

Switchport private promisc mode.

OPEN_DOT1Q_SWPORT_MODE_PRIVATE_PROMISC_TRUNK 

Switchport private promisc trunk mode.

OPEN_DOT1Q_SWPORT_MODE_PRIVATE_ISOLATED_TRUNK 

Switchport private isolated trunk mode.

OPEN_DOT1Q_SWPORT_MODE_AUTO_TRUNK 

Switchport auto trunk mode.

Definition at line 48 of file openapi_vlan.h.

Enumerator
OPEN_DOT1Q_VLAN_TYPE_NOT_PARTICIPATING 

Not Participating.

OPEN_DOT1Q_VLAN_TYPE_DEFAULT 

Default VLAN, always valued at 1.

OPEN_DOT1Q_VLAN_TYPE_ADMIN 

Administratively configured, static VLAN.

OPEN_DOT1Q_VLAN_TYPE_GVRP_REGISTERED 

Dynamically configured GVRP VLAN.

OPEN_DOT1Q_VLAN_TYPE_WS_L2_TNNL_REGISTERED 

Dynamically configured L2 Tunnel VLAN.

OPEN_DOT1Q_VLAN_TYPE_IP_INTERNAL_VLAN 

Dynamically configured IP internal VLAN.

OPEN_DOT1Q_VLAN_TYPE_AUTHMGR_REGISTERED 

Dynamically configured Auth manager/DOT1X VLAN.

OPEN_DOT1Q_VLAN_TYPE_MVRP_REGISTERED 

Dynamically configured MVRP VLAN.

OPEN_DOT1Q_VLAN_TYPE_OPENFLOW_REGISTERED 

Dynamically configured OPENFLOW VLAN.

OPEN_DOT1Q_VLAN_TYPE_AUTO_VIDEO_REGISTERED 

Auto-Video VLAN.

OPEN_DOT1Q_VLAN_TYPE_EVC_REGISTERED 

EVC VLAN.

OPEN_DOT1Q_VLAN_TYPE_PBB_REGISTERED 

PBB VLAN.

Definition at line 90 of file openapi_vlan.h.

Function Documentation

open_error_t openapiDot1qApiPrivateVlanAssocAdd ( openapiClientHandle_t client_handle,
uint32_t  vlanId,
OPEN_VLAN_LIST_t  vidList 
)

Setup a VLAN bindings for private VLAN domain.

Parameters
[in]client_handleclient handle from registration API
[in]vlanIdVLAN ID
[in]vidListSecondary VLAN list
Return values
OPEN_E_NONESet successful.
OPEN_E_FAILSet failed.
OPEN_E_PARAMError in parameter passed.
OPEN_E_INTERNALOther Internal Failure.

OpEN API Version: 1.19

Examples:
vlan_example.c.
open_error_t openapiDot1qApiPrivateVlanAssocRemove ( openapiClientHandle_t client_handle,
uint32_t  vlanId,
OPEN_VLAN_LIST_t  vidList 
)

Remove VLAN bindings for private VLAN domain.

Parameters
[in]client_handleclient handle from registration API
[in]vlanIdVLAN ID
[in]vidListSecondary VLAN list
Return values
OPEN_E_NONESet successful.
OPEN_E_FAILSet failed.
OPEN_E_PARAMError in parameter passed.
OPEN_E_INTERNALOther Internal Failure.

OpEN API Version: 1.19

Examples:
vlan_example.c.
open_error_t openapiDot1qIntfPVlanHostAssocSet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
uint32_t  primary_vlan,
uint32_t  sec_vlan 
)

Set VLAN bindings for private VLAN interface.

Parameters
[in]client_handleclient handle from registration API
[in]ifNuminternal interface number
[in]primary_vlanprimary VLAN ID
[in]sec_vlanSecondary VLAN ID
Return values
OPEN_E_NONESet successful.
OPEN_E_FAILSet failed.
OPEN_E_PARAMError in parameter passed.
OPEN_E_INTERNALOther Internal Failure.

OpEN API Version: 1.19

Examples:
vlan_example.c.
open_error_t openapiDot1qIntfPVlanPromiscAssocSet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
uint32_t  primary_vlan,
OPEN_VLAN_LIST_t  vidList 
)

Set VLAN bindings for private VLAN interface.

Parameters
[in]client_handleclient handle from registration API
[in]ifNuminternal interface number
[in]primary_vlanprimary VLAN ID
[in]vidListSecondary VLAN ID List
Return values
OPEN_E_NONESet successful.
OPEN_E_FAILSet failed.
OPEN_E_PARAMError in parameter passed.
OPEN_E_INTERNALOther Internal Failure.

OpEN API Version: 1.19

Examples:
vlan_example.c.
open_error_t openapiDot1qMaxSupportedVlansGet ( openapiClientHandle_t client_handle,
uint32_t *  val 
)

Get dot1q Max Supported VLANs.

Parameters
[in]client_handleclient handle from registration API
[out]valmax supported VLAN count
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
vlan_example.c.
open_error_t openapiDot1qOperAutoTrunkModeGet ( openapiClientHandle_t client_handle,
uint32_t  intIfNum,
OPEN_BOOL_t autoTrunkOperMode 
)

Get the operational auto-trunk mode of the interface.

Parameters
[in]client_handleclient handle from registration API.
[in]intIfNuminternal interface number.
[out]autoTrunkOperModeoperational auto-trunk mode.
Return values
OPEN_E_NONEOperational auto-trunk get successfully.
OPEN_E_FAILFailed to get operational auto-trunk mode.
OPEN_E_PARAMError in parameter passed.
OPEN_E_UNAVAILAuto-Trunk Feature not present.
OPEN_E_INTERNALInternal application failure.

OpEN API Version: 1.26

Examples:
vlan_example.c.
open_error_t openapiDot1qPortIngressFiltering ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
uint32_t *  val 
)

Get VLAN ingress filtering status per port.

Parameters
[in]client_handleclient handle from registration API
[in]ifNuminternal interface number of physical or logical interface
[out]valingress filter mode - enable (1) or disable (0)
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
vlan_example.c.
open_error_t openapiDot1qPrivateVlanAssociationGet ( openapiClientHandle_t client_handle,
uint32_t  vlanId,
OPEN_VLAN_LIST_t vidList 
)

Get VLAN bindings for private VLAN domain.

Parameters
[in]client_handleclient handle from registration API
[in]vlanIdVLAN ID
[out]vidListSecondary VLAN list
Return values
OPEN_E_NONEGet successful.
OPEN_E_FAILGet failed.
OPEN_E_PARAMError in parameter passed.
OPEN_E_INTERNALOther Internal Failure.

OpEN API Version: 1.19

Examples:
vlan_example.c.
open_error_t openapiDot1qPrivateVlanEnable ( openapiClientHandle_t client_handle,
uint32_t  vlanId,
OPEN_DOT1Q_PVLAN_TYPE_t  pvlanType 
)

Setup a VLAN as private VLAN.

Parameters
[in]client_handleclient handle from registration API
[in]vlanIdVLAN ID
[in]pvlanTypeprivate VLAN type
Return values
OPEN_E_NONESet successful.
OPEN_E_FAILSet failed.
OPEN_E_PARAMError in parameter passed.
OPEN_E_INTERNALOther Internal Failure.

OpEN API Version: 1.19

Examples:
vlan_example.c.
open_error_t openapiDot1qPrivateVlanGet ( openapiClientHandle_t client_handle,
uint32_t  vlanId,
OPEN_DOT1Q_PVLAN_TYPE_t pvlanType 
)

Get the configured private VLAN type.

Parameters
[in]client_handleclient handle from registration API
[in]vlanIdVLAN ID
[out]pvlanTypeprivate VLAN type
Return values
OPEN_E_NONEGet successful.
OPEN_E_FAILGet failed.
OPEN_E_PARAMError in parameter passed.
OPEN_E_INTERNALOther Internal Failure.

OpEN API Version: 1.19

Examples:
vlan_example.c.
open_error_t openapiDot1qPVlanIntfHostAssocRemove ( openapiClientHandle_t client_handle,
uint32_t  ifNum 
)

Clear VLAN bindings for private VLAN interface.

Parameters
[in]client_handleclient handle from registration API
[in]ifNuminternal interface number
Return values
OPEN_E_NONESet successful.
OPEN_E_FAILSet failed.
OPEN_E_PARAMError in parameter passed.
OPEN_E_INTERNALOther Internal Failure.

OpEN API Version: 1.19

Examples:
vlan_example.c.
open_error_t openapiDot1qPVlanIntfPromiscAssocRemove ( openapiClientHandle_t client_handle,
uint32_t  ifNum 
)

Clear VLAN bindings for private VLAN interface.

Parameters
[in]client_handleclient handle from registration API
[in]ifNuminternal interface number
Return values
OPEN_E_NONESet successful.
OPEN_E_FAILSet failed.
OPEN_E_PARAMError in parameter passed.
OPEN_E_INTERNALOther Internal Failure.

OpEN API Version: 1.19

Examples:
vlan_example.c.
open_error_t openapiDot1qRxPacketsNotForwardedCountGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
uint64_t *  totalRxPktsNotForwarded 
)

Get the total number of received packets that are not forwarded of the interafce.

Parameters
[in]client_handleClient handle from registration API.
[in]ifNumInternal interface number
[out]totalRxPktsNotForwardedTotal number of received packets that are not forwarded.
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
OPEN_E_NOT_FOUNDIf this Counter is not supported.

OpEN API Version: 1.26

Examples:
vlan_example.c.
open_error_t openapiDot1qSwPortAccessVlanGet ( openapiClientHandle_t client_handle,
uint32_t  intf,
uint32_t *  vlanId 
)

Get the Access VLAN ID for a port.

Parameters
[in]client_handleClient handle from registration API
[in]intfInterface Number
-Minimum value 1
-Maximum value openapiMaxInterfaceCountGet()
[out]vlanIdStorage for VLAN ID
Return values
OPEN_E_NONEif Access VLAN get is successful.
OPEN_E_FAILif Access VLAN get failed.
OPEN_E_PARAMinvalid parameter(s)

OpEN API Version: 1.11

Examples:
switchport_config_example.c.
open_error_t openapiDot1qSwPortAccessVlanSet ( openapiClientHandle_t client_handle,
uint32_t  intf,
uint32_t  vlanId 
)

Set the Access VLAN ID for a port.

Parameters
[in]client_handleClient handle from registration API
[in]intfInterface Number
-Minimum value 1
-Maximum value openapiMaxInterfaceCountGet()
[in]vlanIdVLAN ID to be set
Return values
OPEN_E_NONEif Access VLAN set is successful.
OPEN_E_FAILif Access VLAN set failed.
OPEN_E_PARAMinvalid parameter(s)

OpEN API Version: 1.11

Examples:
switchport_config_example.c.
open_error_t openapiDot1qSwPortDynamicallyAddedVlanListGet ( openapiClientHandle_t client_handle,
uint32_t  intf,
OPEN_VLAN_LIST_t vidList 
)

Get the dynamically added VLAN list for the interface when the interface is in general mode.

Parameters
[in]client_handleClient handle from registration API
[in]intfInterface Number
[out]vidListVLAN ID List
Return values
OPEN_E_NONEif Dynamically Added VLAN list get is successful.
OPEN_E_FAILif Dynamically Added VLAN list get failed.
OPEN_E_PARAMinvalid parameter(s)

OpEN API Version: 1.11

open_error_t openapiDot1qSwPortForbiddenVlanListGet ( openapiClientHandle_t client_handle,
uint32_t  intf,
OPEN_VLAN_LIST_t vidList 
)

Get the forbidden VLAN list for the interface when the interface is in general mode.

Parameters
[in]client_handleClient handle from registration API
[in]intfInterface Number
[out]vidListVLAN ID List
Return values
OPEN_E_NONEif Forbidden VLAN list get is successful.
OPEN_E_FAILif Forbidden VLAN list get failed.
OPEN_E_PARAMinvalid parameter(s)

OpEN API Version: 1.11

open_error_t openapiDot1qSwPortModeGet ( openapiClientHandle_t client_handle,
uint32_t  intf,
OPEN_DOT1Q_SWPORT_MODE_t mode 
)

Get the Switchport Configuration Mode for a port.

Parameters
[in]client_handleClient handle from registration API
[in]intfInterface Number
-Minimum value 1
-Maximum value openapiMaxInterfaceCountGet()
[out]modeSwitchport Mode
Return values
OPEN_E_NONEif Switchport Mode get is successful.
OPEN_E_FAILif Switchport Mode get failed.
OPEN_E_PARAMinvalid parameter(s)

OpEN API Version: 1.11

Examples:
switchport_config_example.c.
open_error_t openapiDot1qSwPortModeSet ( openapiClientHandle_t client_handle,
uint32_t  intf,
OPEN_DOT1Q_SWPORT_MODE_t  mode 
)

Set the Switchport Configuration Mode for a port.

Parameters
[in]client_handleClient handle from registration API
[in]intfInterface Number
-Minimum value 1
-Maximum value openapiMaxInterfaceCountGet()
[in]modeNew Switchport Mode to be set
Return values
OPEN_E_NONEif Switchport Mode set is successful.
OPEN_E_FAILif Switchport Mode set failed.
OPEN_E_PARAMinvalid parameter(s)

OpEN API Version: 1.11

Examples:
switchport_config_example.c.
open_error_t openapiDot1qSwPortTaggedVlanListGet ( openapiClientHandle_t client_handle,
uint32_t  intf,
OPEN_VLAN_LIST_t vidList 
)

Get the tagged VLAN list for the interface when the interface is in general mode.

Parameters
[in]client_handleClient handle from registration API
[in]intfInterface Number
[out]vidListVLAN ID List
Return values
OPEN_E_NONEif Tagged VLAN list get is successful.
OPEN_E_FAILif Tagged VLAN list get failed.
OPEN_E_PARAMinvalid parameter(s)

OpEN API Version: 1.11

open_error_t openapiDot1qSwPortTrunkAllowedVlanListGet ( openapiClientHandle_t client_handle,
uint32_t  intf,
OPEN_VLAN_LIST_t vidList 
)

Get the list of VLANs allowed on an interface when the interface is in trunking mode.

Parameters
[in]client_handleClient handle from registration API
[in]intfInterface Number
[out]vidListVLAN ID List
Return values
OPEN_E_NONEif Allowed VLAN list get is successful.
OPEN_E_FAILif Allowed VLAN list get failed.
OPEN_E_PARAMinvalid parameter(s)

OpEN API Version: 1.11

Examples:
switchport_config_example.c.
open_error_t openapiDot1qSwPortTrunkAllowedVlanListSet ( openapiClientHandle_t client_handle,
uint32_t  intf,
OPEN_VLAN_LIST_t vidList 
)

Set the list of VLANs allowed on an interface when the interface is in trunking mode.

Parameters
[in]client_handleClient handle from registration API
[in]intfInterface Number
[in]vidListVLAN ID List
Return values
OPEN_E_NONEif Allowed VLAN list set is successful.
OPEN_E_FAILif Allowed VLAN list set failed.
OPEN_E_PARAMinvalid parameter(s)

OpEN API Version: 1.11

Examples:
switchport_config_example.c.
open_error_t openapiDot1qSwPortTrunkNativeVlanGet ( openapiClientHandle_t client_handle,
uint32_t  intf,
uint32_t *  vlanId 
)

Get the Native VLAN ID for a port when in trunking mode.

Parameters
[in]client_handleClient handle from registration API
[in]intfInterface Number
-Minimum value 1
-Maximum value openapiMaxInterfaceCountGet()
[out]vlanIdStorage space for the VLAN ID
Return values
OPEN_E_NONEif Native VLAN get is successful.
OPEN_E_FAILif Native VLAN get failed.
OPEN_E_PARAMinvalid parameter(s)

OpEN API Version: 1.11

Examples:
switchport_config_example.c.
open_error_t openapiDot1qSwPortTrunkNativeVlanSet ( openapiClientHandle_t client_handle,
uint32_t  intf,
uint32_t  vlanId 
)

Set the native VLAN ID for a port when in trunking mode.

Parameters
[in]client_handleClient handle from registration API
[in]intfInterface Number
-Minimum value 1
-Maximum value openapiMaxInterfaceCountGet()
[in]vlanIdVLAN ID to be set
Return values
OPEN_E_NONEif native VLAN set is successful.
OPEN_E_FAILif native VLAN set failed.
OPEN_E_PARAMinvalid parameter(s)
OPEN_E_DISABLEDwhen specified VLAN is not in allowed VLAN list

OpEN API Version: 1.11

Examples:
switchport_config_example.c.
open_error_t openapiDot1qSwPortUntaggedVlanListGet ( openapiClientHandle_t client_handle,
uint32_t  intf,
OPEN_VLAN_LIST_t vidList 
)

Get the untagged VLAN list for the interface when the interface is in general mode.

Parameters
[in]client_handleClient handle from registration API
[in]intfInterface Number
[out]vidListVLAN ID List
Return values
OPEN_E_NONEif Untagged VLAN list get is successful.
OPEN_E_FAILif Untagged VLAN list get failed.
OPEN_E_PARAMinvalid parameter(s)

OpEN API Version: 1.11

open_error_t openapiDot1qVlanNumDeletesGet ( openapiClientHandle_t client_handle,
uint32_t *  val 
)

Get the number of times a VLAN entry has been deleted from DOT1Q table.

Parameters
[in]client_handleclient handle from registration API
[out]valnumber of times VLANs are deleted
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
vlan_example.c.
open_error_t openapiDynamicVlanEntriesGet ( openapiClientHandle_t client_handle,
uint32_t *  val 
)

Get the number of dynamic VLANs.

Parameters
[in]client_handleclient handle from registration API
[out]valnumber of dynamic VLANs
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
vlan_example.c.
open_error_t openapiMostVlanEntriesGet ( openapiClientHandle_t client_handle,
uint32_t *  val 
)

Get the max VLAN entries allowed.

Parameters
[in]client_handleclient handle from registration API
[out]valnumber of VLANs in use on device
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
vlan_example.c.
open_error_t openapiNextVlanGet ( openapiClientHandle_t client_handle,
uint32_t  vid,
uint32_t *  nextVid 
)

Gets the next VLAN ID.

Parameters
[in]client_handleclient handle from registration API
[in]vidcurrent VLAN Id
[out]nextVidnext VLAN id
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
vlan_example.c.
open_error_t openapiPvlanIntfHostAssocGet ( openapiClientHandle_t client_handle,
uint32_t  intf,
uint32_t *  primaryVid,
uint32_t *  secondaryVid 
)

Get the private VLAN association for a host mode interface.

Parameters
[in]client_handleClient handle from registration API
[in]intfInterface Number
-Minimum value 1
-Maximum value openapiMaxInterfaceCountGet()
[out]primaryVidPrimary VLAN ID of the Private VLAN
[out]secondaryVidSecondary VLAN ID of the Private VLAN
Return values
OPEN_E_NONEHost mode PVLAN bindings get successful.
OPEN_E_FAILHost mode PVLAN bindings get failed.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.18

Note
An output value of 0 for the primaryVid and/or secondaryVid means there is no host VLAN association configured for this interface.
Examples:
pvlan_example.c, and vlan_example.c.
open_error_t openapiPvlanIntfIsolatedTrunkAssocNextGet ( openapiClientHandle_t client_handle,
uint32_t  intf,
uint32_t  primaryVid,
uint32_t *  nextPrimaryVid,
uint32_t *  secondaryVid 
)

Get the next primary VLAN and any associated secondary VLAN for an isolated trunk interface in a private VLAN.

Parameters
[in]client_handleClient handle from registration API
[in]intfInterface Number
[in]primaryVidPrimary VLAN ID to begin search
[out]nextPrimaryVidNext Primary VLAN ID associated with this trunk
[out]secondaryVidSecondary VLAN ID that is mapped to the next primary VLAN ID
Return values
OPEN_E_NONEIsolated trunk association next get successful.
OPEN_E_FAILIsolated trunk association next get failed.
OPEN_E_NOT_FOUNDNo more instances available.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.18

Note
This API is meaningful only for an interface configured as an isolated trunk, as indicated by openapiPvlanIntfModeGet().
Use 0 for the primaryVid to obtain the first associated primary VLAN.
Examples:
pvlan_example.c.
open_error_t openapiPvlanIntfModeGet ( openapiClientHandle_t client_handle,
uint32_t  intf,
OPEN_DOT1Q_SWPORT_MODE_t mode 
)

Get the private VLAN mode for an interface.

Parameters
[in]client_handleClient handle from registration API
[in]intfInterface Number
-Minimum value 1
-Maximum value openapiMaxInterfaceCountGet()
[out]modePrivate VLAN Mode
Return values
OPEN_E_NONEPVLAN mode get successful.
OPEN_E_FAILPVLAN mode get failed.
OPEN_E_NOT_FOUNDInterface not configured as a PVLAN.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.18

Note
This is similar to openapiDot1qSwPortModeGet(), but is focused exclusively on the private VLAN mode configuration of an interface.
Examples:
pvlan_example.c.
open_error_t openapiPvlanIntfOperAssocGet ( openapiClientHandle_t client_handle,
uint32_t  intf,
OPEN_VLAN_LIST_t operationalVidList 
)

Get the list of operational VLAN(s) for a private VLAN interface.

Parameters
[in]client_handleClient handle from registration API
[in]intfInterface Number
[out]operationalVidListOperational VLAN ID List carried by PVLAN trunk
Return values
OPEN_E_NONEOperational VLAN list get successful.
OPEN_E_FAILOperational VLAN list get failed.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.18

Note
The VLANs that are in operation for an interface depend on its currently configured private VLAN mode and type.
Examples:
pvlan_example.c.
open_error_t openapiPvlanIntfPromiscAssocGet ( openapiClientHandle_t client_handle,
uint32_t  intf,
uint32_t *  primaryVid,
OPEN_VLAN_LIST_t secondaryVidList 
)

Get the private VLAN association for a promiscuous mode interface.

Parameters
[in]client_handleClient handle from registration API
[in]intfInterface Number
-Minimum value 1
-Maximum value openapiMaxInterfaceCountGet()
[out]primaryVidPrimary VLAN ID of the Private VLAN
[out]secondaryVidListSecondary VLAN ID List that is mapped to primary VLAN ID
Return values
OPEN_E_NONEPromiscuous mode PVLAN bindings get successful.
OPEN_E_FAILPromiscuous mode PVLAN bindings get failed.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.18

Note
An output value of 0 for the primaryVid and/or no entries in the secondaryVidList means there is no promiscuous VLAN association for this interface.
Examples:
pvlan_example.c, and vlan_example.c.
open_error_t openapiPvlanIntfPromiscTrunkAssocNextGet ( openapiClientHandle_t client_handle,
uint32_t  intf,
uint32_t  primaryVid,
uint32_t *  nextPrimaryVid,
OPEN_VLAN_LIST_t secondaryVidList 
)

Get the next primary VLAN and any associated secondary VLAN(s) for a promiscuous trunk interface in a private VLAN.

Parameters
[in]client_handleClient handle from registration API
[in]intfInterface Number
[in]primaryVidPrimary VLAN ID to begin search
[out]nextPrimaryVidNext Primary VLAN ID associated with this trunk
[out]secondaryVidListSecondary VLAN ID List that is mapped to next primary VLAN ID
Return values
OPEN_E_NONEPromiscuous trunk association next get successful.
OPEN_E_FAILPromiscuous trunk association next get failed.
OPEN_E_NOT_FOUNDNo more instances available.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.18

Note
This API is meaningful only for an interface configured as a promiscuous trunk, as indicated by openapiPvlanIntfModeGet().
Use 0 for the primaryVid to obtain the first associated primary VLAN.
Examples:
pvlan_example.c.
open_error_t openapiPvlanIntfTrunkAllowedVlanListGet ( openapiClientHandle_t client_handle,
uint32_t  intf,
OPEN_VLAN_LIST_t normalVidList 
)

Get the list of normal VLAN(s) carried by a promiscuous or isolated trunk interface in a private VLAN.

Parameters
[in]client_handleClient handle from registration API
[in]intfInterface Number
[out]normalVidListNormal VLAN ID List carried by PVLAN trunk
Return values
OPEN_E_NONEPVLAN trunk normal VLAN list get successful.
OPEN_E_FAILPVLAN trunk normal VLAN list get failed.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.18

Note
This API is meaningful only for an interface configured as a promiscuous or isolated trunk, as indicated by openapiPvlanIntfModeGet().
Examples:
pvlan_example.c.
open_error_t openapiPvlanIntfTrunkNativeVlanGet ( openapiClientHandle_t client_handle,
uint32_t  intf,
uint32_t *  nativeVid 
)

Get the native VLAN for a promiscuous or isolated trunk interface in a private VLAN.

Parameters
[in]client_handleClient handle from registration API
[in]intfInterface Number
[out]nativeVidNative VLAN ID
Return values
OPEN_E_NONEPVLAN trunk native VLAN get successful.
OPEN_E_FAILPVLAN trunk native VLAN get failed.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.18

Note
This API is meaningful only for an interface configured as a promiscuous or isolated trunk, as indicated by openapiPvlanIntfModeGet().
The trunk native VLAN is the one assigned to untagged packets received on the specified trunk interface in a private VLAN. An output value of 0 means the native VLAN is not currently configured for this trunk interface.
Examples:
pvlan_example.c.
open_error_t openapiQportsCurrentIngressFilteringGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
uint32_t *  val 
)

Get the Current Ingress Filtering configuration for a port.

Parameters
[in]client_handleclient handle from registration API
[in]ifNuminternal interface number of physical or logical interface
[out]valingress filter mode - enable (1) or disable (0)
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
vlan_example.c.
open_error_t openapiQportsEnableIngressFilteringGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
uint32_t *  val 
)

Get the Ingress Filtering configuration for a port.

Parameters
[in]client_handleclient handle from registration API
[in]ifNuminternal interface number of physical or logical interface
[out]valenable (1) or disable (0)
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
vlan_example.c.
open_error_t openapiQportsEnableIngressFilteringSet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
uint32_t  mode 
)

Set the Ingress Filtering configuration for a port.

Parameters
[in]client_handleclient handle from registration API
[in]ifNuminternal interface number of physical or logical interface or all interfaces
[in]modeenable (1) or disable (0)
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
vlan_example.c.
open_error_t openapiStaticVlanEntriesGet ( openapiClientHandle_t client_handle,
uint32_t *  val 
)

Get the number of static VLANs.

Parameters
[in]client_handleclient handle from registration API
[out]valnumber of static VLANs
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
vlan_example.c.
open_error_t openapiVlanCreate ( openapiClientHandle_t client_handle,
uint32_t  vlanNum 
)

Creates the VLAN with the ID specified on the switch.

Parameters
[in]client_handleclient handle from registration API
[in]vlanNumVLAN ID.
Return values
OPEN_E_NONEThe VLAN was successfully created.
OPEN_E_FAILThe VLAN was not successfully created.
OPEN_E_PARAMError in parameter passed.
Note
Calling this API will change the running configuration of the switch.

OpEN API Version: 1.1

Examples:
dot1ad_example.c, pbvlan_example.c, and vlan_example.c.
open_error_t openapiVlanCreatedCheck ( openapiClientHandle_t client_handle,
uint32_t  vlanNum 
)

Test if the given VLAN has been configured on the switch.

Parameters
[in]client_handleclient handle from registration API
[in]vlanNumVLAN ID.
Return values
OPEN_E_NONEThe VLAN is configured.
OPEN_E_FAILThe VLAN is not configured.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.1

Examples:
vlan_example.c, vlan_example.rb, and vlan_status_example.c.
open_error_t openapiVlanDelete ( openapiClientHandle_t client_handle,
uint32_t  vlanNum 
)

Deletes the VLAN with the ID specified on the switch.

Parameters
[in]client_handleclient handle from registration API
[in]vlanNumVLAN ID.
Return values
OPEN_E_NONEThe VLAN was successfully deleted.
OPEN_E_FAILThe VLAN was not successfully deleted.
OPEN_E_PARAMError in parameter passed.
OPEN_E_UNAVAILThe default VLAN deletion is not allowed.
OPEN_E_INTERNALOther Internal Failure.
Note
Calling this API will change the running configuration of the switch.

OpEN API Version: 1.1

Examples:
pbvlan_example.c, and vlan_example.c.
open_error_t openapiVlanGlobalAutoTrunkGet ( openapiClientHandle_t client_handle,
OPEN_CONTROL_t adminMode 
)

Get the Auto-Trunk administrative mode.

Parameters
[in]client_handleclient handle from registration API.
[out]adminModeauto-trunk administrative mode value.
Return values
OPEN_E_NONEAuto-Trunk global admin mode get successfully.
OPEN_E_PARAMError in parameter passed.
OPEN_E_UNAVAILAuto-Trunk Feature not present.
OPEN_E_INTERNALInternal application failure.

OpEN API Version: 1.26

Examples:
vlan_example.c.
open_error_t openapiVlanGlobalAutoTrunkSet ( openapiClientHandle_t client_handle,
OPEN_CONTROL_t  adminMode 
)

Set the Auto-Trunk administrative mode.

Parameters
[in]client_handleclient handle from registration API.
[in]adminModeauto-trunk administrative mode value.
Return values
OPEN_E_NONEAuto-Trunk global admin mode set successfully.
OPEN_E_PARAMError in parameter passed.
OPEN_E_UNAVAILAuto-Trunk Feature not present.
OPEN_E_INTERNALInternal application failure.

OpEN API Version: 1.26

Examples:
vlan_example.c.
open_error_t openapiVlanIfAcceptFrameTypeGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
OPEN_DOT1Q_ACCEPT_FRAME_TYPE_t type 
)

Get the Acceptable Frame Type configuration for a port.

Parameters
[in]client_handleclient handle from registration API
[in]ifNumphysical or logical interface to be configured
-Minimum value 1
-Maximum value openapiMaxInterfaceCountGet()
[out]typeFrame type
Return values
OPEN_E_NONEFrame type was successfully retrieved.
OPEN_E_FAILFrame type was not successfully retrieved.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.1

Examples:
vlan_example.c.
open_error_t openapiVlanIfAcceptFrameTypeSet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
OPEN_DOT1Q_ACCEPT_FRAME_TYPE_t  type 
)

Set the Acceptable Frame Type configuration for a port.

Parameters
[in]client_handleclient handle from registration API
[in]ifNumphysical or logical interface to be configured
-Minimum value 1
-Maximum value openapiMaxInterfaceCountGet()
[in]typeFrame Type
Return values
OPEN_E_NONESuccess
OPEN_E_FAILFrame type not set
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.1

Examples:
vlan_example.c.
open_error_t openapiVlanIfDefaultUserPriorityGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
uint32_t *  priority 
)

Gets an interface's default user priority.

This is the priority assigned to packets received untagged.

Parameters
[in]client_handleclient handle from registration API
[in]ifNumInterface ID
[out]priorityPriority assigned to packets.
Return values
OPEN_E_NONEPort default priority was successfully retrieved.
OPEN_E_FAILPort default priority was not successfully retrieved.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.14

Examples:
vlan_example.c.
open_error_t openapiVlanIfDefaultUserPrioritySet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
uint32_t  priority 
)

Sets an interface's default user priority.

This is the priority assigned to packets received untagged.

Parameters
[in]client_handleclient handle from registration API
[in]ifNumInterface ID
[in]priorityPriority assigned to packets. Acceptable
-Minimum value 0
-Maximum value openapiVlanIfNumTrafficClassesGet() - 1
Return values
OPEN_E_NONEPort default priority was successfully set.
OPEN_E_FAILPort default priority was not successfully set.
OPEN_E_PARAMError in parameter passed.
Note
Calling this API will change the running configuration of the switch.

OpEN API Version: 1.14

Examples:
vlan_example.c.
open_error_t openapiVlanIfNumTrafficClassesGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
uint32_t *  numTrafficClasses 
)

Gets an interface's number of traffic classes supported.

Parameters
[in]client_handleclient handle from registration API
[in]ifNumInterface ID
[out]numTrafficClassesnumber of traffic classes
Return values
OPEN_E_NONENumber of traffic classes was successfully retrieved.
OPEN_E_FAILNumber of traffic classes was not successfully retrieved.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.14

Examples:
vlan_example.c.
open_error_t openapiVlanIfParticipationGet ( openapiClientHandle_t client_handle,
uint32_t  vlanNum,
uint32_t  ifNum,
OPEN_VLAN_PARTICIPATION_MODE_t participationMode 
)

Gets an interface's configured participation mode for the specified VLAN.

Parameters
[in]client_handleclient handle from registration API
[in]vlanNumVLAN ID
[in]ifNumInterface ID
-Minimum value 1
-Maximum value openapiMaxInterfaceCountGet()
[out]participationModeMode of participation
Return values
OPEN_E_NONEParticipation mode was successfully deleted.
OPEN_E_FAILParticipation mode was not successfully deleted.
OPEN_E_NOT_FOUNDThe VLAN specified is not created.
OPEN_E_PARAMError in parameter passed.
Note
Calling this API will change the running configuration of the switch.

OpEN API Version: 1.1

Examples:
vlan_example.c.
open_error_t openapiVlanIfParticipationSet ( openapiClientHandle_t client_handle,
uint32_t  vlanNum,
uint32_t  ifNum,
OPEN_VLAN_PARTICIPATION_MODE_t  participationMode 
)

Sets an interface's participation mode configuration for the specified VLAN.

Parameters
[in]client_handleclient handle from registration API
[in]vlanNumVLAN ID
[in]ifNumInterface ID
-Minimum value 1
-Maximum value openapiMaxInterfaceCountGet()
[in]participationModeMode of participation
Return values
OPEN_E_NONEParticipation mode was successfully set.
OPEN_E_FAILParticipation mode was not successfully set.
OPEN_E_UNAVAILSetting participation mode not valid for the specified interface.
OPEN_E_NOT_FOUNDThe VLAN specified is not created.
OPEN_E_PARAMError in parameter passed.
Note
Calling this API will change the running configuration of the switch.

OpEN API Version: 1.1

Examples:
vlan_example.c.
open_error_t openapiVlanIfParticipationStatusGet ( openapiClientHandle_t client_handle,
uint32_t  vlanNum,
uint32_t  ifNum,
uint32_t *  participating 
)

Gets an interface's participation status for the specified VLAN.

Parameters
[in]client_handleclient handle from registration API
[in]vlanNumVLAN ID
[in]ifNumInterface ID
-Minimum value 1
-Maximum value openapiMaxInterfaceCountGet()
[out]participating1 if participating, 0 if not
Return values
OPEN_E_NONEParticipation status was successfully retrieved.
OPEN_E_FAILParticipation status was not successfully retrieved.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.1

Examples:
vlan_example.c.
open_error_t openapiVlanIfPvidGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
uint32_t *  vlanNum 
)

Gets an interface's PVID.

Parameters
[in]client_handleclient handle from registration API
[in]ifNumInterface ID
-Minimum value 1
-Maximum value openapiMaxInterfaceCountGet()
[out]vlanNumVLAN ID
Return values
OPEN_E_NONEPVID was successfully retrieved.
OPEN_E_FAILPVID was not successfully retrieved.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.1

Examples:
vlan_example.c.
open_error_t openapiVlanIfPvidSet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
uint32_t  vlanNum 
)

Sets an interface's VLAN ID (PVID).

Parameters
[in]client_handleclient handle from registration API
[in]ifNumInterface ID
-Minimum value 1
-Maximum value openapiMaxInterfaceCountGet()
[in]vlanNumVLAN ID
Return values
OPEN_E_NONEPVID was successfully set.
OPEN_E_FAILPVID was not successfully set.
OPEN_E_UNAVAILSetting PVID not valid for the specified interface.
OPEN_E_NOT_FOUNDThe VLAN specified is not created.
Note
Calling this API will change the running configuration of the switch.

OpEN API Version: 1.1

Examples:
vlan_example.c.
open_error_t openapiVlanIfTaggingGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
uint32_t  vlanNum,
OPEN_CONTROL_t tagging 
)

Gets an interface's tagging setting for the specified VLAN.

Parameters
[in]client_handleclient handle from registration API
[in]ifNumInterface ID
-Minimum value 1
-Maximum value openapiMaxInterfaceCountGet()
[in]vlanNumVLAN ID
[out]taggingOPEN_ENABLE if port is sending tagged packets on the VLAN
Return values
OPEN_E_NONEPVID was successfully retrieved.
OPEN_E_FAILPVID was not successfully retrieved.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.1

Examples:
vlan_example.c.
open_error_t openapiVlanIfTaggingSet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
uint32_t  vlanNum,
OPEN_CONTROL_t  tagging 
)

Sets an interface's tagging mode for the given VLAN.

Parameters
[in]client_handleclient handle from registration API
[in]ifNumInterface ID
-Minimum value 1
-Maximum value openapiMaxInterfaceCountGet()
[in]vlanNumVLAN ID
[in]taggingVLAN tagging
Return values
OPEN_E_NONETagging mode was successfully set.
OPEN_E_FAILTagging mode was not successfully set.
OPEN_E_UNAVAILSetting tagging mode not valid for the specified interface.
OPEN_E_NOT_FOUNDThe VLAN specified is not created.
Note
Calling this API will change the running configuration of the switch.

OpEN API Version: 1.1

Examples:
vlan_example.c.
int openapiVlanIsStatic ( openapiClientHandle_t client_handle,
uint32_t  vlanNum 
)

Returns whether the VLAN is static.

Parameters
[in]client_handleclient handle from registration API
[in]vlanNumVLAN ID.
Returns
0 The VLAN is dynamic. 1 The VLAN is static.

OpEN API Version: 1.1

Examples:
vlan_example.rb, and vlan_status_example.c.
open_error_t openapiVlanMacAdd ( openapiClientHandle_t client_handle,
open_buffdesc mac,
uint32_t  vlanId 
)

To add a mac to a VLAN.

Parameters
[in]client_handleClient handle from registration API
[in]macMac address
[in]vlanIdVlan id
Return values
OPEN_E_NONEAddition of MAC to VLAN is successful.
OPEN_E_FAILAddition of MAC to VLAN is failed.
OPEN_E_PARAMError in parameter passed.
OPEN_E_INTERNALOther Internal Failure.
OPEN_E_UNAVAILFeature not available.
Note
Calling this API will change the running configuration of the switch
MAC address string should be in one of the below formats: "xx:xx:xx:xx:xx:xx", "xx-xx-xx-xx-xx-xx", "xxxx.xxxx.xxxx"

OpEN API Version: 1.25

Examples:
vlan_mac_example.c.
open_error_t openapiVlanMacDelete ( openapiClientHandle_t client_handle,
open_buffdesc mac,
uint32_t  vlanId 
)

To delete a mac from a VLAN.

Parameters
[in]client_handleClient handle from registration API
[in]macMac address
[in]vlanIdVlan id
Return values
OPEN_E_NONEDeletion of MAC to VLAN is successful.
OPEN_E_FAILDeletion of MAC to VLAN is failed.
OPEN_E_PARAMError in parameter passed.
OPEN_E_INTERNALOther Internal Failure.
OPEN_E_UNAVAILFeature not available.
Note
Calling this API will change the running configuration of the switch
MAC address string should be in one of the below formats: "xx:xx:xx:xx:xx:xx", "xx-xx-xx-xx-xx-xx", "xxxx.xxxx.xxxx"

OpEN API Version: 1.25

Examples:
vlan_mac_example.c.
open_error_t openapiVlanMacGet ( openapiClientHandle_t client_handle,
open_buffdesc mac,
uint32_t *  vlanId 
)

To get the details of the mac vlan entry.

Parameters
[in]client_handleClient handle from registration API
[in]macMac address
[out]vlanIdvlan id
Return values
OPEN_E_NONEGet successful.
OPEN_E_FAILGet failed.
OPEN_E_PARAMError in parameter passed.
OPEN_E_INTERNALOther Internal Failure.
OPEN_E_UNAVAILFeature not available.
Note
MAC address string should be in one of the below formats: "xx:xx:xx:xx:xx:xx", "xx-xx-xx-xx-xx-xx", "xxxx.xxxx.xxxx"

OpEN API Version: 1.25

Examples:
vlan_mac_example.c.
open_error_t openapiVlanMacGetNext ( openapiClientHandle_t client_handle,
open_buffdesc mac,
open_buffdesc nextmac,
uint32_t *  nextvlanId 
)

Gets the next MAC vlan entry details of a given MAC.

Parameters
[in]client_handleClient handle from registration API
[in]macMac address
[out]nextmacNext created mac
[out]nextvlanIdNext vlan id
Return values
OPEN_E_NONEGet next successful.
OPEN_E_FAILGet next failed.
OPEN_E_PARAMError in parameter passed.
OPEN_E_UNAVAILFeature not available.
Note
MAC address string should be in one of the below formats: "xx:xx:xx:xx:xx:xx", "xx-xx-xx-xx-xx-xx", "xxxx.xxxx.xxxx"
nextmac buffer should have 18 bytes memory.

OpEN API Version: 1.25

Examples:
vlan_mac_example.c.
open_error_t openapiVlanNameGet ( openapiClientHandle_t client_handle,
uint32_t  vlanNum,
open_buffdesc vlanName 
)

Gets the VLAN Name.

Parameters
[in]client_handleclient handle from registration API
[in]vlanNumVLAN ID
[out]vlanNameVLAN name
Return values
OPEN_E_NONEGet successful.
OPEN_E_FAILGet failed.
OPEN_E_PARAMError in parameter passed.
Note
Maximum size for vlanName is determined by calling openapiVlanNameLenGet().

OpEN API Version: 1.1

Examples:
vlan_example.c.
open_error_t openapiVlanNameLenGet ( openapiClientHandle_t client_handle,
uint32_t *  strLen 
)

Gets the VLAN Name string length.

This length is used to allocate and initialize the open_buffdesc type argument buffers used by various VLAN OpEN APIs.

Parameters
[in]client_handleclient handle from registration API
[out]strLenstring length
Return values
OPEN_E_NONEString length Get successful.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.1

Examples:
vlan_example.c.
open_error_t openapiVlanNameSet ( openapiClientHandle_t client_handle,
uint32_t  vlanNum,
open_buffdesc vlanName 
)

Configures a VLAN Name.

Parameters
[in]client_handleclient handle from registration API
[in]vlanNumVLAN ID
[in]vlanNameVLAN name Populate vlanName:pstart and size with a char buffer containing the VLAN name
Return values
OPEN_E_NONESet successful.
OPEN_E_FAILSet failed.
OPEN_E_PARAMError in parameter passed.
OPEN_E_INTERNALOther Internal Failure.
Note
Calling this API will change the running configuration of the switch.
Maximum size for vlanName is determined by calling openapiVlanNameLenGet().

OpEN API Version: 1.1

Examples:
vlan_example.c.
open_error_t openapiVlanNextChangedGet ( openapiClientHandle_t client_handle,
uint32_t  vlanNum,
uint32_t *  nextVlanNum,
uint32_t *  delete_pending 
)

Gets the next VLAN which has a pending change or a pending deletion.

Parameters
[in]client_handleclient handle from registration API
[in]vlanNumID of the current VLAN ID
[out]nextVlanNumStorage for the returned VLAN ID
[out]delete_pendingFlag Indicating that the VLAN is pending for deletion.
Return values
OPEN_E_NONEThe next VLAN of the specified type returned.
OPEN_E_FAILNo next VLAN of the specified type was found.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.1

Examples:
vlan_example.rb, and vlan_status_example.c.
open_error_t openapiVlanNextGet ( openapiClientHandle_t client_handle,
uint32_t  vlanNum,
uint32_t *  nextVlanNum 
)

Gets the next VLAN number that has been configured on the switch.

Call with vlanNum set to 0 to get the first VLAN.

Parameters
[in]client_handleclient handle from registration API
[in]vlanNumCurrent VLAN ID.
[out]nextVlanNumNext VLAN ID, if one exists.
Return values
OPEN_E_NONEThe next VLAN ID returned.
OPEN_E_FAILNo next VLAN ID was found.
OPEN_E_PARAMError in parameter passed.
Note
Passing a zero vlanNum indicates a request to return the first available VLAN.

OpEN API Version: 1.1

Examples:
vlan_example.c, vlan_example.rb, and vlan_status_example.c.
open_error_t openapiVlanTaggedSetGet ( openapiClientHandle_t client_handle,
uint32_t  vlanId,
uint32_t  ifNum,
uint32_t *  val 
)

Get the tagging configuration of a port.

Parameters
[in]client_handleclient handle from registration API
[in]vlanIdVLAN Id
[in]ifNuminternal interface number of physical or logical interface
[out]valtagged status of a port - tagged or untagged
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
vlan_example.c.
open_error_t openapiVlanTypeGet ( openapiClientHandle_t client_handle,
uint32_t  vlanNum,
OPEN_DOT1Q_VLAN_TYPE_t vlanType 
)

Gets the VLAN type for the specified VLAN.

Parameters
[in]client_handleClient handle from registration API.
[in]vlanNumVLAN ID.
[out]vlanTypeVLAN type.
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
OPEN_E_NOT_FOUNDThe VLAN specified is not created.

OpEN API Version: 1.26

Examples:
vlan_example.c.
open_error_t openapiVlanVIDListGet ( openapiClientHandle_t client_handle,
uint32_t  intfNum,
OPEN_VLAN_LIST_t data,
uint32_t *  numOfElements 
)

Get a list of VLANs an interface is a member of.

Parameters
[in]client_handleclient handle from registration API
[in]intfNuminternal interface number of physical or logical interface
[out]datapointer to data
[out]numOfElementslength of the VLAN list
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
vlan_example.c.