Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.12.0.1
openapi_dot1x.h
Go to the documentation of this file.
1 
9 /*********************************************************************
10 *
11 * Copyright 2016-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_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 
100 typedef enum
101 {
106 
108 typedef enum
109 {
113 
114 /*****************************************************************/
128 
129 /*****************************************************************/
143 
144 /*****************************************************************/
158 
159 /*****************************************************************/
173 
174 /*****************************************************************/
189 open_error_t openapiDot1xPortControlModeGet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_DOT1X_PORT_CONTROL_t *mode);
190 
191 /*****************************************************************/
206 open_error_t openapiDot1xPortControlModeSet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_DOT1X_PORT_CONTROL_t mode);
207 
208 /*****************************************************************/
223 open_error_t openapiDot1xPortGuestVlanGet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *vlanId);
224 
225 /*****************************************************************/
240 open_error_t openapiDot1xPortGuestVlanSet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t vlanId);
241 
242 /*****************************************************************/
257 open_error_t openapiDot1xPortMabEnabledGet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_BOOL_t *mabEnabled);
258 
259 /*****************************************************************/
274 open_error_t openapiDot1xPortMabEnabledSet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_BOOL_t mabEnabled);
275 
276 /*****************************************************************/
292  uint32_t ifNum, OPEN_DOT1X_PORT_CONTROL_t *mode);
293 
294 /*****************************************************************/
310  uint32_t ifNum, OPEN_DOT1X_PORT_STATUS_t *status);
311 
312 /*****************************************************************/
327  uint32_t ifNum, OPEN_DOT1X_APM_STATES_t *state);
328 
329 /*****************************************************************/
349  uint32_t ifNum, OPEN_DOT1X_BAM_STATES_t *state);
350 
351 /*****************************************************************/
367  uint32_t ifNum, OPEN_CONTROL_t *mode);
368 
369 /*****************************************************************/
385  uint32_t ifNum, uint32_t *vlan);
386 
387 /*****************************************************************/
403  uint32_t ifNum, OPEN_DOT1X_VLAN_ASSIGNED_MODE_t *reason);
404 
405 /*****************************************************************/
420 open_error_t openapiDot1xLogicalPortFirstGet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *logicalIfNum);
421 
422 /*****************************************************************/
439 open_error_t openapiDot1xLogicalPortNextGet(openapiClientHandle_t *client_handle, uint32_t logicalIfNum, uint32_t *nextLogicalIfNum);
440 
441 /*****************************************************************/
459 
460 
461 /*****************************************************************/
478 open_error_t openapiDot1xLogicalPortVlanAssignmentGet(openapiClientHandle_t *client_handle, uint32_t logicalIfNum, uint32_t *vlan, OPEN_DOT1X_VLAN_ASSIGNED_MODE_t *reason);
479 
480 /*************************************************************************/
496 
497 /*************************************************************************/
513 
514 /*************************************************************************/
533 open_error_t openapiDot1xPortQuietPeriodSet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t quietPeriod);
534 
535 /*************************************************************************/
554 open_error_t openapiDot1xPortQuietPeriodGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t *quietPeriod);
555 
556 /*************************************************************************/
575 open_error_t openapiDot1xPortTxPeriodSet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t txPeriod);
576 
577 /*************************************************************************/
596 open_error_t openapiDot1xPortTxPeriodGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t *txPeriod);
597 
598 /*************************************************************************/
614 open_error_t openapiDot1xPortEapolFramesRxGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t *eapolFramesRx);
615 
616 /*************************************************************************/
632 open_error_t openapiDot1xPortEapolFramesTxGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t *eapolFramesTx);
633 
634 /*************************************************************************/
650 open_error_t openapiDot1xPortEapolStartFramesRxGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t *eapolStartFramesRx);
651 
652 /*************************************************************************/
668 open_error_t openapiDot1xPortEapolLogoffFramesRxGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t *eapolLogoffFramesRx);
669 
670 /*************************************************************************/
686 open_error_t openapiDot1xPortEapRespIdFramesRxGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t *eapRespIdFramesRx);
687 
688 /*************************************************************************/
704 open_error_t openapiDot1xPortEapResponseFramesRxGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t *eapResponseFramesRx);
705 
706 /*************************************************************************/
722 open_error_t openapiDot1xPortEapReqIdFramesTxGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t *eapReqIdFramesTx);
723 
724 /*************************************************************************/
740 open_error_t openapiDot1xPortEapReqFramesTxGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t *eapReqFramesTx);
741 
742 /*************************************************************************/
758 open_error_t openapiDot1xPortInvalidEapolFramesRxGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t *invalidEapolFramesRx);
759 
760 /*************************************************************************/
776 open_error_t openapiDot1xPortEapLengthErrorFramesRxGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t *eapLengthErrorFramesRx);
777 
778 /*************************************************************************/
794 open_error_t openapiDot1xPortLastEapolFrameVersionGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t *lastEapolFrameVersion);
795 
796 /*************************************************************************/
812 open_error_t openapiDot1xPortLastEapolFrameSourceGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, open_buffdesc *lastEapolFrameSource);
813 
814 /*************************************************************************/
829 open_error_t openapiDot1xPortStatsClear(openapiClientHandle_t *client_handle, uint32_t intIfNum);
830 
831 /*************************************************************************/
853  uint32_t intIfNum,
854  uint32_t maxReAuthReqIndentity);
855 
856 /*************************************************************************/
877  uint32_t intIfNum,
878  uint32_t *pMaxReAuthReqIndentity);
879 
880 /*************************************************************************/
898 open_error_t openapiDot1xPortMaxReqSet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t maxReq);
899 
900 /*************************************************************************/
916 open_error_t openapiDot1xPortMaxReqGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t *pMaxReq);
917 
918 /*************************************************************************/
936 open_error_t openapiDot1xPortSuppTimeoutSet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t suppTimeout);
937 
938 /*************************************************************************/
954 open_error_t openapiDot1xPortSuppTimeoutGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t *pSuppTimeout);
955 
956 /*************************************************************************/
974 open_error_t openapiDot1xPortServerTimeoutSet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t serverTimeout);
975 
976 /*************************************************************************/
992 open_error_t openapiDot1xPortServerTimeoutGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t *pServerTimeout);
993 
994 /*************************************************************************/
1013 
1014 /*************************************************************************/
1031 
1032 /*************************************************************************/
1049 
1050 
1051 
1052 #endif /* OPENAPI_DOT1X_H_INCLUDED */
1053 
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 openapiDot1xPortMaxReAuthReqIdentityGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t *pMaxReAuthReqIndentity)
Get the configured dot1x max reauth request-identity retries count on the specified port...
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 openapiDot1xPortLastEapolFrameSourceGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, open_buffdesc *lastEapolFrameSource)
Get the dot1x port Last Eapol Frame Source Stat.
open_error_t openapiDot1xPortStatsClear(openapiClientHandle_t *client_handle, uint32_t intIfNum)
Clear the dot1x stats on the specified port.
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 openapiDot1xPortTxPeriodSet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t txPeriod)
Set the dot1x transmit period on the specified port.
open_error_t openapiDot1xPortInvalidEapolFramesRxGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t *invalidEapolFramesRx)
Get the dot1x port Invalid Eapol Frames Received Stat.
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 openapiDot1xPortMaxReqSet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t maxReq)
Sets the dot1x max requests on the specified port.
open_error_t openapiDot1xPortPaeCapabilitiesGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, OPEN_DOT1X_PAE_PORT_CAPABILITY *pPaeCapability)
Gets dot1x PAE capabilities on the specified port.
open_error_t openapiDot1xPortEapReqFramesTxGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t *eapReqFramesTx)
Get the dot1x port Eap Request Frames Transmitted Stat.
version 1 is the 2001 standard of 802.1x
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 openapiDot1xPortSuppTimeoutGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t *pSuppTimeout)
Gets dot1x supplicant timeout on the specified port.
open_error_t openapiDot1xPortTxPeriodGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t *txPeriod)
Get the dot1x transmit period on the specified port.
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 openapiDot1xPortPaeCapabilitiesSet(openapiClientHandle_t *client_handle, uint32_t intIfNum, OPEN_DOT1X_PAE_PORT_CAPABILITY paeCapability)
Sets the port's dot1x capabilities (Supplicant or Authenticator).
version 3 is the 2010 standard of 802.1x
open_error_t openapiDot1xPortEapLengthErrorFramesRxGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t *eapLengthErrorFramesRx)
Get the dot1x port Eap Length error Frames Received Stat.
open_error_t openapiDot1xPortLastEapolFrameVersionGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t *lastEapolFrameVersion)
Get the dot1x port Last Eapol Frame Version Stat.
open_error_t openapiDot1xPortGuestVlanSet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t vlanId)
Sets the dot1x port guest vlan ID.
open_error_t openapiDot1xPortMaxReAuthReqIdentitySet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t maxReAuthReqIndentity)
Set the dot1x max reauth request-identity retries count on the specified port.
open_error_t openapiDot1xPortEapolFramesRxGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t *eapolFramesRx)
Get the dot1x port Eapol Frames Received Stats.
open_error_t openapiDot1xDefaultAuthenMethodGet(openapiClientHandle_t *client_handle, OPEN_USER_MGR_AUTH_METHOD_t *method)
Gets the dot1x default authentication method.
open_error_t openapiDot1xPortEapolStartFramesRxGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t *eapolStartFramesRx)
Get the dot1x port Eapol Start Frames Received Stats.
open_error_t openapiDot1xPortEapolLogoffFramesRxGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t *eapolLogoffFramesRx)
Get the dot1x port Eapol Logoff Frames Received Stat.
version 2 is the 2004 standard of 802.1x
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 openapiDot1xPortServerTimeoutGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t *pServerTimeout)
Gets dot1x Authentiation Server timeout on the specified port.
open_error_t openapiDot1xPortEapResponseFramesRxGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t *eapResponseFramesRx)
Get the dot1x port Eap Response Frames Received Stat.
open_error_t openapiDot1xPortServerTimeoutSet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t serverTimeout)
Sets the dot1x Authentiation server timeout on the specified port.
open_error_t openapiDot1xPortMaxReqGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t *pMaxReq)
Gets dot1x max requests on the specified port.
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 openapiDot1xPortQuietPeriodGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t *quietPeriod)
Get the dot1x quiet period on the specified port.
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 openapiDot1xPortSuppTimeoutSet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t suppTimeout)
Sets the dot1x supplicant timeout on the specified port.
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_DOT1X_PAE_PORT_CAPABILITY
Port PAE capabilities.
open_error_t openapiDot1xPortProtocolVersionGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, OPEN_DOT1X_PAE_PORT_PROTOCOL_VERSION_t *pProtocolVersion)
Gets dot1x protocol version on the specified port.
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 openapiDot1xPortEapRespIdFramesRxGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t *eapRespIdFramesRx)
Get number of EAP Response/Identity frames received.
open_error_t openapiDot1xPortEapolFramesTxGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t *eapolFramesTx)
Get the dot1x port Eapol Frames Transmitted Stats.
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 openapiDot1xEapolFloodModeGet(openapiClientHandle_t *client_handle, OPEN_CONTROL_t *adminMode)
Get eapol flood mode setting for dot1x.
open_error_t openapiDot1xDefaultAuthenMethodSet(openapiClientHandle_t *client_handle, OPEN_USER_MGR_AUTH_METHOD_t method)
Sets the dot1x default authentication method.
open_error_t openapiDot1xPortQuietPeriodSet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t quietPeriod)
Set the dot1x quiet period on the specified port.
open_error_t openapiDot1xPortEapReqIdFramesTxGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t *eapReqIdFramesTx)
Get the dot1x port Eap Request Id Frames Transmitted Stat.
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 openapiDot1xSystemAuthControlModeGet(openapiClientHandle_t *client_handle, OPEN_CONTROL_t *mode)
Gets the dot1x global administrative mode.
open_error_t openapiDot1xEapolFloodModeSet(openapiClientHandle_t *client_handle, OPEN_CONTROL_t adminMode)
Set eapol flood mode setting for dot1x.
OPEN_USER_MGR_AUTH_METHOD_t
OpEN uses this enumeration to define Authentication method types.
OPEN_DOT1X_PAE_PORT_PROTOCOL_VERSION_t
Port protocol version.