wpa_supplicant / hostapd  2.5
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
eap_methods.h
Go to the documentation of this file.
1 
5 #ifndef EAP_METHODS_H
6 #define EAP_METHODS_H
7 
8 #include "eap_common/eap_defs.h"
9 
10 const struct eap_method * eap_peer_get_eap_method(int vendor, EapType method);
11 const struct eap_method * eap_peer_get_methods(size_t *count);
12 
14  EapType method, const char *name);
17 
18 
19 #ifdef IEEE8021X_EAPOL
20 
21 EapType eap_peer_get_type(const char *name, int *vendor);
22 const char * eap_get_name(int vendor, EapType type);
23 size_t eap_get_names(char *buf, size_t buflen);
24 char ** eap_get_names_as_string_array(size_t *num);
26 
27 #else /* IEEE8021X_EAPOL */
28 
29 static inline EapType eap_peer_get_type(const char *name, int *vendor)
30 {
31  *vendor = EAP_VENDOR_IETF;
32  return EAP_TYPE_NONE;
33 }
34 
35 static inline const char * eap_get_name(int vendor, EapType type)
36 {
37  return NULL;
38 }
39 
40 static inline size_t eap_get_names(char *buf, size_t buflen)
41 {
42  return 0;
43 }
44 
45 static inline int eap_peer_register_methods(void)
46 {
47  return 0;
48 }
49 
50 static inline void eap_peer_unregister_methods(void)
51 {
52 }
53 
54 static inline char ** eap_get_names_as_string_array(size_t *num)
55 {
56  return NULL;
57 }
58 
59 #endif /* IEEE8021X_EAPOL */
60 
61 
62 #ifdef CONFIG_DYNAMIC_EAP_METHODS
63 
64 int eap_peer_method_load(const char *so);
65 int eap_peer_method_unload(struct eap_method *method);
66 
67 #else /* CONFIG_DYNAMIC_EAP_METHODS */
68 
69 static inline int eap_peer_method_load(const char *so)
70 {
71  return 0;
72 }
73 
74 static inline int eap_peer_method_unload(struct eap_method *method)
75 {
76  return 0;
77 }
78 
79 #endif /* CONFIG_DYNAMIC_EAP_METHODS */
80 
81 /* EAP peer method registration calls for statically linked in methods */
82 int eap_peer_md5_register(void);
83 int eap_peer_tls_register(void);
84 int eap_peer_unauth_tls_register(void);
85 int eap_peer_wfa_unauth_tls_register(void);
87 int eap_peer_peap_register(void);
88 int eap_peer_ttls_register(void);
89 int eap_peer_gtc_register(void);
90 int eap_peer_otp_register(void);
91 int eap_peer_sim_register(void);
92 int eap_peer_leap_register(void);
93 int eap_peer_psk_register(void);
94 int eap_peer_aka_register(void);
95 int eap_peer_aka_prime_register(void);
96 int eap_peer_fast_register(void);
97 int eap_peer_pax_register(void);
98 int eap_peer_sake_register(void);
99 int eap_peer_gpsk_register(void);
100 int eap_peer_wsc_register(void);
101 int eap_peer_ikev2_register(void);
102 int eap_peer_vendor_test_register(void);
103 int eap_peer_tnc_register(void);
104 int eap_peer_pwd_register(void);
105 int eap_peer_eke_register(void);
106 
107 #endif /* EAP_METHODS_H */
struct eap_method * eap_peer_method_alloc(int version, int vendor, EapType method, const char *name)
Allocate EAP peer method structure.
Definition: eap_methods.c:275
int vendor
EAP Vendor-ID (EAP_VENDOR_*) (0 = IETF)
Definition: eap_i.h:70
const struct eap_method * eap_peer_get_methods(size_t *count)
Get a list of enabled EAP peer methods.
Definition: eap_methods.c:159
const char * eap_get_name(int vendor, EapType type)
Get EAP method name for the given EAP type.
Definition: eap_methods.c:67
const struct eap_method * eap_peer_get_eap_method(int vendor, EapType method)
Get EAP method based on type number.
Definition: eap_methods.c:24
void eap_peer_method_free(struct eap_method *method)
Free EAP peer method structure.
Definition: eap_methods.c:294
EapType method
EAP type number (EAP_TYPE_*)
Definition: eap_i.h:76
int eap_peer_method_register(struct eap_method *method)
Register an EAP peer method.
Definition: eap_methods.c:309
size_t eap_get_names(char *buf, size_t buflen)
Get space separated list of names for supported EAP methods.
Definition: eap_methods.c:87
EAP server/peer: Shared EAP definitions.
EapType eap_peer_get_type(const char *name, int *vendor)
Get EAP type for the given EAP method name.
Definition: eap_methods.c:44
const char * name
Name of the method (e.g., "TLS")
Definition: eap_i.h:82
int version
Version of the EAP peer method interface.
Definition: eap_i.h:237
int eap_peer_mschapv2_register(void)
Register EAP-MSCHAPv2 peer method.
Definition: eap_mschapv2.c:876
char ** eap_get_names_as_string_array(size_t *num)
Get supported EAP methods as string array.
Definition: eap_methods.c:122
void eap_peer_unregister_methods(void)
Unregister EAP peer methods.
Definition: eap_methods.c:341
EAP method interface This structure defines the EAP method interface. Each method will need to regist...
Definition: eap_i.h:65