Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.11.1.2
openapi_qos_auto_vlan.h
Go to the documentation of this file.
1 
9 /**********************************************************************
10 *
11 * Copyright 2022-2023 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_qos auto vlan.h
28 *
29 * @purpose This code implements the OpEN QOS Auto VLAN APIs
30 *
31 * @component OPEN
32 *
33 * @create 09/07/2022
34 *
35 * @end
36 *
37 *********************************************************************/
38 #ifndef OPENAPI_QOS_AUTO_VLAN_H_INCLUDED
39 #define OPENAPI_QOS_AUTO_VLAN_H_INCLUDED
40 
41 #include "openapi_common.h"
42 
44 typedef enum
45 {
46  OPEN_AUTO_VLAN_FIRST = 0,
50  OPEN_AUTO_VLAN_LAST
52 
53 /* AUTO VLAN factory defaults */
54 #define OPEN_QOS_AUTO_VLAN_DYNAMIC_VLAN_SUPPORT L7_FALSE
55 #define OPEN_DEFAULT_AUTO_CAMERA_STATUS OPEN_DISABLE
56 #define OPEN_DEFAULT_AUTO_CAMERA_VLAN 0
57 #define OPEN_DEFAULT_AUTO_CAMERA_PRIORITY 7
58 
59 #define OPEN_DEFAULT_AUTO_WIFI_STATUS OPEN_DISABLE
60 #define OPEN_DEFAULT_AUTO_WIFI_VLAN 0
61 #define OPEN_DEFAULT_AUTO_WIFI_PRIORITY 7
62 
63 #define OPEN_AUTO_VLAN_MAX_MAC_OUIS L7_AUTO_VLAN_MAX_MAC_OUIS
64 #define OPEN_AUTO_VLAN_FIRST_MAC_OUI_INDEX 0
65 #define OPEN_AUTO_VLAN_OUI_LEN AUTO_VLAN_OUI_LEN
66 #define OPEN_AUTO_VLAN_OUI_DESC_STRINGLEN AUTO_VLAN_OUI_DESC_STRINGLEN
67 #define OPEN_AUTO_VLAN_OUI_STR_MAX_LEN 9
68 
69 /*************************************************************************/
85  OPEN_AUTO_VLAN_TYPES_t autoVlanType, OPEN_CONTROL_t *mode);
86 
87 /*************************************************************************/
103  OPEN_AUTO_VLAN_TYPES_t autoVlanType, OPEN_CONTROL_t mode);
104 
105 /*************************************************************************/
122  OPEN_AUTO_VLAN_TYPES_t autoVlanType,
123  uint32_t ifNum, OPEN_CONTROL_t mode);
124 
125 /*************************************************************************/
142  OPEN_AUTO_VLAN_TYPES_t autoVlanType,
143  uint32_t ifNum, OPEN_CONTROL_t *mode);
144 
145 /*************************************************************************/
161  OPEN_AUTO_VLAN_TYPES_t autoVlanType, uint32_t vlanId);
162 
163 /*************************************************************************/
179  OPEN_AUTO_VLAN_TYPES_t autoVlanType, uint32_t *vlanId);
180 
181 /*************************************************************************/
198  OPEN_AUTO_VLAN_TYPES_t autoVlanType,
199  uint32_t autoVlanPriority);
200 
201 /*************************************************************************/
218  OPEN_AUTO_VLAN_TYPES_t autoVlanType, uint32_t *autoVlanPriority);
219 
220 /*************************************************************************/
237  OPEN_AUTO_VLAN_TYPES_t autoVlanType,
238  open_buffdesc *autoVlanOui, open_buffdesc *autoOuiDesc);
239 
240 /*************************************************************************/
256  OPEN_AUTO_VLAN_TYPES_t autoVlanType, open_buffdesc *autoVlanOui);
257 
258 /*************************************************************************/
276  OPEN_AUTO_VLAN_TYPES_t autoVlanType, uint32_t ouiIndex,
277  open_buffdesc *autoVlanOui, open_buffdesc *autoOuiDesc);
278 
279 /*************************************************************************/
293 open_error_t openapiQosAutoVlanIndexOuiRemove(openapiClientHandle_t *client_handle, uint32_t ouiIndex);
294 
295 /*************************************************************************/
311  OPEN_AUTO_VLAN_TYPES_t autoVlanType, uint32_t *autoVlanOuiCount);
312 
313 /*************************************************************************/
329  OPEN_AUTO_VLAN_TYPES_t autoVlanType, uint32_t *firstIndex);
330 
331 /*************************************************************************/
348  OPEN_AUTO_VLAN_TYPES_t autoVlanType,
349  uint32_t currentIndex, uint32_t *nextOuiIndex);
350 
351 /*************************************************************************/
369  OPEN_AUTO_VLAN_TYPES_t autoVlanType, uint32_t currentIndex,
370  open_buffdesc *autoVlanOui, open_buffdesc *autoOuiDesc);
371 
372 /*************************************************************************/
389  OPEN_AUTO_VLAN_TYPES_t autoVlanType,
390  open_buffdesc *autoVlanOui, open_buffdesc *autoOuiDesc);
391 
392 /*************************************************************************/
408  uint32_t ifNum, OPEN_BOOL_t *isValid);
409 
410 /*************************************************************************/
425 
426 /*************************************************************************/
442  uint32_t prevIfNum, uint32_t *nextIfNum);
443 
444 /*************************************************************************/
461  OPEN_AUTO_VLAN_TYPES_t autoVlanType, uint32_t ifNum,
462  OPEN_CONTROL_t *status);
463 
464 /*************************************************************************/
480  OPEN_AUTO_VLAN_TYPES_t autoVlanType, uint32_t *count);
481 
482 
483 /*************************************************************************/
502  uint32_t index,
503  open_buffdesc *autoVlanMac,
504  OPEN_AUTO_VLAN_TYPES_t *autoVlanType,
505  uint32_t *intIfNum,
506  uint32_t *nextIndex);
507 #endif /* OPENAPI_QOS_AUTO_VLAN_H_INCLUDED */
508 
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.
Auto Camera VLAN Type.
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.
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.
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.
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.
open_error_t
OPEN uses these enumerators to indicate the error codes.
open_error_t openapiQosAutoVlanOuiFirstEntryGet(openapiClientHandle_t *client_handle, OPEN_AUTO_VLAN_TYPES_t autoVlanType, uint32_t *firstIndex)
Gets first Auto VLAN OUI Index.
open_error_t openapiQosAutoVlanOuiRemove(openapiClientHandle_t *client_handle, OPEN_AUTO_VLAN_TYPES_t autoVlanType, open_buffdesc *autoVlanOui)
Removes Auto Vlan OUI entry.
open_error_t openapiQosAutoVlanIndexOuiRemove(openapiClientHandle_t *client_handle, uint32_t ouiIndex)
Removes Auto VLAN OUI entry at particular Index.
Auto Wifi VLAN Type.
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.
open_error_t openapiQosAutoVlanValidIntfFirstGet(openapiClientHandle_t *client_handle, uint32_t *ifNum)
Get the first interface that is valid for Auto VLAN.
OPEN_AUTO_VLAN_TYPES_t
< Auto VLAN Types
OPEN_CONTROL_t
OPEN uses these enumerators to indicate enable or disable for a given config or status parameter...
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.
OPEN_BOOL_t
OPEN uses these enumerators to indicate true or false for a given config or status parameter...
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.
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.
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.
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.
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.
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.
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.
open_error_t openapiQosAutoVlanOuiCountGet(openapiClientHandle_t *client_handle, OPEN_AUTO_VLAN_TYPES_t autoVlanType, uint32_t *autoVlanOuiCount)
Gets the count of OUIs already configured.
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.
open_error_t openapiQosAutoVlanGlobalModeGet(openapiClientHandle_t *client_handle, OPEN_AUTO_VLAN_TYPES_t autoVlanType, OPEN_CONTROL_t *mode)
Gets the AUTO VLAN global status.
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.
open_error_t openapiQosAutoVlanValidIntfNextGet(openapiClientHandle_t *client_handle, uint32_t prevIfNum, uint32_t *nextIfNum)
Get the next interface that is valid for auto VLAN.