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

hostapd / EAP Authenticator state machine internal structures (RFC 4137) More...

#include "wpabuf.h"
#include "eap_server/eap.h"
#include "eap_common/eap_common.h"

Go to the source code of this file.

Data Structures

struct  eap_method
 EAP method interface This structure defines the EAP method interface. Each method will need to register its own EAP type, EAP name, and set of function pointers for method specific operations. This interface is based on section 4.4 of RFC 4137. More...
 
struct  eap_sm
 EAP state machine data. More...
 

Macros

#define EAP_SERVER_METHOD_INTERFACE_VERSION   1
 

Functions

int eap_user_get (struct eap_sm *sm, const u8 *identity, size_t identity_len, int phase2)
 Fetch user information from the database. More...
 
void eap_log_msg (struct eap_sm *sm, const char *fmt,...) PRINTF_FORMAT(2
 
void void eap_sm_process_nak (struct eap_sm *sm, const u8 *nak_list, size_t len)
 Process EAP-Response/Nak. More...
 

Detailed Description

hostapd / EAP Authenticator state machine internal structures (RFC 4137)

Function Documentation

void void eap_sm_process_nak ( struct eap_sm sm,
const u8 *  nak_list,
size_t  len 
)

Process EAP-Response/Nak.

Parameters
smPointer to EAP state machine allocated with eap_server_sm_init()
nak_listNak list (allowed methods) from the supplicant
lenLength of nak_list in bytes

This function is called when EAP-Response/Nak is received from the supplicant. This can happen for both phase 1 and phase 2 authentications.

int eap_user_get ( struct eap_sm sm,
const u8 *  identity,
size_t  identity_len,
int  phase2 
)

Fetch user information from the database.

Parameters
smPointer to EAP state machine allocated with eap_server_sm_init()
identityIdentity (User-Name) of the user
identity_lenLength of identity in bytes
phase20 = EAP phase1 user, 1 = EAP phase2 (tunneled) user
Returns
0 on success, or -1 on failure

This function is used to fetch user information for EAP. The user will be selected based on the specified identity. sm->user and sm->user_eap_method_index are updated for the new user when a matching user is found. sm->user can be used to get user information (e.g., password).