2 * Copyright (C) 2012 Tobias Brunner
3 * Copyright (C) 2010 Martin Willi
4 * Copyright (C) 2010 revosec AG
5 * Hochschule fuer Technik Rapperswil
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
20 * @{ @ingroup libstrongswan
26 typedef enum eap_code_t eap_code_t
;
27 typedef enum eap_type_t eap_type_t
;
28 typedef struct eap_vendor_type_t eap_vendor_type_t
;
33 * EAP code, type of an EAP message
43 * enum names for eap_code_t.
45 extern enum_name_t
*eap_code_names
;
48 * short string enum names for eap_code_t.
50 extern enum_name_t
*eap_code_short_names
;
53 * EAP types, defines the EAP method implementation
71 EAP_EXPERIMENTAL
= 255,
72 /** not a method, but an implementation providing different methods */
74 /** not a method, select actual method dynamically based on e.g. the ID */
79 * enum names for eap_type_t.
81 extern enum_name_t
*eap_type_names
;
84 * short string enum names for eap_type_t.
86 extern enum_name_t
*eap_type_short_names
;
89 * Struct that stores EAP type and vendor ID
91 struct eap_vendor_type_t
{
107 typedef struct __attribute__((packed
)) {
116 * Lookup the EAP method type from a string.
118 * @param name EAP method name (such as "md5", "aka")
119 * @return method type, 0 if unknown
121 eap_type_t
eap_type_from_string(char *name
);
124 * Parse a string of the form [eap-]type[-vendor].
126 * @param str EAP method string
127 * @return parsed type (gets allocated), NULL if unknown or failed
129 eap_vendor_type_t
*eap_vendor_type_from_string(char *str
);
131 #endif /** EAP_H_ @}*/