eap_methods.h

Go to the documentation of this file.
00001 
00016 #ifndef EAP_METHODS_H
00017 #define EAP_METHODS_H
00018 
00019 #include "eap_common/eap_defs.h"
00020 
00021 const struct eap_method * eap_peer_get_eap_method(int vendor, EapType method);
00022 const struct eap_method * eap_peer_get_methods(size_t *count);
00023 
00024 struct eap_method * eap_peer_method_alloc(int version, int vendor,
00025                                           EapType method, const char *name);
00026 void eap_peer_method_free(struct eap_method *method);
00027 int eap_peer_method_register(struct eap_method *method);
00028 
00029 
00030 #ifdef IEEE8021X_EAPOL
00031 
00032 EapType eap_peer_get_type(const char *name, int *vendor);
00033 const char * eap_get_name(int vendor, EapType type);
00034 size_t eap_get_names(char *buf, size_t buflen);
00035 char ** eap_get_names_as_string_array(size_t *num);
00036 int eap_peer_register_methods(void);
00037 void eap_peer_unregister_methods(void);
00038 
00039 #else /* IEEE8021X_EAPOL */
00040 
00041 static inline EapType eap_peer_get_type(const char *name, int *vendor)
00042 {
00043         *vendor = EAP_VENDOR_IETF;
00044         return EAP_TYPE_NONE;
00045 }
00046 
00047 static inline const char * eap_get_name(int vendor, EapType type)
00048 {
00049         return NULL;
00050 }
00051 
00052 static inline size_t eap_get_names(char *buf, size_t buflen)
00053 {
00054         return 0;
00055 }
00056 
00057 static inline int eap_peer_register_methods(void)
00058 {
00059         return 0;
00060 }
00061 
00062 static inline void eap_peer_unregister_methods(void)
00063 {
00064 }
00065 
00066 static inline char ** eap_get_names_as_string_array(size_t *num)
00067 {
00068         return NULL;
00069 }
00070 
00071 #endif /* IEEE8021X_EAPOL */
00072 
00073 
00074 #ifdef CONFIG_DYNAMIC_EAP_METHODS
00075 
00076 int eap_peer_method_load(const char *so);
00077 int eap_peer_method_unload(struct eap_method *method);
00078 
00079 #else /* CONFIG_DYNAMIC_EAP_METHODS */
00080 
00081 static inline int eap_peer_method_load(const char *so)
00082 {
00083         return 0;
00084 }
00085 
00086 static inline int eap_peer_method_unload(struct eap_method *method)
00087 {
00088         return 0;
00089 }
00090 
00091 #endif /* CONFIG_DYNAMIC_EAP_METHODS */
00092 
00093 #endif /* EAP_METHODS_H */
00094 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

Generated on Sat Nov 28 23:07:48 2009 for wpa_supplicant/hostapd by  doxygen 1.6.1