Helper functions for 802.1X authenticator. More...
#include "authenticator/authenticator.h"
#include "authenticator/authenticator_fsm.h"
#include "authenticator/authenticator_procedures.h"
#include "authenticator/authenticator_misc.h"
#include "radius/radius.h"
#include "radius/radius_attributes.h"
#include "radius/radius_debug.h"
#include "eap/eap_debug.h"
#include "debug.h"
Go to the source code of this file.
Macros | |
#define | TRACE_LEVEL AUTHENTICATOR_TRACE_LEVEL |
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.
- Version
- 2.4.4
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] context Pointer 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] port Pointer to the port context
Definition at line 530 of file authenticator_misc.c.
◆ authenticatorDropPaeGroupAddr()
error_t authenticatorDropPaeGroupAddr | ( | AuthenticatorContext * | context | ) |
Remove the PAE group address from the static MAC table.
- Parameters
-
[in] context Pointer 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] port Pointer to the port context
Definition at line 132 of file authenticator_misc.c.
◆ authenticatorGetLinkState()
bool_t authenticatorGetLinkState | ( | AuthenticatorPort * | port | ) |
Get link state.
- Parameters
-
[in] port Pointer 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] context Pointer to the 802.1X authenticator context
Definition at line 1107 of file authenticator_misc.c.
◆ authenticatorProcessEapolPdu()
void authenticatorProcessEapolPdu | ( | AuthenticatorContext * | context | ) |
Process incoming EAPOL PDU.
- Parameters
-
[in] context Pointer 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] port Pointer to the port context [in] packet Pointer to the received EAP packet [in] length Length of the packet, in bytes
Definition at line 478 of file authenticator_misc.c.
◆ authenticatorProcessRadiusPacket()
void authenticatorProcessRadiusPacket | ( | AuthenticatorContext * | context | ) |
Process incoming RADIUS packet.
- Parameters
-
[in] context Pointer to the 802.1X authenticator context
Definition at line 807 of file authenticator_misc.c.
◆ authenticatorSendEapolPdu()
error_t authenticatorSendEapolPdu | ( | AuthenticatorPort * | port, |
const uint8_t * | pdu, | ||
size_t | length | ||
) |
Send EAPOL PDU.
- Parameters
-
[in] port Pointer to the port context [in] pdu Pointer to the PDU to be transmitted [in] length Length 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] port Pointer to the port context
Definition at line 752 of file authenticator_misc.c.
◆ authenticatorTick()
void authenticatorTick | ( | AuthenticatorContext * | context | ) |
Handle periodic operations.
- Parameters
-
[in] context Pointer to the 802.1X authenticator context
Definition at line 57 of file authenticator_misc.c.