supplicant.c File Reference

802.1X supplicant More...

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.

Author
Oryx Embedded SARL (www.oryx-embedded.com)
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]contextPointer 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]settingsStructure 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]contextPointer to the 802.1X supplicant context
[in]settings802.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]contextPointer 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]contextPointer 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]contextPointer to the 802.1X supplicant context
[in]authPeriodValue 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]contextPointer to the 802.1X supplicant context
[in]clientTimeoutValue 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]contextPointer to the 802.1X supplicant context
[in]heldPeriodValue 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]contextPointer to the 802.1X supplicant context
[in]maxStartValue 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]contextPointer to the 802.1X supplicant context
[in]passwordNULL-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]contextPointer to the 802.1X supplicant context
[in]portControlValue 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]contextPointer to the 802.1X supplicant context
[in]startPeriodValue 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]contextPointer to the 802.1X supplicant context
[in]usernameNULL-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]contextPointer 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]contextPointer 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]contextPointer to the 802.1X supplicant context

Definition at line 614 of file supplicant.c.