cec8a570e2a626574193623959168024c2b101c0
[dragonfly.git] / contrib / hostapd-0.5.8 / eap_methods.h
1 /*
2  * hostapd / EAP method registration
3  * Copyright (c) 2004-2006, Jouni Malinen <j@w1.fi>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation.
8  *
9  * Alternatively, this software may be distributed under the terms of BSD
10  * license.
11  *
12  * See README and COPYING for more details.
13  */
14
15 #ifndef EAP_METHODS_H
16 #define EAP_METHODS_H
17
18 const struct eap_method * eap_sm_get_eap_methods(int vendor, EapType method);
19 struct eap_method * eap_server_method_alloc(int version, int vendor,
20                                             EapType method, const char *name);
21 void eap_server_method_free(struct eap_method *method);
22 int eap_server_method_register(struct eap_method *method);
23
24 #ifdef EAP_SERVER
25
26 EapType eap_get_type(const char *name, int *vendor);
27 int eap_server_register_methods(void);
28 void eap_server_unregister_methods(void);
29
30 #else /* EAP_SERVER */
31
32 static inline EapType eap_get_type(const char *name, int *vendor)
33 {
34         *vendor = EAP_VENDOR_IETF;
35         return EAP_TYPE_NONE;
36 }
37
38 static inline int eap_server_register_methods(void)
39 {
40         return 0;
41 }
42
43 static inline void eap_server_unregister_methods(void)
44 {
45 }
46
47 #endif /* EAP_SERVER */
48
49 #endif /* EAP_METHODS_H */