ieee8021_pae_mib_module.h
Go to the documentation of this file.
1 /**
2  * @file ieee8021_pae_mib_module.h
3  * @brief Port Access Control MIB module
4  *
5  * @section License
6  *
7  * SPDX-License-Identifier: GPL-2.0-or-later
8  *
9  * Copyright (C) 2022-2024 Oryx Embedded SARL. All rights reserved.
10  *
11  * This file is part of CycloneEAP Open.
12  *
13  * This program is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU General Public License
15  * as published by the Free Software Foundation; either version 2
16  * of the License, or (at your option) any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU General Public License for more details.
22  *
23  * You should have received a copy of the GNU General Public License
24  * along with this program; if not, write to the Free Software Foundation,
25  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
26  *
27  * @author Oryx Embedded SARL (www.oryx-embedded.com)
28  * @version 2.4.4
29  **/
30 
31 #ifndef _IEEE8021_PAE_MIB_MODULE_H
32 #define _IEEE8021_PAE_MIB_MODULE_H
33 
34 //Dependencies
35 #include "mibs/mib_common.h"
36 #include "eap/eap.h"
38 
39 //Port Access Control MIB module support
40 #ifndef IEEE8021_PAE_MIB_SUPPORT
41  #define IEEE8021_PAE_MIB_SUPPORT DISABLED
42 #elif (IEEE8021_PAE_MIB_SUPPORT != ENABLED && IEEE8021_PAE_MIB_SUPPORT != DISABLED)
43  #error IEEE8021_PAE_MIB_SUPPORT parameter is not valid
44 #endif
45 
46 //Support for SET operations
47 #ifndef IEEE8021_PAE_MIB_SET_SUPPORT
48  #define IEEE8021_PAE_MIB_SET_SUPPORT DISABLED
49 #elif (IEEE8021_PAE_MIB_SET_SUPPORT != ENABLED && IEEE8021_PAE_MIB_SET_SUPPORT != DISABLED)
50  #error IEEE8021_PAE_MIB_SET_SUPPORT parameter is not valid
51 #endif
52 
53 //C++ guard
54 #ifdef __cplusplus
55 extern "C" {
56 #endif
57 
58 
59 /**
60  * @brief Administrative state for port access control
61  **/
62 
63 typedef enum
64 {
68 
69 
70 /**
71  * @brief Port capabilities
72  **/
73 
74 typedef enum
75 {
76  IEEE8021_PAE_MIB_PORT_CAP_AUTH = 0x01, ///<Authenticator functions are supported
77  IEEE8021_PAE_MIB_PORT_CAP_SUPP = 0x02 ///<Supplicant functions are supported
79 
80 
81 /**
82  * @brief Authenticator PAE states
83  **/
84 
85 typedef enum
86 {
98 
99 
100 /**
101  * @brief Backend authentication states
102  **/
103 
104 typedef enum
105 {
115 
116 
117 /**
118  * @brief Controlled directions
119  **/
120 
121 typedef enum
122 {
126 
127 
128 /**
129  * @brief Port status
130  **/
131 
132 typedef enum
133 {
135  IEEE8021_PAE_MIB_PORT_STATUS_UNAUTH = 2 ///<unauthorized
137 
138 
139 /**
140  * @brief Port control
141  **/
142 
143 typedef enum
144 {
147  IEEE8021_PAE_MIB_PORT_CONTROL_FORCE_AUTH = 3 ///<forceAuthorized
149 
150 
151 /**
152  * @brief Authentication method
153  **/
154 
155 typedef enum
156 {
158  IEEE8021_PAE_MIB_AUTH_METHOD_LOCAL_AUTH_SERVER = 2 ///<localAuthServer
160 
161 
162 /**
163  * @brief Session terminate cause
164  **/
165 
166 typedef enum
167 {
175  IEEE8021_PAE_MIB_TERMINATE_CAUSE_NOT_TERMINATED_YET = 999 ///<notTerminatedYet
177 
178 
179 /**
180  * @brief Port Access Control MIB base
181  **/
182 
183 typedef struct
184 {
185 #if (AUTHENTICATOR_SUPPORT == ENABLED)
187 #endif
189 
190 
191 //Port Access Control MIB related constants
193 extern const MibObject ieee8021PaeMibObjects[];
194 extern const MibModule ieee8021PaeMibModule;
195 
196 //C++ guard
197 #ifdef __cplusplus
198 }
199 #endif
200 
201 #endif
@ IEEE8021_PAE_MIB_SYS_AUTH_CONTROL_DISABLED
disabled
@ IEEE8021_PAE_MIB_TERMINATE_CAUSE_REAUTH_FAILED
reauthFailed
@ IEEE8021_PAE_MIB_AUTH_BACKEND_STATE_REQUEST
request
@ IEEE8021_PAE_MIB_PORT_CONTROL_FORCE_UNAUTH
forceUnauthorized
@ IEEE8021_PAE_MIB_AUTH_PAE_STATE_RESTART
restart
@ IEEE8021_PAE_MIB_SYS_AUTH_CONTROL_ENABLED
enabled
@ IEEE8021_PAE_MIB_AUTH_PAE_STATE_CONNECTING
connecting
@ IEEE8021_PAE_MIB_AUTH_PAE_STATE_INITIALIZE
initialize
@ IEEE8021_PAE_MIB_AUTH_BACKEND_STATE_FAIL
fail
Ieee8021PaeMibTerminateCause
Session terminate cause.
@ IEEE8021_PAE_MIB_AUTH_PAE_STATE_DISCONNECTED
disconnected
@ IEEE8021_PAE_MIB_AUTH_BACKEND_STATE_INITIALIZE
initialize
@ IEEE8021_PAE_MIB_TERMINATE_CAUSE_SUPPLICANT_LOGOFF
supplicantLogoff
@ IEEE8021_PAE_MIB_TERMINATE_CAUSE_NOT_TERMINATED_YET
notTerminatedYet
@ IEEE8021_PAE_MIB_PORT_CONTROL_AUTO
auto
@ IEEE8021_PAE_MIB_AUTH_BACKEND_STATE_TIMEOUT
timeout
AuthenticatorContext * authContext
@ IEEE8021_PAE_MIB_PORT_CONTROL_FORCE_AUTH
forceAuthorized
@ IEEE8021_PAE_MIB_CONTROL_DIR_IN
in
@ IEEE8021_PAE_MIB_CONTROL_DIR_BOTH
both
802.1X authenticator
@ IEEE8021_PAE_MIB_PORT_STATUS_AUTH
authorized
@ IEEE8021_PAE_MIB_TERMINATE_CAUSE_AUTH_CONTROL_FORCE_UNAUTH
authControlForceUnauth
@ IEEE8021_PAE_MIB_AUTH_BACKEND_STATE_SUCCESS
success
@ IEEE8021_PAE_MIB_AUTH_METHOD_REMOTE_AUTH_SERVER
remoteAuthServer
@ IEEE8021_PAE_MIB_PORT_STATUS_UNAUTH
unauthorized
@ IEEE8021_PAE_MIB_PORT_CAP_AUTH
Authenticator functions are supported.
const MibObject ieee8021PaeMibObjects[]
Port Access Control MIB objects.
MIB module.
Definition: mib_common.h:292
@ IEEE8021_PAE_MIB_TERMINATE_CAUSE_PORT_FAILURE
portFailure
@ IEEE8021_PAE_MIB_TERMINATE_CAUSE_PORT_ADMIN_DISABLED
portAdminDisabled
@ IEEE8021_PAE_MIB_AUTH_BACKEND_STATE_IGNORE
ignore
@ IEEE8021_PAE_MIB_AUTH_PAE_STATE_AUTHENTICATED
authenticated
@ IEEE8021_PAE_MIB_AUTH_BACKEND_STATE_RESPONSE
response
#define AuthenticatorContext
Definition: authenticator.h:36
@ IEEE8021_PAE_MIB_PORT_CAP_SUPP
Supplicant functions are supported.
Common definitions for MIB modules.
Ieee8021PaeMibPortControl
Port control.
@ IEEE8021_PAE_MIB_AUTH_PAE_STATE_ABORTING
aborting
#define MibObject
Definition: mib_common.h:46
@ IEEE8021_PAE_MIB_AUTH_PAE_STATE_HELD
held
Ieee8021PaeMibPortStatus
Port status.
@ IEEE8021_PAE_MIB_AUTH_PAE_STATE_FORCE_AUTH
forceAuth
Ieee8021PaeMibControlledDir
Controlled directions.
@ IEEE8021_PAE_MIB_TERMINATE_CAUSE_SUPPLICANT_RESTART
supplicantRestart
Port Access Control MIB base.
Ieee8021PaeMibAuthPaeState
Authenticator PAE states.
@ IEEE8021_PAE_MIB_AUTH_BACKEND_STATE_IDLE
idle
Ieee8021PaeMibAuthMethod
Authentication method.
@ IEEE8021_PAE_MIB_AUTH_METHOD_LOCAL_AUTH_SERVER
localAuthServer
const MibModule ieee8021PaeMibModule
Port Access Control MIB module.
Ieee8021PaeMibBase ieee8021PaeMibBase
Port Access Control MIB base.
@ IEEE8021_PAE_MIB_AUTH_PAE_STATE_AUTHENTICATING
authenticating
EAP (Extensible Authentication Protocol)
@ IEEE8021_PAE_MIB_AUTH_PAE_STATE_FORCE_UNAUTH
forceUnauth
@ IEEE8021_PAE_MIB_TERMINATE_CAUSE_PORT_REINIT
portReInit
Ieee8021PaeMibSysPortControl
Administrative state for port access control.
Ieee8021PaeMibPortCap
Port capabilities.
Ieee8021PaeMibAuthBackendState
Backend authentication states.