Merge commit 'crater/master'
[dragonfly.git] / contrib / hostapd-0.5.8 / eap_methods.h
blobcec8a570e2a626574193623959168024c2b101c0
1 /*
2 * hostapd / EAP method registration
3 * Copyright (c) 2004-2006, Jouni Malinen <j@w1.fi>
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.
9 * Alternatively, this software may be distributed under the terms of BSD
10 * license.
12 * See README and COPYING for more details.
15 #ifndef EAP_METHODS_H
16 #define EAP_METHODS_H
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);
24 #ifdef EAP_SERVER
26 EapType eap_get_type(const char *name, int *vendor);
27 int eap_server_register_methods(void);
28 void eap_server_unregister_methods(void);
30 #else /* EAP_SERVER */
32 static inline EapType eap_get_type(const char *name, int *vendor)
34 *vendor = EAP_VENDOR_IETF;
35 return EAP_TYPE_NONE;
38 static inline int eap_server_register_methods(void)
40 return 0;
43 static inline void eap_server_unregister_methods(void)
47 #endif /* EAP_SERVER */
49 #endif /* EAP_METHODS_H */