802.1X supplicant More...
#include "supplicant/supplicant.h"
#include "supplicant/supplicant_fsm.h"
#include "supplicant/supplicant_misc.h"
#include "debug.h"
Go to the source code of this file.
Macros | |
#define | TRACE_LEVEL SUPPLICANT_TRACE_LEVEL |
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 | supplicantSetHeldPeriod (SupplicantContext *context, uint_t heldPeriod) |
Set the value of the heldPeriod parameter. More... | |
error_t | supplicantSetAuthPeriod (SupplicantContext *context, uint_t authPeriod) |
Set the value of the authPeriod parameter. More... | |
error_t | supplicantSetStartPeriod (SupplicantContext *context, uint_t startPeriod) |
Set the value of the startPeriod parameter. More... | |
error_t | supplicantSetMaxStart (SupplicantContext *context, uint_t maxStart) |
Set the value of the maxStart parameter. More... | |
error_t | supplicantSetClientTimeout (SupplicantContext *context, uint_t clientTimeout) |
Set the value of the clientTimeout parameter. More... | |
error_t | supplicantSetPortControl (SupplicantContext *context, SupplicantPortMode portControl) |
Set the value of the portControl variable. More... | |
error_t | supplicantLogOn (SupplicantContext *context) |
Perform user logon. More... | |
error_t | supplicantLogOff (SupplicantContext *context) |
Perform user logoff. 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.4
Definition in file supplicant.c.
Macro Definition Documentation
◆ TRACE_LEVEL
#define TRACE_LEVEL SUPPLICANT_TRACE_LEVEL |
Definition at line 32 of file supplicant.c.
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 699 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 86 of file supplicant.c.
◆ supplicantLogOff()
error_t supplicantLogOff | ( | SupplicantContext * | context | ) |
Perform user logoff.
- Parameters
-
[in] context Pointer to the 802.1X supplicant context
- Returns
- Error code
Definition at line 439 of file supplicant.c.
◆ supplicantLogOn()
error_t supplicantLogOn | ( | SupplicantContext * | context | ) |
Perform user logon.
- Parameters
-
[in] context Pointer to the 802.1X supplicant context
- Returns
- Error code
Definition at line 405 of file supplicant.c.
◆ supplicantSetAuthPeriod()
error_t supplicantSetAuthPeriod | ( | SupplicantContext * | context, |
uint_t | authPeriod | ||
) |
Set the value of the authPeriod parameter.
- Parameters
-
[in] context Pointer to the 802.1X supplicant context [in] authPeriod Value of the authPeriod parameter
- Returns
- Error code
Definition at line 262 of file supplicant.c.
◆ supplicantSetClientTimeout()
error_t supplicantSetClientTimeout | ( | SupplicantContext * | context, |
uint_t | clientTimeout | ||
) |
Set the value of the clientTimeout parameter.
- Parameters
-
[in] context Pointer to the 802.1X supplicant context [in] clientTimeout Value of the clientTimeout parameter
- Returns
- Error code
Definition at line 345 of file supplicant.c.
◆ supplicantSetHeldPeriod()
error_t supplicantSetHeldPeriod | ( | SupplicantContext * | context, |
uint_t | heldPeriod | ||
) |
Set the value of the heldPeriod parameter.
- Parameters
-
[in] context Pointer to the 802.1X supplicant context [in] heldPeriod Value of the heldPeriod parameter
- Returns
- Error code
Definition at line 237 of file supplicant.c.
◆ supplicantSetMaxStart()
error_t supplicantSetMaxStart | ( | SupplicantContext * | context, |
uint_t | maxStart | ||
) |
Set the value of the maxStart parameter.
- Parameters
-
[in] context Pointer to the 802.1X supplicant context [in] maxStart Value of the maxStart parameter
- Returns
- Error code
Definition at line 312 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 206 of file supplicant.c.
◆ supplicantSetPortControl()
error_t supplicantSetPortControl | ( | SupplicantContext * | context, |
SupplicantPortMode | portControl | ||
) |
Set the value of the portControl variable.
- Parameters
-
[in] context Pointer to the 802.1X supplicant context [in] portControl Value of the portControl variable
- Returns
- Error code
Definition at line 371 of file supplicant.c.
◆ supplicantSetStartPeriod()
error_t supplicantSetStartPeriod | ( | SupplicantContext * | context, |
uint_t | startPeriod | ||
) |
Set the value of the startPeriod parameter.
- Parameters
-
[in] context Pointer to the 802.1X supplicant context [in] startPeriod Value of the startPeriod parameter
- Returns
- Error code
Definition at line 287 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 180 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 473 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 571 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 614 of file supplicant.c.