The FreeRADIUS server $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Loading...
Searching...
No Matches
types.h
Go to the documentation of this file.
1#pragma once
2/*
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or (at
6 * your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
16 */
17
18/**
19 * $Id: b046e5ad2b62abe225cdd11d03460dd1815c9a80 $
20 * @file lib/eap/types.h
21 * @brief Header file containing the interfaces for all EAP types
22 *
23 * @copyright 2001 hereUare Communications, Inc. (raghud@hereuare.com)
24 * @copyright 2003 Alan DeKok (aland@freeradius.org)
25 * @copyright 2006 The FreeRADIUS server project
26 */
27
28RCSIDH(lib_eap_types, "$Id: b046e5ad2b62abe225cdd11d03460dd1815c9a80 $")
29
30#include <stdint.h>
31#include <stddef.h>
32
33/* Code (1) + Identifier (1) + Length (2) */
34#define EAP_HEADER_LEN 4
35
43
44typedef enum eap_type {
52 FR_EAP_METHOD_7, /* 7 - unused */
53 FR_EAP_METHOD_8, /* 8 - unused */
65 FR_EAP_METHOD_20, /* 20 - unassigned */
69 FR_EAP_METHOD_3COM, /* 24 - should this be EAP-HP now? */
83 FR_EAP_METHOD_TNC, /* 38 - fixme conflicts with HTTP DIGEST */
84// FR_EAP_METHOD_HTTP_DIGEST, /* 38 */
102 FR_EAP_METHOD_MAX /* 56 - for validation */
104
105#define FR_EAP_EXPANDED_TYPE (254)
106
107/** EAP-Type specific data
108 */
114
115/** Structure to represent packet format of eap *on wire*
116 *
117 * @note Do not change field order, or field size. Code depends on
118 * sizeof(eap_packet_raw_t), and uses this structure for
119 * on the wire parsing.
120 */
121typedef struct CC_HINT(__packed__) {
124 uint8_t length[2];
127
128eap_type_t eap_name2type(char const *name);
129char const *eap_type2name(eap_type_t method);
#define RCSIDH(h, id)
Definition build.h:484
eap_type_t eap_name2type(char const *name)
Return an EAP-Type for a particular name.
Definition types.c:38
char const * eap_type2name(eap_type_t method)
Return an EAP-name for a particular type.
Definition types.c:54
eap_code
Definition types.h:36
@ FR_EAP_CODE_FAILURE
Definition types.h:40
@ FR_EAP_CODE_RESPONSE
Definition types.h:38
@ FR_EAP_CODE_REQUEST
Definition types.h:37
@ FR_EAP_CODE_MAX
Definition types.h:41
@ FR_EAP_CODE_SUCCESS
Definition types.h:39
eap_type_t num
Definition types.h:110
eap_type_t eap_name2type(char const *name)
Return an EAP-Type for a particular name.
Definition types.c:38
size_t length
Definition types.h:111
enum eap_type eap_type_t
uint8_t code
Definition types.h:122
uint8_t * data
Definition types.h:112
char const * eap_type2name(eap_type_t method)
Return an EAP-name for a particular type.
Definition types.c:54
enum eap_code eap_code_t
uint8_t id
Definition types.h:123
eap_type
Definition types.h:44
@ FR_EAP_METHOD_SIM
Definition types.h:63
@ FR_EAP_METHOD_KEA
Definition types.h:56
@ FR_EAP_METHOD_MAKE
Definition types.h:72
@ FR_EAP_METHOD_LEAP
Definition types.h:62
@ FR_EAP_METHOD_ARCOT_SYSTEMS
Definition types.h:61
@ FR_EAP_METHOD_20
Definition types.h:65
@ FR_EAP_METHOD_DSS_UNILATERAL
Definition types.h:55
@ FR_EAP_METHOD_COGENT_BIOMETRIC
Definition types.h:81
@ FR_EAP_METHOD_CISCO_MSCHAPV2
Definition types.h:74
@ FR_EAP_METHOD_NAK
Definition types.h:48
@ FR_EAP_METHOD_DEFENDER_TOKEN
Definition types.h:59
@ FR_EAP_METHOD_SENTRINET
Definition types.h:79
@ FR_EAP_METHOD_DEVICECONNECT
Definition types.h:86
@ FR_EAP_METHOD_TEAP
Definition types.h:101
@ FR_EAP_METHOD_AKA
Definition types.h:68
@ FR_EAP_METHOD_ROB
Definition types.h:76
@ FR_EAP_METHOD_3COM
Definition types.h:69
@ FR_EAP_METHOD_REMOTE_ACCESS_SERVICE
Definition types.h:67
@ FR_EAP_METHOD_IKEV2
Definition types.h:95
@ FR_EAP_METHOD_EKE
Definition types.h:99
@ FR_EAP_METHOD_DYNAMID
Definition types.h:75
@ FR_EAP_METHOD_MSCHAPV2
Definition types.h:71
@ FR_EAP_METHOD_AIRFORTRESS
Definition types.h:82
@ FR_EAP_METHOD_PWD
Definition types.h:98
@ FR_EAP_METHOD_POTP
Definition types.h:77
@ FR_EAP_METHOD_SAKE
Definition types.h:94
@ FR_EAP_METHOD_PAX
Definition types.h:92
@ FR_EAP_METHOD_ZONELABS
Definition types.h:90
@ FR_EAP_METHOD_AKA_PRIME
Definition types.h:96
@ FR_EAP_METHOD_RSA_SECURID
Definition types.h:60
@ FR_EAP_METHOD_TTLS
Definition types.h:66
@ FR_EAP_METHOD_ACTIONTEC
Definition types.h:80
@ FR_EAP_METHOD_RSA_PUBLIC_KEY
Definition types.h:54
@ FR_EAP_METHOD_PT
Definition types.h:100
@ FR_EAP_METHOD_7
Definition types.h:52
@ FR_EAP_METHOD_SRP_SHA1
Definition types.h:64
@ FR_EAP_METHOD_MD5
Definition types.h:49
@ FR_EAP_METHOD_NOTIFICATION
Definition types.h:47
@ FR_EAP_METHOD_IDENTITY
Definition types.h:46
@ FR_EAP_METHOD_OTP
Definition types.h:50
@ FR_EAP_METHOD_MS_ATLV
Definition types.h:78
@ FR_EAP_METHOD_GTC
Definition types.h:51
@ FR_EAP_METHOD_FAST
Definition types.h:89
@ FR_EAP_METHOD_INVALID
Definition types.h:45
@ FR_EAP_METHOD_MOBAC
Definition types.h:88
@ FR_EAP_METHOD_TLS
Definition types.h:58
@ FR_EAP_METHOD_8
Definition types.h:53
@ FR_EAP_METHOD_PEAP
Definition types.h:70
@ FR_EAP_METHOD_SPEKE
Definition types.h:87
@ FR_EAP_METHOD_GPSK
Definition types.h:97
@ FR_EAP_METHOD_PSK
Definition types.h:93
@ FR_EAP_METHOD_SECURISUITE
Definition types.h:85
@ FR_EAP_METHOD_MAX
Definition types.h:102
@ FR_EAP_METHOD_TNC
Definition types.h:83
@ FR_EAP_METHOD_KEA_VALIDATE
Definition types.h:57
@ FR_EAP_METHOD_LINK
Definition types.h:91
@ FR_EAP_METHOD_CRYPTOCARD
Definition types.h:73
Structure to represent packet format of eap on wire
Definition types.h:121
EAP-Type specific data.
Definition types.h:109
unsigned char uint8_t
static char const * name
static fr_slen_t data
Definition value.h:1265