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_peer/eap_methods.h"
19 #include "eap_server/eap_methods.h"
23 * eap_register_methods - Register statically linked EAP 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_register_methods(void)
35 ret
= eap_peer_md5_register();
40 ret
= eap_peer_tls_register();
45 ret
= eap_peer_mschapv2_register();
46 #endif /* EAP_MSCHAPv2 */
50 ret
= eap_peer_peap_register();
55 ret
= eap_peer_ttls_register();
60 ret
= eap_peer_gtc_register();
65 ret
= eap_peer_otp_register();
70 ret
= eap_peer_sim_register();
75 ret
= eap_peer_leap_register();
80 ret
= eap_peer_psk_register();
85 ret
= eap_peer_aka_register();
90 ret
= eap_peer_aka_prime_register();
91 #endif /* EAP_AKA_PRIME */
95 ret
= eap_peer_fast_register();
100 ret
= eap_peer_pax_register();
105 ret
= eap_peer_sake_register();
106 #endif /* EAP_SAKE */
110 ret
= eap_peer_gpsk_register();
111 #endif /* EAP_GPSK */
115 ret
= eap_peer_wsc_register();
120 ret
= eap_peer_ikev2_register();
121 #endif /* EAP_IKEV2 */
123 #ifdef EAP_VENDOR_TEST
125 ret
= eap_peer_vendor_test_register();
126 #endif /* EAP_VENDOR_TEST */
130 ret
= eap_peer_tnc_register();
134 #ifdef EAP_SERVER_IDENTITY
136 ret
= eap_server_identity_register();
137 #endif /* EAP_SERVER_IDENTITY */
139 #ifdef EAP_SERVER_MD5
141 ret
= eap_server_md5_register();
142 #endif /* EAP_SERVER_MD5 */
144 #ifdef EAP_SERVER_TLS
146 ret
= eap_server_tls_register();
147 #endif /* EAP_SERVER_TLS */
149 #ifdef EAP_SERVER_MSCHAPV2
151 ret
= eap_server_mschapv2_register();
152 #endif /* EAP_SERVER_MSCHAPV2 */
154 #ifdef EAP_SERVER_PEAP
156 ret
= eap_server_peap_register();
157 #endif /* EAP_SERVER_PEAP */
159 #ifdef EAP_SERVER_TLV
161 ret
= eap_server_tlv_register();
162 #endif /* EAP_SERVER_TLV */
164 #ifdef EAP_SERVER_GTC
166 ret
= eap_server_gtc_register();
167 #endif /* EAP_SERVER_GTC */
169 #ifdef EAP_SERVER_TTLS
171 ret
= eap_server_ttls_register();
172 #endif /* EAP_SERVER_TTLS */
174 #ifdef EAP_SERVER_SIM
176 ret
= eap_server_sim_register();
177 #endif /* EAP_SERVER_SIM */
179 #ifdef EAP_SERVER_AKA
181 ret
= eap_server_aka_register();
182 #endif /* EAP_SERVER_AKA */
184 #ifdef EAP_SERVER_AKA_PRIME
186 ret
= eap_server_aka_prime_register();
187 #endif /* EAP_SERVER_AKA_PRIME */
189 #ifdef EAP_SERVER_PAX
191 ret
= eap_server_pax_register();
192 #endif /* EAP_SERVER_PAX */
194 #ifdef EAP_SERVER_PSK
196 ret
= eap_server_psk_register();
197 #endif /* EAP_SERVER_PSK */
199 #ifdef EAP_SERVER_SAKE
201 ret
= eap_server_sake_register();
202 #endif /* EAP_SERVER_SAKE */
204 #ifdef EAP_SERVER_GPSK
206 ret
= eap_server_gpsk_register();
207 #endif /* EAP_SERVER_GPSK */
209 #ifdef EAP_SERVER_VENDOR_TEST
211 ret
= eap_server_vendor_test_register();
212 #endif /* EAP_SERVER_VENDOR_TEST */
214 #ifdef EAP_SERVER_FAST
216 ret
= eap_server_fast_register();
217 #endif /* EAP_SERVER_FAST */
219 #ifdef EAP_SERVER_WSC
221 ret
= eap_server_wsc_register();
222 #endif /* EAP_SERVER_WSC */
224 #ifdef EAP_SERVER_IKEV2
226 ret
= eap_server_ikev2_register();
227 #endif /* EAP_SERVER_IKEV2 */
229 #ifdef EAP_SERVER_TNC
231 ret
= eap_server_tnc_register();
232 #endif /* EAP_SERVER_TNC */