authenticator.c
error_t authenticatorSetServerAddr(AuthenticatorContext *context, const IpAddr *serverIpAddr, uint16_t serverPort)
Specify the IP address of the RADIUS server.
Definition: authenticator.c:236
OsTaskId osCreateTask(const char_t *name, OsTaskCode taskCode, void *arg, const OsTaskParameters *params)
Create a task.
Definition: os_port_chibios.c:80
error_t authenticatorGetPortControl(AuthenticatorContext *context, uint_t portIndex, AuthenticatorPortMode *portControl)
Get the current value of the AuthControlledPortControl parameter.
Definition: authenticator.c:562
@ AUTHENTICATOR_TERMINATE_CAUSE_PORT_FAILURE
Definition: authenticator.h:216
error_t authenticatorMgmtSetQuietPeriod(AuthenticatorContext *context, uint_t portIndex, uint_t quietPeriod, bool_t commit)
Set the value of the quietPeriod parameter.
Definition: authenticator_mgmt.c:223
void authenticatorGeneratePortAddr(AuthenticatorPort *port)
Port's MAC address generation.
Definition: authenticator_misc.c:132
error_t authenticatorStart(AuthenticatorContext *context)
Start 802.1X authenticator.
Definition: authenticator.c:873
error_t authenticatorGetPaeState(AuthenticatorContext *context, uint_t portIndex, AuthenticatorPaeState *paeState)
Get the current state of the authenticator PAE state state machine.
Definition: authenticator.c:748
void authenticatorProcessRadiusPacket(AuthenticatorContext *context)
Process incoming RADIUS packet.
Definition: authenticator_misc.c:807
@ AUTHENTICATOR_PORT_MODE_FORCE_AUTH
Definition: authenticator_pae_fsm.h:81
error_t authenticatorSetPortControl(AuthenticatorContext *context, uint_t portIndex, AuthenticatorPortMode portControl)
Set the value of the AuthControlledPortControl parameter.
Definition: authenticator.c:377
void authenticatorInitFsm(AuthenticatorContext *context)
Authenticator state machine initialization.
Definition: authenticator_fsm.c:53
error_t authenticatorSetReAuthEnabled(AuthenticatorContext *context, uint_t portIndex, bool_t reAuthEnabled)
Set the value of the reAuthEnabled parameter.
Definition: authenticator.c:488
error_t authenticatorMgmtSetServerTimeout(AuthenticatorContext *context, uint_t portIndex, uint_t serverTimeout, bool_t commit)
Set the value of the serverTimeout parameter.
Definition: authenticator_mgmt.c:278
#define AUTHENTICATOR_DEFAULT_REAUTH_MAX
Definition: authenticator.h:113
error_t authenticatorInitPort(AuthenticatorContext *context, uint_t portIndex)
Reinitialize the specified port.
Definition: authenticator.c:304
error_t authenticatorGetServerTimeout(AuthenticatorContext *context, uint_t portIndex, uint_t *serverTimeout)
Get the current value of the serverTimeout parameter.
Definition: authenticator.c:624
error_t authenticatorDropPaeGroupAddr(AuthenticatorContext *context)
Remove the PAE group address from the static MAC table.
Definition: authenticator_misc.c:262
#define AUTHENTICATOR_MAX_SERVER_KEY_LEN
Definition: authenticator.h:92
error_t authenticatorMgmtSetInitialize(AuthenticatorContext *context, uint_t portIndex, bool_t initialize, bool_t commit)
Force the value of the initialize variable.
Definition: authenticator_mgmt.c:80
AuthenticatorBackendStateChangeCallback backendStateChangeCallback
Backend authentication state change callback function.
Definition: authenticator.h:435
error_t authenticatorGetBackendState(AuthenticatorContext *context, uint_t portIndex, AuthenticatorBackendState *backendState)
Get the current state of the backend authentication state machine.
Definition: authenticator.c:780
Helper functions for 802.1X authenticator.
error_t authenticatorMgmtSetPortControl(AuthenticatorContext *context, uint_t portIndex, AuthenticatorPortMode portControl, bool_t commit)
Set the value of the AuthControlledPortControl parameter.
Definition: authenticator_mgmt.c:181
#define AUTHENTICATOR_DEFAULT_MAX_RETRANS
Definition: authenticator.h:141
#define AUTHENTICATOR_DEFAULT_SERVER_TIMEOUT
Definition: authenticator.h:127
error_t authenticatorStop(AuthenticatorContext *context)
Stop 802.1X authenticator.
Definition: authenticator.c:1005
error_t authenticatorGetQuietPeriod(AuthenticatorContext *context, uint_t portIndex, uint_t *quietPeriod)
Get the current value of the quietPeriod parameter.
Definition: authenticator.c:593
802.1X authenticator
error_t authenticatorSetReAuthPeriod(AuthenticatorContext *context, uint_t portIndex, uint_t reAuthPeriod)
Set the value of the reAuthPeriod parameter.
Definition: authenticator.c:525
error_t authenticatorGetReauthTimerState(AuthenticatorContext *context, uint_t portIndex, AuthenticatorReauthTimerState *reauthTimerState)
Get the current state of the reauthentication timer state machine.
Definition: authenticator.c:812
error_t authenticatorGetEapFullAuthState(AuthenticatorContext *context, uint_t portIndex, EapFullAuthState *eapFullAuthState)
Get the current state of the EAP full authenticator state machine.
Definition: authenticator.c:844
error_t authenticatorSetServerKey(AuthenticatorContext *context, const uint8_t *key, size_t keyLen)
Set RADIUS server's key.
Definition: authenticator.c:266
AuthenticatorPaeStateChangeCallback paeStateChangeCallback
Authenticator PAE state change callback function.
Definition: authenticator.h:434
RADIUS (Remote Authentication Dial In User Service)
error_t authenticatorInit(AuthenticatorContext *context, const AuthenticatorSettings *settings)
Initialize 802.1X authenticator context.
Definition: authenticator.c:100
error_t authenticatorMgmtSetReAuthPeriod(AuthenticatorContext *context, uint_t portIndex, uint_t reAuthPeriod, bool_t commit)
Set the value of the reAuthPeriod parameter.
Definition: authenticator_mgmt.c:337
Socket * socketOpen(uint_t type, uint_t protocol)
Create a socket (UDP or TCP)
Definition: socket.c:125
error_t authenticatorMgmtSetReauthenticate(AuthenticatorContext *context, uint_t portIndex, bool_t reAuthenticate, bool_t commit)
Force the value of the reAuthenticate variable.
Definition: authenticator_mgmt.c:135
AuthenticatorReauthTimerStateChangeCallback reauthTimerStateChangeCallback
Reauthentication timer state change callback function.
Definition: authenticator.h:436
Authenticator state machine.
error_t authenticatorGetReAuthPeriod(AuthenticatorContext *context, uint_t portIndex, uint_t *reAuthPeriod)
Get the current value of the reAuthPeriod parameter.
Definition: authenticator.c:686
error_t socketPoll(SocketEventDesc *eventDesc, uint_t size, OsEvent *extEvent, systime_t timeout)
Wait for one of a set of sockets to become ready to perform I/O.
Definition: socket.c:2149
Management of the 802.1X authenticator.
error_t authenticatorSetServerTimeout(AuthenticatorContext *context, uint_t portIndex, uint_t serverTimeout)
Set the value of the serverTimeout parameter.
Definition: authenticator.c:451
error_t authenticatorAcceptPaeGroupAddr(AuthenticatorContext *context)
Add the PAE group address to the static MAC table.
Definition: authenticator_misc.c:212
error_t authenticatorGetPortStatus(AuthenticatorContext *context, uint_t portIndex, AuthenticatorPortStatus *portStatus)
Get the current value of the AuthControlledPortStatus variable.
Definition: authenticator.c:717
error_t authenticatorMgmtSetReAuthEnabled(AuthenticatorContext *context, uint_t portIndex, bool_t reAuthEnabled, bool_t commit)
Set the value of the reAuthEnabled parameter.
Definition: authenticator_mgmt.c:395
error_t authenticatorGetReAuthEnabled(AuthenticatorContext *context, uint_t portIndex, bool_t *reAuthEnabled)
Get the current value of the reAuthEnabled parameter.
Definition: authenticator.c:655
void authenticatorTick(AuthenticatorContext *context)
Handle periodic operations.
Definition: authenticator_misc.c:57
#define AUTHENTICATOR_DEFAULT_QUIET_PERIOD
Definition: authenticator.h:99
#define AUTHENTICATOR_DEFAULT_REAUTH_PERIOD
Definition: authenticator.h:155
void osAcquireMutex(OsMutex *mutex)
Acquire ownership of the specified mutex object.
Definition: os_port_chibios.c:396
void osReleaseMutex(OsMutex *mutex)
Release ownership of the specified mutex object.
Definition: os_port_chibios.c:408
error_t authenticatorSetQuietPeriod(AuthenticatorContext *context, uint_t portIndex, uint_t quietPeriod)
Set the value of the quietPeriod parameter.
Definition: authenticator.c:414
void osSetEvent(OsEvent *event)
Set the specified event object to the signaled state.
Definition: os_port_chibios.c:202
void authenticatorGetDefaultSettings(AuthenticatorSettings *settings)
Initialize settings with default values.
Definition: authenticator.c:51
void authenticatorProcessEapolPdu(AuthenticatorContext *context)
Process incoming EAPOL PDU.
Definition: authenticator_misc.c:357
error_t authenticatorReauthenticate(AuthenticatorContext *context, uint_t portIndex)
Force the authenticator to reauthenticate the supplicant.
Definition: authenticator.c:340
AuthenticatorReauthTimerState
Reauthentication timer states.
Definition: authenticator_reauth_timer_fsm.h:48
EapFullAuthStateChangeCallback eapFullAuthStateChangeCallback
EAP full authenticator state change callback function.
Definition: authenticator.h:437
error_t socketSetTimeout(Socket *socket, systime_t timeout)
Set timeout value for blocking operations.
Definition: socket.c:148
Debugging facilities.
void authenticatorDeinit(AuthenticatorContext *context)
Release 802.1X authenticator context.
Definition: authenticator.c:1151
void authenticatorTask(AuthenticatorContext *context)
802.1X authenticator task
Definition: authenticator.c:1052