Some typos fixed.
[strongswan.git] / src / libstrongswan / eap / eap.h
1 /*
2 * Copyright (C) 2010 Martin Willi
3 * Copyright (C) 2010 revosec AG
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 * for more details.
14 */
15
16 /**
17 * @defgroup eap eap
18 * @{ @ingroup libstrongswan
19 */
20
21 #ifndef EAP_H_
22 #define EAP_H_
23
24 typedef enum eap_code_t eap_code_t;
25 typedef enum eap_type_t eap_type_t;
26
27 #include <library.h>
28
29 /**
30 * EAP code, type of an EAP message
31 */
32 enum eap_code_t {
33 EAP_REQUEST = 1,
34 EAP_RESPONSE = 2,
35 EAP_SUCCESS = 3,
36 EAP_FAILURE = 4,
37 };
38
39 /**
40 * enum names for eap_code_t.
41 */
42 extern enum_name_t *eap_code_names;
43
44 /**
45 * short string enum names for eap_code_t.
46 */
47 extern enum_name_t *eap_code_short_names;
48
49 /**
50 * EAP types, defines the EAP method implementation
51 */
52 enum eap_type_t {
53 EAP_IDENTITY = 1,
54 EAP_NOTIFICATION = 2,
55 EAP_NAK = 3,
56 EAP_MD5 = 4,
57 EAP_OTP = 5,
58 EAP_GTC = 6,
59 EAP_TLS = 13,
60 EAP_SIM = 18,
61 EAP_TTLS = 21,
62 EAP_AKA = 23,
63 EAP_MSCHAPV2 = 26,
64 EAP_TNC = 38,
65 /** not a method, but an implementation providing different methods */
66 EAP_RADIUS = 253,
67 EAP_EXPANDED = 254,
68 EAP_EXPERIMENTAL = 255,
69 };
70
71 /**
72 * enum names for eap_type_t.
73 */
74 extern enum_name_t *eap_type_names;
75
76 /**
77 * short string enum names for eap_type_t.
78 */
79 extern enum_name_t *eap_type_short_names;
80
81 /**
82 * Lookup the EAP method type from a string.
83 *
84 * @param name EAP method name (such as "md5", "aka")
85 * @return method type, 0 if unknown
86 */
87 eap_type_t eap_type_from_string(char *name);
88
89 #endif /** EAP_H_ @}*/