authenticator_misc.c File Reference

Helper functions for 802.1X authenticator. More...

Go to the source code of this file.

Macros

#define TRACE_LEVEL   AUTHENTICATOR_TRACE_LEVEL
 

Functions

void authenticatorTick (AuthenticatorContext *context)
 Handle periodic operations. More...
 
void authenticatorGeneratePortAddr (AuthenticatorPort *port)
 Port's MAC address generation. More...
 
bool_t authenticatorGetLinkState (AuthenticatorPort *port)
 Get link state. More...
 
error_t authenticatorAcceptPaeGroupAddr (AuthenticatorContext *context)
 Add the PAE group address to the static MAC table. More...
 
error_t authenticatorDropPaeGroupAddr (AuthenticatorContext *context)
 Remove the PAE group address from the static MAC table. More...
 
error_t authenticatorSendEapolPdu (AuthenticatorPort *port, const uint8_t *pdu, size_t length)
 Send EAPOL PDU. More...
 
void authenticatorProcessEapolPdu (AuthenticatorContext *context)
 Process incoming EAPOL PDU. More...
 
void authenticatorProcessEapPacket (AuthenticatorPort *port, const EapPacket *packet, size_t length)
 Process incoming EAP packet. More...
 
error_t authenticatorBuildRadiusRequest (AuthenticatorPort *port)
 Build RADIUS Access-Request packet. More...
 
error_t authenticatorSendRadiusRequest (AuthenticatorPort *port)
 Send RADIUS Access-Request packet. More...
 
void authenticatorProcessRadiusPacket (AuthenticatorContext *context)
 Process incoming RADIUS packet. More...
 
uint8_t authenticatorGetNextRadiusId (AuthenticatorContext *context)
 Generate a new RADIUS packet identifier. More...
 

Detailed Description

Helper functions for 802.1X authenticator.

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.0

Definition in file authenticator_misc.c.

Macro Definition Documentation

◆ TRACE_LEVEL

#define TRACE_LEVEL   AUTHENTICATOR_TRACE_LEVEL

Definition at line 32 of file authenticator_misc.c.

Function Documentation

◆ authenticatorAcceptPaeGroupAddr()

error_t authenticatorAcceptPaeGroupAddr ( AuthenticatorContext context)

Add the PAE group address to the static MAC table.

Parameters
[in]contextPointer to the 802.1X authenticator context
Returns
Error code

Definition at line 212 of file authenticator_misc.c.

◆ authenticatorBuildRadiusRequest()

error_t authenticatorBuildRadiusRequest ( AuthenticatorPort port)

Build RADIUS Access-Request packet.

Parameters
[in]portPointer to the port context

Definition at line 531 of file authenticator_misc.c.

◆ authenticatorDropPaeGroupAddr()

error_t authenticatorDropPaeGroupAddr ( AuthenticatorContext context)

Remove the PAE group address from the static MAC table.

Parameters
[in]contextPointer to the 802.1X authenticator context
Returns
Error code

Definition at line 262 of file authenticator_misc.c.

◆ authenticatorGeneratePortAddr()

void authenticatorGeneratePortAddr ( AuthenticatorPort port)

Port's MAC address generation.

Parameters
[in]portPointer to the port context

Definition at line 132 of file authenticator_misc.c.

◆ authenticatorGetLinkState()

bool_t authenticatorGetLinkState ( AuthenticatorPort port)

Get link state.

Parameters
[in]portPointer to the port context
Returns
Error code

Definition at line 173 of file authenticator_misc.c.

◆ authenticatorGetNextRadiusId()

uint8_t authenticatorGetNextRadiusId ( AuthenticatorContext context)

Generate a new RADIUS packet identifier.

Parameters
[in]contextPointer to the 802.1X authenticator context

Definition at line 1108 of file authenticator_misc.c.

◆ authenticatorProcessEapolPdu()

void authenticatorProcessEapolPdu ( AuthenticatorContext context)

Process incoming EAPOL PDU.

Parameters
[in]contextPointer to the 802.1X authenticator context

Definition at line 357 of file authenticator_misc.c.

◆ authenticatorProcessEapPacket()

void authenticatorProcessEapPacket ( AuthenticatorPort port,
const EapPacket packet,
size_t  length 
)

Process incoming EAP packet.

Parameters
[in]portPointer to the port context
[in]packetPointer to the received EAP packet
[in]lengthLength of the packet, in bytes

Definition at line 479 of file authenticator_misc.c.

◆ authenticatorProcessRadiusPacket()

void authenticatorProcessRadiusPacket ( AuthenticatorContext context)

Process incoming RADIUS packet.

Parameters
[in]contextPointer to the 802.1X authenticator context

Definition at line 808 of file authenticator_misc.c.

◆ authenticatorSendEapolPdu()

error_t authenticatorSendEapolPdu ( AuthenticatorPort port,
const uint8_t *  pdu,
size_t  length 
)

Send EAPOL PDU.

Parameters
[in]portPointer to the port context
[in]pduPointer to the PDU to be transmitted
[in]lengthLength of the PDU, in bytes
Returns
Error code

Definition at line 314 of file authenticator_misc.c.

◆ authenticatorSendRadiusRequest()

error_t authenticatorSendRadiusRequest ( AuthenticatorPort port)

Send RADIUS Access-Request packet.

Parameters
[in]portPointer to the port context

Definition at line 753 of file authenticator_misc.c.

◆ authenticatorTick()

void authenticatorTick ( AuthenticatorContext context)

Handle periodic operations.

Parameters
[in]contextPointer to the 802.1X authenticator context

Definition at line 57 of file authenticator_misc.c.