Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.6.0.3
openapi_dot1ad.h
Go to the documentation of this file.
1 
9 /*********************************************************************
10 *
11 * Copyright 2016-2018 Broadcom.
12 *
13 * Licensed under the Apache License, Version 2.0 (the "License");
14 * you may not use this file except in compliance with the License.
15 * You may obtain a copy of the License at
16 *
17 * http://www.apache.org/licenses/LICENSE-2.0
18 *
19 * Unless required by applicable law or agreed to in writing, software
20 * distributed under the License is distributed on an "AS IS" BASIS,
21 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 * See the License for the specific language governing permissions and
23 * limitations under the License.
24 *
25 **********************************************************************
26 *
27 * @filename openapi_dot1ad.h
28 *
29 * @purpose QinQ Configuration and Status
30 *
31 * @component OPEN
32 *
33 * @create 06/02/2015
34 *
35 * @end
36 *
37 **********************************************************************/
38 #ifndef OPENAPI_DOT1AD_H_INCLUDED
39 #define OPENAPI_DOT1AD_H_INCLUDED
40 
41 #include <stdio.h>
42 #include <stddef.h>
43 #include <stdbool.h>
44 #include <sys/un.h>
45 
46 #include "openapi_common.h"
47 
48 #define OPEN_DOT1AD_SVID_MIN 1
49 #define OPEN_DOT1AD_SVID_MAX 4092
50 #define OPEN_DOT1AD_SERVICES_MAX 4096
51 #define OPEN_DOT1AD_SERVICE_NAME_LEN_MIN 1
52 #define OPEN_DOT1AD_SERVICE_NAME_LEN_MAX 31
53 #define OPEN_DOT1AD_MIN_VLAN_ID 1
54 #define OPEN_DOT1AD_MAX_VLAN_ID 4095
55 #define OPEN_DOT1AD_SUBSCRIPTIONS_MAX 4096
56 #define OPEN_DOT1AD_CVID_MIN 1
57 #define OPEN_DOT1AD_CVID_MAX 4092
61 typedef enum
62 {
63  OPEN_DOT1AD_SVCTYPE_ELINE = 1,
69 
72 typedef enum
73 {
74  OPEN_DOT1AD_PKTTYPE_NONE = 0,
82 
85 typedef enum
86 {
87  OPEN_DOT1AD_INTERFACE_TYPE_UNI = 0,
94 
95 /*****************************************************************/
117  uint32_t svid);
118 
119 /*****************************************************************/
138  uint32_t svid);
139 
140 /*****************************************************************/
157  uint32_t *serviceIndex);
158 
159 /*****************************************************************/
178  uint32_t serviceIndex,
179  uint32_t *next);
180 
181 /*****************************************************************/
204  uint32_t svid, open_buffdesc *name);
205 
206 /*****************************************************************/
229  uint32_t svid, open_buffdesc *name);
230 
231 /*****************************************************************/
252  open_buffdesc *name);
253 
254 /*****************************************************************/
274  open_buffdesc *name, uint32_t *svid);
275 
276 /*****************************************************************/
296  uint32_t vlanId, OPEN_BOOL_t *flag);
297 /*****************************************************************/
317  uint32_t vlanId,
318  OPEN_BOOL_t *flag);
319 
320 /*****************************************************************/
342  uint32_t svid,
343  OPEN_DOT1AD_SVCTYPE_t serviceType);
344 
345 /*****************************************************************/
368  uint32_t svid, uint32_t isolateVid);
369 
370 /*****************************************************************/
391  uint32_t svid,
392  OPEN_DOT1AD_SVCTYPE_t *serviceType);
393 
394 /*****************************************************************/
419  uint32_t svid, open_buffdesc *nniIntfList);
420 
421 /*****************************************************************/
449  uint32_t svid, open_buffdesc *nniIntfList);
450 
451 /*****************************************************************/
481  uint32_t intIfNum, uint32_t svid);
482 
483 /*****************************************************************/
508  uint32_t intIfNum, uint32_t svid,
509  open_buffdesc *subscrName);
510 
511 /*****************************************************************/
531  uint32_t intIfNum,
532  uint32_t svid);
533 
534 /*****************************************************************/
554  uint32_t intIfNum,
555  uint32_t svid);
556 
557 /*****************************************************************/
579  uint32_t intIfNum,
580  uint32_t svid, open_buffdesc *name);
581 
582 /*****************************************************************/
605  uint32_t intIfNum, uint32_t svid,
606  uint32_t cvid, open_buffdesc *name);
607 
608 /*****************************************************************/
628  uint32_t intIfNum,
629  uint32_t svid,
630  OPEN_DOT1AD_PKTTYPE_t pktType);
631 
632 /*****************************************************************/
655  uint32_t intIfNum, uint32_t svid,
656  uint32_t cvid,
657  OPEN_DOT1AD_PKTTYPE_t *pktType);
658 
659 /*****************************************************************/
678  uint32_t intIfNum, uint32_t svid);
679 
680 /*****************************************************************/
702  uint32_t intIfNum, uint32_t svid,
703  uint32_t matchCvid);
704 
705 /*****************************************************************/
725  uint32_t intIfNum,
726  uint32_t svid, uint32_t matchSvid);
727 
728 /*****************************************************************/
747  uint32_t subscrIndex,
748  uint32_t intIfNum,
749  uint32_t *matchCvid);
750 
751 /*****************************************************************/
771  uint32_t subscrIndex,
772  uint32_t intIfNum,
773  uint32_t *matchSvid);
774 
775 /*****************************************************************/
795  uint32_t intIfNum,
796  uint32_t svid,
797  uint32_t priority);
798 
799 /*****************************************************************/
818  uint32_t intfIn, uint32_t *intfOut,
819  uint32_t *svid, uint32_t *cvid);
820 
821 /*****************************************************************/
842  uint32_t intfIn, uint32_t svidIn,
843  uint32_t cvidIn, uint32_t *intfOut,
844  uint32_t *svidOut, uint32_t *cvidOut);
845 
846 /*****************************************************************/
868  uint32_t intfIn, uint32_t svidIn,
869  uint32_t cvidIn, uint32_t *intfOut,
870  uint32_t *svidOut, uint32_t *cvidOut);
871 
872 /*****************************************************************/
891  uint32_t subscrIndex,
892  uint32_t intIfNum,
893  uint32_t *priority);
894 
895 /*****************************************************************/
919  uint32_t intIfNum, uint32_t svid,
920  uint32_t cvid);
921 
922 /*****************************************************************/
943  uint32_t intIfNum,
944  uint32_t svid,
945  OPEN_BOOL_t removeCtag);
946 
947 /*****************************************************************/
965  uint32_t subscrIndex,
966  uint32_t intIfNum,
967  OPEN_BOOL_t *removeCtag);
968 
969 /*****************************************************************/
994  uint32_t intIfNum, uint32_t svid,
995  open_buffdesc *nniIntfList);
996 
997 /*****************************************************************/
1018  uint32_t subscrIndex,
1019  uint32_t intIfNum,
1020  open_buffdesc *nniIntfList);
1021 
1022 /************************************************************************/
1038  uint32_t basePort,
1039  OPEN_DOT1AD_INTERFACE_TYPE_t intfType);
1040 
1041 /************************************************************************/
1058  uint32_t BasePort,
1059  OPEN_DOT1AD_INTERFACE_TYPE_t *intfType);
1060 
1061 /*****************************************************************/
1081  uint32_t intIfNum, uint32_t *nextIntIfNum);
1082 
1083 /**********************************************************************/
1099  uint32_t intIfNum,
1100  OPEN_BOOL_t *enable);
1101 
1102 /**********************************************************************/
1118  uint32_t intIfNum,
1119  OPEN_BOOL_t enable);
1120 
1121 #endif /* OPENAPI_DOT1AD_H_INCLUDED */
1122 
Ordinary Switch Port.
open_error_t openapiDot1adSubscriptionNextIntfEntryGet(openapiClientHandle_t *client_handle, uint32_t intfIn, uint32_t svidIn, uint32_t cvidIn, uint32_t *intfOut, uint32_t *svidOut, uint32_t *cvidOut)
Given subscribers entry, get the next subscribers entry.
open_error_t openapiDot1adSubscriptionRemoveCtagSet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t svid, OPEN_BOOL_t removeCtag)
To set the action remove CTAG for a DOT1AD subscription.
open_error_t openapiDot1adServiceNameToSvid(openapiClientHandle_t *client_handle, open_buffdesc *name, uint32_t *svid)
To get the VLAN ID of a service, given its name.
open_error_t openapiDot1adSubscriptionSvidSet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t svid)
To set the Service VLAN ID for a DOT1AD subscription.
E-lan servicetype.
OPEN_DOT1AD_PKTTYPE_t
This enumerator is appointed to indicate packet type for a given configuration or status parameter...
open_error_t openapiDot1adServiceVidIsConfigured(openapiClientHandle_t *client_handle, uint32_t vlanId, OPEN_BOOL_t *flag)
To get the information if specified VLAN ID is configured as a DOT1AD service Vlan.
open_error_t openapiDot1adSubscriptionCvidSet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t svid, uint32_t cvid)
To set the resulting customer VLAN ID for a DOT1AD subscription.
open_error_t openapiDot1adReserveCurrentSubscription(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t svid)
Reserve current subscription structure for given internal interface number and DOT1AD service VLAN ID...
open_error_t openapiDot1adServiceTypeGet(openapiClientHandle_t *client_handle, uint32_t svid, OPEN_DOT1AD_SVCTYPE_t *serviceType)
To get the service type for a given DOT1AD service.
open_error_t openapiDot1adServiceIntfMatchPriorityGet(openapiClientHandle_t *client_handle, uint32_t subscrIndex, uint32_t intIfNum, uint32_t *priority)
To get the matching dot1p priority for a DOT1AD subscription.
Match criteria is not defined.
To match priority-tagged packets.
open_error_t openapiDot1adSubscriptionPktTypeGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t svid, uint32_t cvid, OPEN_DOT1AD_PKTTYPE_t *pktType)
To get the matching Packet type for a DOT1AD subscription.
open_error_t openapiDot1adNniIntfListGet(openapiClientHandle_t *client_handle, uint32_t svid, open_buffdesc *nniIntfList)
To get the NNI InterfaceList for a given DOT1AD service.
open_error_t openapiDot1adSubscriptionDelete(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t svid, open_buffdesc *subscrName)
To delete a DOT1AD service subscription on an given interface.
open_error_t openapiDot1adInterfacePreserveCvlanDot1pGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, OPEN_BOOL_t *enable)
Get the Dot1ad interface's preserve CVLAN-dot1p property.
To match packets without service tag.
open_error_t openapiDot1adSubscriptionMatchPrioritySet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t svid, uint32_t priority)
To set the matching dot1p priority for a DOT1AD subscription.
open_error_t openapiDot1adInterfaceTypeSet(openapiClientHandle_t *client_handle, uint32_t basePort, OPEN_DOT1AD_INTERFACE_TYPE_t intfType)
Set the Dot1ad interface type.
open_error_t
OPEN uses these enumerators to indicate the error codes.
open_error_t openapiDot1adServiceIndexGetFirst(openapiClientHandle_t *client_handle, uint32_t *serviceIndex)
Get the First service index created in the system.
open_error_t openapiDot1adNniIntfListSet(openapiClientHandle_t *client_handle, uint32_t svid, open_buffdesc *nniIntfList)
To set the NNI Intf List for a given DOT1AD service.
open_error_t openapiDot1adInterfaceTypeGet(openapiClientHandle_t *client_handle, uint32_t BasePort, OPEN_DOT1AD_INTERFACE_TYPE_t *intfType)
Get the Dot1ad interface type.
open_error_t openapiDot1adSubscriptionMatchCvidSet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t svid, uint32_t matchCvid)
To set the matching customer VLAN ID for a DOT1AD subscription.
open_error_t openapiDot1adSubscriptionNNIIntfListSet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t svid, open_buffdesc *nniIntfList)
To set the NNI Interface List for a given DOT1AD service subscription.
open_error_t openapiDot1adSubscriptionAdd(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t svid)
To add a subscription to a given DOT1AD service on a given interface.
Service based UNI port.
open_error_t openapiDot1adServiceRemoveCtagGet(openapiClientHandle_t *client_handle, uint32_t subscrIndex, uint32_t intIfNum, OPEN_BOOL_t *removeCtag)
To get the remove CTAG action for a DOT1AD subscription.
E-line servicetype.
open_error_t openapiDot1adServiceCreate(openapiClientHandle_t *client_handle, uint32_t svid)
To create a new DOT1AD service.
open_error_t openapiDot1adServiceIndexGetNext(openapiClientHandle_t *client_handle, uint32_t serviceIndex, uint32_t *next)
Given serviceIndex, get the next service index.
open_error_t openapiDot1adIntfNextGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t *nextIntIfNum)
Get the Internal Interface Number of the next valid DOT1AD port.
open_error_t openapiDot1adSubscriptionPktTypeSet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t svid, OPEN_DOT1AD_PKTTYPE_t pktType)
To set the matching Packet type for a DOT1AD subscription.
open_error_t openapiDot1adServiceTypeSet(openapiClientHandle_t *client_handle, uint32_t svid, OPEN_DOT1AD_SVCTYPE_t serviceType)
To set the service type for a given DOT1AD service.
open_error_t openapiDot1adServiceIsolateVidIsConfigured(openapiClientHandle_t *client_handle, uint32_t vlanId, OPEN_BOOL_t *flag)
To get the information if specified VLAN ID is configured as isolate Vlan Id.
open_error_t openapiDot1adServiceIntfMatchCvidGet(openapiClientHandle_t *client_handle, uint32_t subscrIndex, uint32_t intIfNum, uint32_t *matchCvid)
To get the matching customer VLAN ID for a DOT1AD subscription.
open_error_t openapiDot1adInterfacePreserveCvlanDot1pSet(openapiClientHandle_t *client_handle, uint32_t intIfNum, OPEN_BOOL_t enable)
Set the Dot1ad interface's preserve CVLAN-dot1p property.
OPEN_BOOL_t
OPEN uses these enumerators to indicate true or false for a given config or status parameter...
E-tree servicetype.
open_error_t openapiDot1adSubscriptionNameGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t svid, uint32_t cvid, open_buffdesc *name)
To get the name of a DOT1AD service subscription.
To match untagged packets.
open_error_t openapiDot1adSpecificSubscriptionNextIntfEntryGet(openapiClientHandle_t *client_handle, uint32_t intfIn, uint32_t svidIn, uint32_t cvidIn, uint32_t *intfOut, uint32_t *svidOut, uint32_t *cvidOut)
Given interface number, service VLAN ID and Customer VLAN ID get the next subscribers entry...
open_error_t openapiDot1adSubscriptionMatchSvidSet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t svid, uint32_t matchSvid)
To set the matching Service VLAN ID for a DOT1AD subscription.
open_error_t openapiDot1adServiceDelete(openapiClientHandle_t *client_handle, uint32_t svid)
To delete an existing DOT1AD service.
To match packets without customer tag.
To match tagged packets.
OPEN_DOT1AD_INTERFACE_TYPE_t
This enumerator is appointed to indicate interface type for a given configuration or status parameter...
open_error_t openapiDot1adServiceIntfMatchSvidGet(openapiClientHandle_t *client_handle, uint32_t subscrIndex, uint32_t intIfNum, uint32_t *matchSvid)
To get the matching service VLAN ID for a DOT1AD subscription.
open_error_t openapiDot1adReleaseCurrentSubscription(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t svid)
Remove current subscription structure from given internal interface number and DOT1AD service VLAN ID...
open_error_t openapiDot1adServiceNameAdd(openapiClientHandle_t *client_handle, uint32_t svid, open_buffdesc *name)
To add the name to this service.
open_error_t openapiDot1adSubscriptionNameSet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t svid, open_buffdesc *name)
To set the name for a DOT1AD service subscription.
open_error_t openapiDot1adIsolateVidSet(openapiClientHandle_t *client_handle, uint32_t svid, uint32_t isolateVid)
To set the isolated VLAN ID for E-TREE service.
open_error_t openapiDot1adServiceNameGet(openapiClientHandle_t *client_handle, uint32_t svid, open_buffdesc *name)
To get the name of the service for a given service VLAN ID.
open_error_t openapiDot1adServiceNameStringCheck(openapiClientHandle_t *client_handle, open_buffdesc *name)
Checks if the service name is a valid string.
open_error_t openapiDot1adSubscriptionNNIIntfListGet(openapiClientHandle_t *client_handle, uint32_t subscrIndex, uint32_t intIfNum, open_buffdesc *nniIntfList)
To get the NNI InterfaceList for a given DOT1AD service subscription.
open_error_t openapiDot1adSubscriptionFirstIntfEntryGet(openapiClientHandle_t *client_handle, uint32_t intfIn, uint32_t *intfOut, uint32_t *svid, uint32_t *cvid)
Get the first subscribers entry based on interface number.
OPEN_DOT1AD_SVCTYPE_t
This enumerator is appointed to indicate type of DOT1AD service for a given configuration or status p...