Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.4.4.5
openapi_dot1x.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_dot1x.h
28 *
29 * @purpose IEEE 802.1x Configuration and Status
30 *
31 * @component OpEN
32 *
33 * @create 11/16/2016
34 *
35 * @end
36 *
37 **********************************************************************/
38 #ifndef OPENAPI_DOT1X_H_INCLUDED
39 #define OPENAPI_DOT1X_H_INCLUDED
40 
41 #include "openapi_common.h"
42 #include "openapi_user_manager.h"
43 
44 /* Port authorization mode */
45 typedef enum
46 {
47  OPEN_DOT1X_PORT_FORCE_UNAUTHORIZED = 1,
48  OPEN_DOT1X_PORT_AUTO = 2,
49  OPEN_DOT1X_PORT_FORCE_AUTHORIZED = 3,
50  OPEN_DOT1X_PORT_NA = 4,
51 } OPEN_DOT1X_PORT_CONTROL_t;
52 
53 /* Port authorization status */
54 typedef enum
55 {
56  OPEN_DOT1X_PORT_STATUS_AUTHORIZED = 1,
57  OPEN_DOT1X_PORT_STATUS_UNAUTHORIZED = 2,
58  OPEN_DOT1X_PORT_STATUS_NA = 3,
59 } OPEN_DOT1X_PORT_STATUS_t;
60 
61 /* PAE State Machine (APM) states */
62 typedef enum
63 {
64  OPEN_DOT1X_APM_INITIALIZE = 1,
65  OPEN_DOT1X_APM_DISCONNECTED = 2,
66  OPEN_DOT1X_APM_CONNECTING = 3,
67  OPEN_DOT1X_APM_AUTHENTICATING = 4,
68  OPEN_DOT1X_APM_AUTHENTICATED = 5,
69  OPEN_DOT1X_APM_ABORTING = 6,
70  OPEN_DOT1X_APM_HELD = 7,
71  OPEN_DOT1X_APM_FORCE_AUTH = 8,
72  OPEN_DOT1X_APM_FORCE_UNAUTH = 9,
73 } OPEN_DOT1X_APM_STATES_t;
74 
75 /* Backend State Machine (BAM) states */
76 typedef enum
77 {
78  OPEN_DOT1X_BAM_REQUEST = 1,
79  OPEN_DOT1X_BAM_RESPONSE = 2,
80  OPEN_DOT1X_BAM_SUCCESS = 3,
81  OPEN_DOT1X_BAM_FAIL = 4,
82  OPEN_DOT1X_BAM_TIMEOUT = 5,
83  OPEN_DOT1X_BAM_IDLE = 6,
84  OPEN_DOT1X_BAM_INITIALIZE = 7,
85 } OPEN_DOT1X_BAM_STATES_t;
86 
87 /* Vlan Assignment Mode */
88 typedef enum
89 {
90  OPEN_DOT1X_DEFAULT_ASSIGNED_VLAN = 1,
91  OPEN_DOT1X_RADIUS_ASSIGNED_VLAN = 2,
92  OPEN_DOT1X_UNAUTHENTICATED_VLAN = 3,
93  OPEN_DOT1X_GUEST_VLAN = 4,
94  OPEN_DOT1X_VOICE_VLAN = 5,
95  OPEN_DOT1X_MONITOR_MODE_VLAN = 6,
96  OPEN_DOT1X_NOT_ASSIGNED = 7,
97 } OPEN_DOT1X_VLAN_ASSIGNED_MODE_t;
98 
99 /*****************************************************************/
113 
114 /*****************************************************************/
128 
129 /*****************************************************************/
143 
144 /*****************************************************************/
158 
159 /*****************************************************************/
173 open_error_t openapiDot1xPortControlModeGet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_DOT1X_PORT_CONTROL_t *mode);
174 
175 /*****************************************************************/
189 open_error_t openapiDot1xPortControlModeSet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_DOT1X_PORT_CONTROL_t mode);
190 
191 /*****************************************************************/
205 open_error_t openapiDot1xPortGuestVlanGet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *vlanId);
206 
207 /*****************************************************************/
221 open_error_t openapiDot1xPortGuestVlanSet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t vlanId);
222 
223 /*****************************************************************/
237 open_error_t openapiDot1xPortMabEnabledGet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_BOOL_t *mabEnabled);
238 
239 /*****************************************************************/
253 open_error_t openapiDot1xPortMabEnabledSet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_BOOL_t mabEnabled);
254 
255 /*****************************************************************/
270  uint32_t ifNum, OPEN_DOT1X_PORT_CONTROL_t *mode);
271 
272 /*****************************************************************/
287  uint32_t ifNum, OPEN_DOT1X_PORT_STATUS_t *status);
288 
289 /*****************************************************************/
304  uint32_t ifNum, OPEN_DOT1X_APM_STATES_t *state);
305 
306 /*****************************************************************/
321  uint32_t ifNum, OPEN_DOT1X_BAM_STATES_t *state);
322 
323 /*****************************************************************/
338  uint32_t ifNum, OPEN_CONTROL_t *mode);
339 
340 /*****************************************************************/
355  uint32_t ifNum, uint32_t *vlan);
356 
357 /*****************************************************************/
372  uint32_t ifNum, OPEN_DOT1X_VLAN_ASSIGNED_MODE_t *reason);
373 
374 /*****************************************************************/
389 open_error_t openapiDot1xLogicalPortFirstGet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *logicalIfNum);
390 
391 /*****************************************************************/
408 open_error_t openapiDot1xLogicalPortNextGet(openapiClientHandle_t *client_handle, uint32_t logicalIfNum, uint32_t *nextLogicalIfNum);
409 
410 /*****************************************************************/
428 
429 /*****************************************************************/
445 open_error_t openapiDot1xLogicalPortVlanAssignmentGet(openapiClientHandle_t *client_handle, uint32_t logicalIfNum, uint32_t *vlan, OPEN_DOT1X_VLAN_ASSIGNED_MODE_t *reason);
446 
447 #endif /* OPENAPI_DOT1X_H_INCLUDED */
448