802.1X supplicant More...
#include "eap/eap.h"
#include "eap/eap_peer_fsm.h"
#include "supplicant/supplicant_pae_fsm.h"
#include "supplicant/supplicant_backend_fsm.h"
#include "core/crypto.h"
#include "tls.h"
Go to the source code of this file.
Data Structures | |
struct | SupplicantSettings |
802.1X supplicant settings More... | |
struct | _SupplicantContext |
802.1X supplicant context More... | |
Macros | |
#define | SupplicantContext struct _SupplicantContext |
#define | SUPPLICANT_SUPPORT ENABLED |
#define | SUPPLICANT_STACK_SIZE 750 |
#define | SUPPLICANT_PRIORITY OS_TASK_PRIORITY_NORMAL |
#define | SUPPLICANT_TICK_INTERVAL 1000 |
#define | SUPPLICANT_TX_BUFFER_SIZE 3000 |
#define | SUPPLICANT_RX_BUFFER_SIZE 1500 |
#define | SUPPLICANT_MAX_USERNAME_LEN 64 |
#define | SUPPLICANT_MAX_PASSWORD_LEN 64 |
#define | SUPPLICANT_DEFAULT_HELD_PERIOD 60 |
#define | SUPPLICANT_DEFAULT_START_PERIOD 30 |
#define | SUPPLICANT_DEFAULT_MAX_START 3 |
#define | SUPPLICANT_DEFAULT_AUTH_PERIOD 30 |
Typedefs | |
typedef error_t(* | SupplicantTlsInitCallback) (SupplicantContext *context, TlsContext *tlsContext) |
TLS initialization callback function. More... | |
typedef void(* | SupplicantPaeStateChangeCallback) (SupplicantContext *context, SupplicantPaeState state) |
Supplicant PAE state change callback function. More... | |
typedef void(* | SupplicantBackendStateChangeCallback) (SupplicantContext *context, SupplicantBackendState state) |
Supplicant backend state change callback function. More... | |
typedef void(* | EapPeerStateChangeCallback) (SupplicantContext *context, EapPeerState state) |
EAP peer state change callback function. More... | |
typedef void(* | SupplicantTickCallback) (SupplicantContext *context) |
Tick callback function. More... | |
Functions | |
void | supplicantGetDefaultSettings (SupplicantSettings *settings) |
Initialize settings with default values. More... | |
error_t | supplicantInit (SupplicantContext *context, const SupplicantSettings *settings) |
Initialize 802.1X supplicant context. More... | |
error_t | supplicantSetUsername (SupplicantContext *context, const char_t *username) |
Set user name. More... | |
error_t | supplicantSetPassword (SupplicantContext *context, const char_t *password) |
Set password. More... | |
error_t | supplicantStart (SupplicantContext *context) |
Start 802.1X supplicant. More... | |
error_t | supplicantStop (SupplicantContext *context) |
Stop 802.1X supplicant. More... | |
void | supplicantTask (SupplicantContext *context) |
802.1X supplicant task More... | |
void | supplicantDeinit (SupplicantContext *context) |
Release 802.1X supplicant context. More... | |
Detailed Description
802.1X supplicant
License
SPDX-License-Identifier: GPL-2.0-or-later
Copyright (C) 2022-2024 Oryx Embedded SARL. All rights reserved.
This file is part of CycloneEAP Open.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- Version
- 2.4.0
Definition in file supplicant.h.
Macro Definition Documentation
◆ SUPPLICANT_DEFAULT_AUTH_PERIOD
#define SUPPLICANT_DEFAULT_AUTH_PERIOD 30 |
Definition at line 121 of file supplicant.h.
◆ SUPPLICANT_DEFAULT_HELD_PERIOD
#define SUPPLICANT_DEFAULT_HELD_PERIOD 60 |
Definition at line 100 of file supplicant.h.
◆ SUPPLICANT_DEFAULT_MAX_START
#define SUPPLICANT_DEFAULT_MAX_START 3 |
Definition at line 114 of file supplicant.h.
◆ SUPPLICANT_DEFAULT_START_PERIOD
#define SUPPLICANT_DEFAULT_START_PERIOD 30 |
Definition at line 107 of file supplicant.h.
◆ SUPPLICANT_MAX_PASSWORD_LEN
#define SUPPLICANT_MAX_PASSWORD_LEN 64 |
Definition at line 93 of file supplicant.h.
◆ SUPPLICANT_MAX_USERNAME_LEN
#define SUPPLICANT_MAX_USERNAME_LEN 64 |
Definition at line 86 of file supplicant.h.
◆ SUPPLICANT_PRIORITY
#define SUPPLICANT_PRIORITY OS_TASK_PRIORITY_NORMAL |
Definition at line 60 of file supplicant.h.
◆ SUPPLICANT_RX_BUFFER_SIZE
#define SUPPLICANT_RX_BUFFER_SIZE 1500 |
Definition at line 79 of file supplicant.h.
◆ SUPPLICANT_STACK_SIZE
#define SUPPLICANT_STACK_SIZE 750 |
Definition at line 53 of file supplicant.h.
◆ SUPPLICANT_SUPPORT
#define SUPPLICANT_SUPPORT ENABLED |
Definition at line 46 of file supplicant.h.
◆ SUPPLICANT_TICK_INTERVAL
#define SUPPLICANT_TICK_INTERVAL 1000 |
Definition at line 65 of file supplicant.h.
◆ SUPPLICANT_TX_BUFFER_SIZE
#define SUPPLICANT_TX_BUFFER_SIZE 3000 |
Definition at line 72 of file supplicant.h.
◆ SupplicantContext
#define SupplicantContext struct _SupplicantContext |
Definition at line 36 of file supplicant.h.
Typedef Documentation
◆ EapPeerStateChangeCallback
typedef void(* EapPeerStateChangeCallback) (SupplicantContext *context, EapPeerState state) |
EAP peer state change callback function.
Definition at line 170 of file supplicant.h.
◆ SupplicantBackendStateChangeCallback
typedef void(* SupplicantBackendStateChangeCallback) (SupplicantContext *context, SupplicantBackendState state) |
Supplicant backend state change callback function.
Definition at line 162 of file supplicant.h.
◆ SupplicantPaeStateChangeCallback
typedef void(* SupplicantPaeStateChangeCallback) (SupplicantContext *context, SupplicantPaeState state) |
Supplicant PAE state change callback function.
Definition at line 154 of file supplicant.h.
◆ SupplicantTickCallback
typedef void(* SupplicantTickCallback) (SupplicantContext *context) |
Tick callback function.
Definition at line 178 of file supplicant.h.
◆ SupplicantTlsInitCallback
typedef error_t(* SupplicantTlsInitCallback) (SupplicantContext *context, TlsContext *tlsContext) |
TLS initialization callback function.
Definition at line 144 of file supplicant.h.
Function Documentation
◆ supplicantDeinit()
void supplicantDeinit | ( | SupplicantContext * | context | ) |
Release 802.1X supplicant context.
- Parameters
-
[in] context Pointer to the 802.1X supplicant context
Definition at line 424 of file supplicant.c.
◆ supplicantGetDefaultSettings()
void supplicantGetDefaultSettings | ( | SupplicantSettings * | settings | ) |
Initialize settings with default values.
- Parameters
-
[out] settings Structure that contains 802.1X supplicant settings
Definition at line 49 of file supplicant.c.
◆ supplicantInit()
error_t supplicantInit | ( | SupplicantContext * | context, |
const SupplicantSettings * | settings | ||
) |
Initialize 802.1X supplicant context.
- Parameters
-
[in] context Pointer to the 802.1X supplicant context [in] settings 802.1X supplicant specific settings
- Returns
- Error code
Definition at line 84 of file supplicant.c.
◆ supplicantSetPassword()
error_t supplicantSetPassword | ( | SupplicantContext * | context, |
const char_t * | password | ||
) |
Set password.
- Parameters
-
[in] context Pointer to the 802.1X supplicant context [in] password NULL-terminated string containing the password
- Returns
- Error code
Definition at line 174 of file supplicant.c.
◆ supplicantSetUsername()
error_t supplicantSetUsername | ( | SupplicantContext * | context, |
const char_t * | username | ||
) |
Set user name.
- Parameters
-
[in] context Pointer to the 802.1X supplicant context [in] username NULL-terminated string containing the user name
- Returns
- Error code
Definition at line 148 of file supplicant.c.
◆ supplicantStart()
error_t supplicantStart | ( | SupplicantContext * | context | ) |
Start 802.1X supplicant.
- Parameters
-
[in] context Pointer to the 802.1X supplicant context
- Returns
- Error code
Definition at line 204 of file supplicant.c.
◆ supplicantStop()
error_t supplicantStop | ( | SupplicantContext * | context | ) |
Stop 802.1X supplicant.
- Parameters
-
[in] context Pointer to the 802.1X supplicant context
- Returns
- Error code
Definition at line 302 of file supplicant.c.
◆ supplicantTask()
void supplicantTask | ( | SupplicantContext * | context | ) |
802.1X supplicant task
- Parameters
-
[in] context Pointer to the 802.1X supplicant context
Definition at line 343 of file supplicant.c.