wpa_supplicant / hostapd  2.5
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Functions
eap_methods.h File Reference

EAP server method registration. More...

#include "eap_common/eap_defs.h"

Go to the source code of this file.

Functions

const struct eap_methodeap_server_get_eap_method (int vendor, EapType method)
 Get EAP method based on type number. More...
 
struct eap_methodeap_server_method_alloc (int version, int vendor, EapType method, const char *name)
 Allocate EAP server method structure. More...
 
void eap_server_method_free (struct eap_method *method)
 Free EAP server method structure. More...
 
int eap_server_method_register (struct eap_method *method)
 Register an EAP server method. More...
 
EapType eap_server_get_type (const char *name, int *vendor)
 Get EAP type for the given EAP method name. More...
 
void eap_server_unregister_methods (void)
 Unregister EAP server methods. More...
 
const char * eap_server_get_name (int vendor, EapType type)
 Get EAP method name for the given EAP type. More...
 
int eap_server_identity_register (void)
 
int eap_server_md5_register (void)
 
int eap_server_tls_register (void)
 
int eap_server_unauth_tls_register (void)
 
int eap_server_wfa_unauth_tls_register (void)
 
int eap_server_mschapv2_register (void)
 
int eap_server_peap_register (void)
 
int eap_server_tlv_register (void)
 
int eap_server_gtc_register (void)
 
int eap_server_ttls_register (void)
 
int eap_server_sim_register (void)
 
int eap_server_aka_register (void)
 
int eap_server_aka_prime_register (void)
 
int eap_server_pax_register (void)
 
int eap_server_psk_register (void)
 
int eap_server_sake_register (void)
 
int eap_server_gpsk_register (void)
 
int eap_server_vendor_test_register (void)
 
int eap_server_fast_register (void)
 
int eap_server_wsc_register (void)
 
int eap_server_ikev2_register (void)
 
int eap_server_tnc_register (void)
 
int eap_server_pwd_register (void)
 
int eap_server_eke_register (void)
 

Detailed Description

EAP server method registration.

Function Documentation

const struct eap_method* eap_server_get_eap_method ( int  vendor,
EapType  method 
)

Get EAP method based on type number.

Parameters
vendorEAP Vendor-Id (0 = IETF)
methodEAP type number
Returns
Pointer to EAP method or NULL if not found
const char* eap_server_get_name ( int  vendor,
EapType  type 
)

Get EAP method name for the given EAP type.

Parameters
vendorEAP Vendor-Id (0 = IETF)
typeEAP method type
Returns
EAP method name, e.g., TLS, or "unknown" if not found

This function maps EAP type numbers into EAP type names based on the list of EAP methods included in the build.

EapType eap_server_get_type ( const char *  name,
int *  vendor 
)

Get EAP type for the given EAP method name.

Parameters
nameEAP method name, e.g., TLS
vendorBuffer for returning EAP Vendor-Id
Returns
EAP method type or EAP_TYPE_NONE if not found

This function maps EAP type names into EAP type numbers based on the list of EAP methods included in the build.

struct eap_method* eap_server_method_alloc ( int  version,
int  vendor,
EapType  method,
const char *  name 
)

Allocate EAP server method structure.

Parameters
versionVersion of the EAP server method interface (set to EAP_SERVER_METHOD_INTERFACE_VERSION)
vendorEAP Vendor-ID (EAP_VENDOR_*) (0 = IETF)
methodEAP type number (EAP_TYPE_*)
nameName of the method (e.g., "TLS")
Returns
Allocated EAP method structure or NULL on failure

The returned structure should be freed with eap_server_method_free() when it is not needed anymore.

void eap_server_method_free ( struct eap_method method)

Free EAP server method structure.

Parameters
methodMethod structure allocated with eap_server_method_alloc()
int eap_server_method_register ( struct eap_method method)

Register an EAP server method.

Parameters
methodEAP method to register
Returns
0 on success, -1 on invalid method, or -2 if a matching EAP method has already been registered

Each EAP server method needs to call this function to register itself as a supported EAP method.

void eap_server_unregister_methods ( void  )

Unregister EAP server methods.

This function is called at program termination to unregister all EAP server methods.