eap.h File Reference

EAP (Extensible Authentication Protocol) More...

#include "eap_config.h"
#include "core/net.h"
#include "core/crypto.h"

Go to the source code of this file.

Macros

#define CYCLONE_EAP_VERSION_STRING   "2.4.4"
 
#define CYCLONE_EAP_MAJOR_VERSION   2
 
#define CYCLONE_EAP_MINOR_VERSION   4
 
#define CYCLONE_EAP_REV_NUMBER   4
 
#define EAP_SUPPORT   ENABLED
 
#define EAP_MD5_SUPPORT   DISABLED
 
#define EAP_TLS_SUPPORT   DISABLED
 
#define EAP_MAX_FRAG_SIZE   1000
 
#define EAP_DEFAULT_CLIENT_TIMEOUT   60
 

Enumerations

enum  EapolVersion { EAPOL_VERSION_1 = 1, EAPOL_VERSION_2 = 2, EAPOL_VERSION_3 = 3 }
 EAPOL protocol versions. More...
 
enum  EapolType {
  EAPOL_TYPE_EAP = 0, EAPOL_TYPE_START = 1, EAPOL_TYPE_LOGOFF = 2, EAPOL_TYPE_KEY = 3,
  EAPOL_TYPE_ENCAPSULATED_ASF_ALERT = 4, EAPOL_TYPE_MKA = 5, EAPOL_TYPE_ANNOUNCEMENT_GENERIC = 6, EAPOL_TYPE_ANNOUNCEMENT_SPECIFIC = 7,
  EAPOL_TYPE_ANNOUNCEMENT_REQ = 8
}
 EAPOL packet types. More...
 
enum  EapCode { EAP_CODE_REQUEST = 1, EAP_CODE_RESPONSE = 2, EAP_CODE_SUCCESS = 3, EAP_CODE_FAILURE = 4 }
 EAP codes. More...
 
enum  EapMethodType {
  EAP_METHOD_TYPE_NONE = 0, EAP_METHOD_TYPE_IDENTITY = 1, EAP_METHOD_TYPE_NOTIFICATION = 2, EAP_METHOD_TYPE_NAK = 3,
  EAP_METHOD_TYPE_MD5_CHALLENGE = 4, EAP_METHOD_TYPE_OTP = 5, EAP_METHOD_TYPE_GTC = 6, EAP_METHOD_TYPE_TLS = 13,
  EAP_METHOD_TYPE_TTLS = 21, EAP_METHOD_TYPE_PEAP = 25, EAP_METHOD_TYPE_MSCHAP_V2 = 29, EAP_METHOD_TYPE_EXPANDED_NAK = 254
}
 EAP method types. More...
 
enum  EapTlsFlags { EAP_TLS_FLAGS_L = 0x80, EAP_TLS_FLAGS_M = 0x40, EAP_TLS_FLAGS_S = 0x20, EAP_TLS_FLAGS_R = 0x1F }
 EAP-TLS flags. More...
 

Variables

typedef __packed_struct
 EAPOL PDU. More...
 
uint8_t packetType
 
uint16_t packetBodyLen
 
uint8_t packetBody []
 
 EapolPdu
 
uint8_t identifier
 
uint16_t length
 
uint8_t data []
 
 EapPacket
 
uint8_t type
 
 EapRequest
 
 EapResponse
 
uint8_t flags
 
 EapTlsPacket
 

Detailed Description

EAP (Extensible Authentication Protocol)

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 eap.h.

Macro Definition Documentation

◆ CYCLONE_EAP_MAJOR_VERSION

#define CYCLONE_EAP_MAJOR_VERSION   2

Definition at line 69 of file eap.h.

◆ CYCLONE_EAP_MINOR_VERSION

#define CYCLONE_EAP_MINOR_VERSION   4

Definition at line 71 of file eap.h.

◆ CYCLONE_EAP_REV_NUMBER

#define CYCLONE_EAP_REV_NUMBER   4

Definition at line 73 of file eap.h.

◆ CYCLONE_EAP_VERSION_STRING

#define CYCLONE_EAP_VERSION_STRING   "2.4.4"

Definition at line 67 of file eap.h.

◆ EAP_DEFAULT_CLIENT_TIMEOUT

#define EAP_DEFAULT_CLIENT_TIMEOUT   60

Definition at line 105 of file eap.h.

◆ EAP_MAX_FRAG_SIZE

#define EAP_MAX_FRAG_SIZE   1000

Definition at line 98 of file eap.h.

◆ EAP_MD5_SUPPORT

#define EAP_MD5_SUPPORT   DISABLED

Definition at line 84 of file eap.h.

◆ EAP_SUPPORT

#define EAP_SUPPORT   ENABLED

Definition at line 77 of file eap.h.

◆ EAP_TLS_SUPPORT

#define EAP_TLS_SUPPORT   DISABLED

Definition at line 91 of file eap.h.

Enumeration Type Documentation

◆ EapCode

enum EapCode

EAP codes.

Enumerator
EAP_CODE_REQUEST 

Request.

EAP_CODE_RESPONSE 

Response.

EAP_CODE_SUCCESS 

Success.

EAP_CODE_FAILURE 

Failure.

Definition at line 150 of file eap.h.

◆ EapMethodType

EAP method types.

Enumerator
EAP_METHOD_TYPE_NONE 

None.

EAP_METHOD_TYPE_IDENTITY 

Identity.

EAP_METHOD_TYPE_NOTIFICATION 

Notification.

EAP_METHOD_TYPE_NAK 

Legacy Nak.

EAP_METHOD_TYPE_MD5_CHALLENGE 

MD5-Challenge.

EAP_METHOD_TYPE_OTP 

One-Time Password (OTP)

EAP_METHOD_TYPE_GTC 

Generic Token Card (GTC)

EAP_METHOD_TYPE_TLS 

EAP-TLS.

EAP_METHOD_TYPE_TTLS 

EAP-TTLS.

EAP_METHOD_TYPE_PEAP 

PEAP.

EAP_METHOD_TYPE_MSCHAP_V2 

EAP-MSCHAP-V2.

EAP_METHOD_TYPE_EXPANDED_NAK 

Expanded NAK.

Definition at line 163 of file eap.h.

◆ EapolType

enum EapolType

EAPOL packet types.

Enumerator
EAPOL_TYPE_EAP 

EAPOL-EAP.

EAPOL_TYPE_START 

EAPOL-Start.

EAPOL_TYPE_LOGOFF 

EAPOL-Logoff.

EAPOL_TYPE_KEY 

EAPOL-Key.

EAPOL_TYPE_ENCAPSULATED_ASF_ALERT 

EAPOL-Encapsulated-ASF-Alert.

EAPOL_TYPE_MKA 

EAPOL-MKA.

EAPOL_TYPE_ANNOUNCEMENT_GENERIC 

EAPOL-Announcement (Generic)

EAPOL_TYPE_ANNOUNCEMENT_SPECIFIC 

EAPOL-Announcement (Specific)

EAPOL_TYPE_ANNOUNCEMENT_REQ 

EAPOL-Announcement-Req.

Definition at line 132 of file eap.h.

◆ EapolVersion

EAPOL protocol versions.

Enumerator
EAPOL_VERSION_1 

IEEE 802.1X-2001.

EAPOL_VERSION_2 

IEEE 802.1X-2004.

EAPOL_VERSION_3 

IEEE 802.1X-2010.

Definition at line 120 of file eap.h.

◆ EapTlsFlags

EAP-TLS flags.

Enumerator
EAP_TLS_FLAGS_L 

Length included.

EAP_TLS_FLAGS_M 

More fragments.

EAP_TLS_FLAGS_S 

EAP-TLS start.

EAP_TLS_FLAGS_R 

Reserved.

Definition at line 184 of file eap.h.

Variable Documentation

◆ __packed_struct

typedef __packed_struct
Initial value:
{
uint8_t protocolVersion

EAPOL PDU.

EAP-TLS packet.

EAP response.

EAP request.

EAP packet.

Definition at line 205 of file eap.h.

◆ data

uint8_t data[]

Definition at line 223 of file eap.h.

◆ EapolPdu

EapolPdu

Definition at line 211 of file eap.h.

◆ EapPacket

EapPacket

Definition at line 224 of file eap.h.

◆ EapRequest

EapRequest

Definition at line 238 of file eap.h.

◆ EapResponse

EapResponse

Definition at line 252 of file eap.h.

◆ EapTlsPacket

EapTlsPacket

Definition at line 267 of file eap.h.

◆ flags

uint8_t flags

Definition at line 265 of file eap.h.

◆ identifier

uint8_t identifier

Definition at line 221 of file eap.h.

◆ length

uint16_t length

Definition at line 222 of file eap.h.

◆ packetBody

uint8_t packetBody[]

Definition at line 210 of file eap.h.

◆ packetBodyLen

uint16_t packetBodyLen

Definition at line 209 of file eap.h.

◆ packetType

uint8_t packetType

Definition at line 208 of file eap.h.

◆ type

uint8_t type

Definition at line 236 of file eap.h.