ike_eap.c File Reference

EAP authentication. More...

#include "ike/ike.h"
#include "ike/ike_eap.h"
#include "ike/ike_eap_md5.h"
#include "ike/ike_eap_mschapv2.h"
#include "debug.h"

Go to the source code of this file.

Macros

#define TRACE_LEVEL   IKE_TRACE_LEVEL
 

Functions

error_t ikeProcessEapPacket (IkeSaEntry *sa, const IkeEapPacket *packet, size_t length)
 Process EAP packet. More...
 
error_t ikeProcessEapRequest (IkeSaEntry *sa, const IkeEapRequest *request, size_t length)
 Process EAP request. More...
 
error_t ikeProcessEapIdentityRequest (IkeSaEntry *sa, const IkeEapRequest *request, size_t length)
 Process EAP Identity request. More...
 
error_t ikeProcessEapSuccess (IkeSaEntry *sa, const IkeEapPacket *packet, size_t length)
 Process EAP success packet. More...
 
error_t ikeProcessEapFailure (IkeSaEntry *sa, const IkeEapPacket *packet, size_t length)
 Process EAP failure packet. More...
 
error_t ikeFormatEapPacket (IkeSaEntry *sa, uint8_t *p, size_t *written)
 Format EAP packet. More...
 
error_t ikeFormatEapIdentityResponse (IkeSaEntry *sa, uint8_t *p, size_t *written)
 Format EAP Identity response. More...
 
error_t ikeFormatEapNakResponse (IkeSaEntry *sa, uint8_t *p, size_t *written)
 Format EAP Nak response. More...
 

Detailed Description

EAP authentication.

License

SPDX-License-Identifier: GPL-2.0-or-later

Copyright (C) 2022-2026 Oryx Embedded SARL. All rights reserved.

This file is part of CycloneIPSEC 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.6.8

Definition in file ike_eap.c.

Macro Definition Documentation

◆ TRACE_LEVEL

#define TRACE_LEVEL   IKE_TRACE_LEVEL

Definition at line 32 of file ike_eap.c.

Function Documentation

◆ ikeFormatEapIdentityResponse()

error_t ikeFormatEapIdentityResponse ( IkeSaEntry *  sa,
uint8_t *  p,
size_t *  written 
)

Format EAP Identity response.

Parameters
[in]saPointer to the IKE SA
[out]pBuffer where to format the EAP Identity response
[out]writtenLength of the resulting EAP Identity response
Returns
Error code

Definition at line 312 of file ike_eap.c.

◆ ikeFormatEapNakResponse()

error_t ikeFormatEapNakResponse ( IkeSaEntry *  sa,
uint8_t *  p,
size_t *  written 
)

Format EAP Nak response.

Parameters
[in]saPointer to the IKE SA
[out]pBuffer where to format the EAP Nak response
[out]writtenLength of the resulting EAP Nak response
Returns
Error code

Definition at line 354 of file ike_eap.c.

◆ ikeFormatEapPacket()

error_t ikeFormatEapPacket ( IkeSaEntry *  sa,
uint8_t *  p,
size_t *  written 
)

Format EAP packet.

Parameters
[in]saPointer to the IKE SA
[out]pBuffer where to format the EAP packet
[out]writtenLength of the resulting EAP packet
Returns
Error code

Definition at line 254 of file ike_eap.c.

◆ ikeProcessEapFailure()

error_t ikeProcessEapFailure ( IkeSaEntry *  sa,
const IkeEapPacket *  packet,
size_t  length 
)

Process EAP failure packet.

Parameters
[in]saPointer to the IKE SA
[in]packetPointer to the EAP failure packet
[in]lengthLength of the EAP failure packet, in bytes
Returns
Error code

Definition at line 234 of file ike_eap.c.

◆ ikeProcessEapIdentityRequest()

error_t ikeProcessEapIdentityRequest ( IkeSaEntry *  sa,
const IkeEapRequest *  request,
size_t  length 
)

Process EAP Identity request.

Parameters
[in]saPointer to the IKE SA
[in]packetPointer to the EAP Identity request
[in]lengthLength of the EAP Identity request, in bytes
Returns
Error code

Definition at line 177 of file ike_eap.c.

◆ ikeProcessEapPacket()

error_t ikeProcessEapPacket ( IkeSaEntry *  sa,
const IkeEapPacket *  packet,
size_t  length 
)

Process EAP packet.

Parameters
[in]saPointer to the IKE SA
[in]packetPointer to the EAP packet
[in]lengthLength of the EAP packet, in bytes
Returns
Error code

Definition at line 53 of file ike_eap.c.

◆ ikeProcessEapRequest()

error_t ikeProcessEapRequest ( IkeSaEntry *  sa,
const IkeEapRequest *  request,
size_t  length 
)

Process EAP request.

Parameters
[in]saPointer to the IKE SA
[in]packetPointer to the EAP request
[in]lengthLength of the EAP request, in bytes
Returns
Error code

Definition at line 118 of file ike_eap.c.

◆ ikeProcessEapSuccess()

error_t ikeProcessEapSuccess ( IkeSaEntry *  sa,
const IkeEapPacket *  packet,
size_t  length 
)

Process EAP success packet.

Parameters
[in]saPointer to the IKE SA
[in]packetPointer to the EAP success packet
[in]lengthLength of the EAP success packet, in bytes
Returns
Error code

Definition at line 205 of file ike_eap.c.