2 * EAP method registration
3 * Copyright (c) 2004-2009, 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
12 * See README and COPYING for more details.
18 #include "eap_server/eap_methods.h"
19 #include "eap_register.h"
23 * eap_server_register_methods - Register statically linked EAP server methods
24 * Returns: 0 on success, -1 or -2 on failure
26 * This function is called at program initialization to register all EAP
27 * methods that were linked in statically.
29 int eap_server_register_methods(void)
33 #ifdef EAP_SERVER_IDENTITY
35 ret
= eap_server_identity_register();
36 #endif /* EAP_SERVER_IDENTITY */
40 ret
= eap_server_md5_register();
41 #endif /* EAP_SERVER_MD5 */
45 ret
= eap_server_tls_register();
46 #endif /* EAP_SERVER_TLS */
48 #ifdef EAP_SERVER_MSCHAPV2
50 ret
= eap_server_mschapv2_register();
51 #endif /* EAP_SERVER_MSCHAPV2 */
53 #ifdef EAP_SERVER_PEAP
55 ret
= eap_server_peap_register();
56 #endif /* EAP_SERVER_PEAP */
60 ret
= eap_server_tlv_register();
61 #endif /* EAP_SERVER_TLV */
65 ret
= eap_server_gtc_register();
66 #endif /* EAP_SERVER_GTC */
68 #ifdef EAP_SERVER_TTLS
70 ret
= eap_server_ttls_register();
71 #endif /* EAP_SERVER_TTLS */
75 ret
= eap_server_sim_register();
76 #endif /* EAP_SERVER_SIM */
80 ret
= eap_server_aka_register();
81 #endif /* EAP_SERVER_AKA */
83 #ifdef EAP_SERVER_AKA_PRIME
85 ret
= eap_server_aka_prime_register();
86 #endif /* EAP_SERVER_AKA_PRIME */
90 ret
= eap_server_pax_register();
91 #endif /* EAP_SERVER_PAX */
95 ret
= eap_server_psk_register();
96 #endif /* EAP_SERVER_PSK */
98 #ifdef EAP_SERVER_SAKE
100 ret
= eap_server_sake_register();
101 #endif /* EAP_SERVER_SAKE */
103 #ifdef EAP_SERVER_GPSK
105 ret
= eap_server_gpsk_register();
106 #endif /* EAP_SERVER_GPSK */
108 #ifdef EAP_SERVER_VENDOR_TEST
110 ret
= eap_server_vendor_test_register();
111 #endif /* EAP_SERVER_VENDOR_TEST */
113 #ifdef EAP_SERVER_FAST
115 ret
= eap_server_fast_register();
116 #endif /* EAP_SERVER_FAST */
118 #ifdef EAP_SERVER_WSC
120 ret
= eap_server_wsc_register();
121 #endif /* EAP_SERVER_WSC */
123 #ifdef EAP_SERVER_IKEV2
125 ret
= eap_server_ikev2_register();
126 #endif /* EAP_SERVER_IKEV2 */
128 #ifdef EAP_SERVER_TNC
130 ret
= eap_server_tnc_register();
131 #endif /* EAP_SERVER_TNC */