Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.6.0.3
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 /* Port host mode */
100 typedef enum
101 {
102  OPEN_AUTHMGR_INVALID_HOST_MODE = 0,
103  OPEN_AUTHMGR_SINGLE_AUTH_MODE = 1,
104  OPEN_AUTHMGR_MULTI_HOST_MODE = 2,
105  OPEN_AUTHMGR_MULTI_DOMAIN_AUTH_MODE = 3,
106  OPEN_AUTHMGR_MULTI_AUTH_MODE = 4,
107  OPEN_AUTHMGR_MULTI_DOMAIN_HOST_MODE = 5,
108 } OPEN_AUTHMGR_HOST_CONTROL_t;
109 
110 /* MAB Auth Type */
111 typedef enum
112 {
113  OPEN_AUTHMGR_PORT_MAB_AUTH_TYPE_INVALID = 0,
114  OPEN_AUTHMGR_PORT_MAB_AUTH_TYPE_EAP_MD5 = 1,
115  OPEN_AUTHMGR_PORT_MAB_AUTH_TYPE_PAP = 2,
116  OPEN_AUTHMGR_PORT_MAB_AUTH_TYPE_CHAP = 3,
117 } OPEN_AUTHMGR_PORT_MAB_AUTH_TYPE_t;
118 
119 /*****************************************************************/
133 
134 /*****************************************************************/
148 
149 /*****************************************************************/
163 
164 /*****************************************************************/
178 
179 /*****************************************************************/
193 open_error_t openapiDot1xPortControlModeGet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_DOT1X_PORT_CONTROL_t *mode);
194 
195 /*****************************************************************/
209 open_error_t openapiDot1xPortControlModeSet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_DOT1X_PORT_CONTROL_t mode);
210 
211 /*****************************************************************/
225 open_error_t openapiDot1xPortGuestVlanGet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *vlanId);
226 
227 /*****************************************************************/
241 open_error_t openapiDot1xPortGuestVlanSet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t vlanId);
242 
243 /*****************************************************************/
257 open_error_t openapiDot1xPortMabEnabledGet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_BOOL_t *mabEnabled);
258 
259 /*****************************************************************/
273 open_error_t openapiDot1xPortMabEnabledSet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_BOOL_t mabEnabled);
274 
275 /*****************************************************************/
290  uint32_t ifNum, OPEN_DOT1X_PORT_CONTROL_t *mode);
291 
292 /*****************************************************************/
307  uint32_t ifNum, OPEN_DOT1X_PORT_STATUS_t *status);
308 
309 /*****************************************************************/
324  uint32_t ifNum, OPEN_DOT1X_APM_STATES_t *state);
325 
326 /*****************************************************************/
341  uint32_t ifNum, OPEN_DOT1X_BAM_STATES_t *state);
342 
343 /*****************************************************************/
358  uint32_t ifNum, OPEN_CONTROL_t *mode);
359 
360 /*****************************************************************/
375  uint32_t ifNum, uint32_t *vlan);
376 
377 /*****************************************************************/
392  uint32_t ifNum, OPEN_DOT1X_VLAN_ASSIGNED_MODE_t *reason);
393 
394 /*****************************************************************/
409 open_error_t openapiDot1xLogicalPortFirstGet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *logicalIfNum);
410 
411 /*****************************************************************/
428 open_error_t openapiDot1xLogicalPortNextGet(openapiClientHandle_t *client_handle, uint32_t logicalIfNum, uint32_t *nextLogicalIfNum);
429 
430 /*****************************************************************/
448 
449 /*****************************************************************/
465 open_error_t openapiDot1xLogicalPortVlanAssignmentGet(openapiClientHandle_t *client_handle, uint32_t logicalIfNum, uint32_t *vlan, OPEN_DOT1X_VLAN_ASSIGNED_MODE_t *reason);
466 
467 /*****************************************************************/
483  uint32_t ifNum,
484  OPEN_AUTHMGR_HOST_CONTROL_t mode);
485 
486 /*****************************************************************/
502  uint32_t ifNum,
503  OPEN_AUTHMGR_HOST_CONTROL_t *mode);
504 
505 /*****************************************************************/
522  uint32_t ifNum,
523  OPEN_AUTHMGR_PORT_MAB_AUTH_TYPE_t val);
524 
525 /*****************************************************************/
541  uint32_t ifNum,
542  OPEN_AUTHMGR_PORT_MAB_AUTH_TYPE_t *val);
543 
544 /*****************************************************************/
561  uint32_t ifNum,
562  OPEN_BOOL_t val);
563 
564 /*****************************************************************/
581  uint32_t ifNum,
582  OPEN_BOOL_t *val);
583 
584 /*****************************************************************/
600  uint32_t ifNum,
601  uint32_t val);
602 
603 /*****************************************************************/
619  uint32_t ifNum,
620  uint32_t *val);
621 
622 /*****************************************************************/
640  uint32_t ifNum,
641  OPEN_BOOL_t val);
642 
643 /*****************************************************************/
661  uint32_t ifNum,
662  OPEN_BOOL_t *val);
663 
664 /*****************************************************************/
679  OPEN_CONTROL_t mode);
680 
681 /*****************************************************************/
696  OPEN_CONTROL_t *mode);
697 #endif /* OPENAPI_DOT1X_H_INCLUDED */
698 
open_error_t openapiDot1xPortControlModeGet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_DOT1X_PORT_CONTROL_t *mode)
Gets the dot1x port configured control mode.
open_error_t openapiDot1xLogicalPortVlanAssignmentGet(openapiClientHandle_t *client_handle, uint32_t logicalIfNum, uint32_t *vlan, OPEN_DOT1X_VLAN_ASSIGNED_MODE_t *reason)
Gets the dot1x assigned VLAN ID and reason for the specified logical interface.
open_error_t openapiAuthMgrAuthenticationReAuthPeriodFromServerSet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_BOOL_t val)
Sets the flag to get reauthentication period from server/user for the specified interface.
open_error_t openapiAuthMgrAdminModeGet(openapiClientHandle_t *client_handle, OPEN_CONTROL_t *mode)
Gets the authentication manager global administrative mode.
open_error_t openapiDot1xPortPaeStateGet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_DOT1X_APM_STATES_t *state)
Gets the dot1x port PAE state.
open_error_t openapiDot1xPortControlModeSet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_DOT1X_PORT_CONTROL_t mode)
Sets the dot1x port configured control mode.
open_error_t openapiDot1xPortStatusGet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_DOT1X_PORT_STATUS_t *status)
Gets the dot1x port status.
open_error_t openapiDot1xPortGuestVlanGet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *vlanId)
Gets the dot1x port guest vlan ID.
open_error_t
OPEN uses these enumerators to indicate the error codes.
open_error_t openapiDot1xLogicalPortNextGet(openapiClientHandle_t *client_handle, uint32_t logicalIfNum, uint32_t *nextLogicalIfNum)
Gets the next dot1x logical interface identifier on the same physical port as the given logical inter...
open_error_t openapiDot1xSystemAuthControlModeSet(openapiClientHandle_t *client_handle, OPEN_CONTROL_t mode)
Sets the dot1x global administrative mode.
open_error_t openapiDot1xPortVlanAssignedGet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *vlan)
Gets the dot1x port assigned VLAN.
open_error_t openapiDot1xLogicalPortFirstGet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *logicalIfNum)
Gets the first dot1x logical interface identifier for a given physical port.
open_error_t openapiDot1xPortGuestVlanSet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t vlanId)
Sets the dot1x port guest vlan ID.
open_error_t openapiDot1xDefaultAuthenMethodGet(openapiClientHandle_t *client_handle, OPEN_USER_MGR_AUTH_METHOD_t *method)
Gets the dot1x default authentication method.
open_error_t openapiAuthMgrAuthenticationHostModeSet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_AUTHMGR_HOST_CONTROL_t mode)
Sets the authentication host mode for the specified interface.
open_error_t openapiAuthMgrAuthenticationPeriodicGet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_BOOL_t *val)
Gets the authentication periodic (reauth) enabled status for the specified interface.
OPEN_CONTROL_t
OPEN uses these enumerators to indicate enable or disable for a given config or status parameter...
OPEN_BOOL_t
OPEN uses these enumerators to indicate true or false for a given config or status parameter...
open_error_t openapiDot1xPortBackendAuthStateGet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_DOT1X_BAM_STATES_t *state)
Gets the dot1x port back end authorization state.
open_error_t openapiAuthMgrAdminModeSet(openapiClientHandle_t *client_handle, OPEN_CONTROL_t mode)
Sets the authentication manager global administrative mode.
open_error_t openapiDot1xPortMabEnabledGet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_BOOL_t *mabEnabled)
Sets the dot1x port MAC authentication bypass enable mode.
open_error_t openapiMabPortMABAuthTypeSet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_AUTHMGR_PORT_MAB_AUTH_TYPE_t val)
Sets the authentication type to be used by MAB for the specified interface.
open_error_t openapiDot1xPortOperatingControlModeGet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_DOT1X_PORT_CONTROL_t *mode)
Gets the dot1x port operating control mode.
open_error_t openapiDot1xPortVlanAssignedReasonGet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_DOT1X_VLAN_ASSIGNED_MODE_t *reason)
Gets the dot1x port assigned VLAN reason.
open_error_t openapiAuthMgrAuthenticationReAuthPeriodGet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *val)
Gets the reauthentication period for the specified interface.
open_error_t openapiDot1xPortOperationalMabModeGet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_CONTROL_t *mode)
Gets the dot1x port operational MAB mode.
open_error_t openapiAuthMgrAuthenticationReAuthPeriodServerGet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_BOOL_t *val)
Gets the flag to get reauthentication period from server/user for the specified interface.
open_error_t openapiDot1xLogicalPortSupplicantMacAddrGet(openapiClientHandle_t *client_handle, uint32_t logicalIfNum, open_buffdesc *macAddr)
Gets the MAC address of the dot1x supplicant present on the specified logical interface.
open_error_t openapiDot1xDefaultAuthenMethodSet(openapiClientHandle_t *client_handle, OPEN_USER_MGR_AUTH_METHOD_t method)
Sets the dot1x default authentication method.
open_error_t openapiAuthMgrAuthenticationHostModeGet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_AUTHMGR_HOST_CONTROL_t *mode)
Gets the authentication host mode for the specified interface.
open_error_t openapiDot1xPortMabEnabledSet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_BOOL_t mabEnabled)
Sets the dot1x port MAC authentication bypass enable mode.
open_error_t openapiAuthMgrAuthenticationReAuthPeriodSet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t val)
Sets the reauthentication period for the specified interface.
open_error_t openapiDot1xSystemAuthControlModeGet(openapiClientHandle_t *client_handle, OPEN_CONTROL_t *mode)
Gets the dot1x global administrative mode.
OPEN_USER_MGR_AUTH_METHOD_t
OpEN uses this enumeration to define Authentication method types.
open_error_t openapiAuthMgrAuthenticationPeriodicSet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_BOOL_t val)
Sets the authentication periodic (reauth) enabled status for the specified interface.
open_error_t openapiMabPortMABAuthTypeGet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_AUTHMGR_PORT_MAB_AUTH_TYPE_t *val)
Gets the authentication host mode for the specified interface.