Defines | Functions
eap_server.c File Reference
#include "includes.h"
#include "common.h"
#include "eap_i.h"
#include "state_machine.h"
#include "common/wpa_ctrl.h"
Include dependency graph for eap_server.c:

Go to the source code of this file.

Defines

#define EAP_COPY(dst, src)   eap_copy_data((dst), (dst ## Len), (src), (src ## Len))
#define EAP_MAX_AUTH_ROUNDS   50
#define STATE_MACHINE_DATA   struct eap_sm
#define STATE_MACHINE_DEBUG_PREFIX   "EAP"

Functions

static int eap_copy_buf (struct wpabuf **dst, const struct wpabuf *src)
static int eap_copy_data (u8 **dst, size_t *dst_len, const u8 *src, size_t src_len)
const u8 * eap_get_identity (struct eap_sm *sm, size_t *len)
struct eap_eapol_interfaceeap_get_interface (struct eap_sm *sm)
void eap_server_sm_deinit (struct eap_sm *sm)
struct eap_smeap_server_sm_init (void *eapol_ctx, struct eapol_callbacks *eapol_cb, struct eap_config *conf)
int eap_server_sm_step (struct eap_sm *sm)
static struct wpabufeap_sm_buildFailure (struct eap_sm *sm, u8 id)
static struct wpabufeap_sm_buildSuccess (struct eap_sm *sm, u8 id)
static int eap_sm_calculateTimeout (struct eap_sm *sm, int retransCount, int eapSRTT, int eapRTTVAR, int methodTimeout)
static int eap_sm_getId (const struct wpabuf *data)
int eap_sm_method_pending (struct eap_sm *sm)
static int eap_sm_nextId (struct eap_sm *sm, int id)
void eap_sm_notify_cached (struct eap_sm *sm)
static void eap_sm_parseEapResp (struct eap_sm *sm, const struct wpabuf *resp)
void eap_sm_pending_cb (struct eap_sm *sm)
static Boolean eap_sm_Policy_doPickUp (struct eap_sm *sm, EapType method)
static int eap_sm_Policy_getDecision (struct eap_sm *sm)
static EapType eap_sm_Policy_getNextMethod (struct eap_sm *sm, int *vendor)
static void eap_sm_Policy_update (struct eap_sm *sm, const u8 *nak_list, size_t len)
void eap_sm_process_nak (struct eap_sm *sm, const u8 *nak_list, size_t len)
static void eap_user_free (struct eap_user *user)
int eap_user_get (struct eap_sm *sm, const u8 *identity, size_t identity_len, int phase2)
 SM_STATE (EAP, DISABLED)
 SM_STATE (EAP, INITIALIZE)
 SM_STATE (EAP, PICK_UP_METHOD)
 SM_STATE (EAP, IDLE)
 SM_STATE (EAP, RETRANSMIT)
 SM_STATE (EAP, RECEIVED)
 SM_STATE (EAP, DISCARD)
 SM_STATE (EAP, SEND_REQUEST)
 SM_STATE (EAP, INTEGRITY_CHECK)
 SM_STATE (EAP, METHOD_REQUEST)
 SM_STATE (EAP, METHOD_RESPONSE)
 SM_STATE (EAP, PROPOSE_METHOD)
 SM_STATE (EAP, NAK)
 SM_STATE (EAP, SELECT_ACTION)
 SM_STATE (EAP, TIMEOUT_FAILURE)
 SM_STATE (EAP, FAILURE)
 SM_STATE (EAP, SUCCESS)
 SM_STATE (EAP, INITIALIZE_PASSTHROUGH)
 SM_STATE (EAP, IDLE2)
 SM_STATE (EAP, RETRANSMIT2)
 SM_STATE (EAP, RECEIVED2)
 SM_STATE (EAP, DISCARD2)
 SM_STATE (EAP, SEND_REQUEST2)
 SM_STATE (EAP, AAA_REQUEST)
 SM_STATE (EAP, AAA_RESPONSE)
 SM_STATE (EAP, AAA_IDLE)
 SM_STATE (EAP, TIMEOUT_FAILURE2)
 SM_STATE (EAP, FAILURE2)
 SM_STATE (EAP, SUCCESS2)
 SM_STEP (EAP)

Define Documentation

#define EAP_COPY (   dst,
  src 
)    eap_copy_data((dst), (dst ## Len), (src), (src ## Len))

Definition at line 82 of file eap_server.c.

#define EAP_MAX_AUTH_ROUNDS   50

Definition at line 31 of file eap_server.c.

#define STATE_MACHINE_DATA   struct eap_sm

Definition at line 28 of file eap_server.c.

#define STATE_MACHINE_DEBUG_PREFIX   "EAP"

Definition at line 29 of file eap_server.c.


Function Documentation

static int eap_copy_buf ( struct wpabuf **  dst,
const struct wpabuf src 
) [static]

Definition at line 53 of file eap_server.c.

static int eap_copy_data ( u8 **  dst,
size_t *  dst_len,
const u8 *  src,
size_t  src_len 
) [static]

Definition at line 64 of file eap_server.c.

const u8* eap_get_identity ( struct eap_sm sm,
size_t *  len 
)

eap_get_identity - Get the user identity (from EAP-Response/Identity) : Pointer to EAP state machine allocated with eap_server_sm_init() : Buffer for returning identity length Returns: Pointer to the user identity or NULL if not available

Definition at line 1349 of file eap_server.c.

struct eap_eapol_interface* eap_get_interface ( struct eap_sm sm) [read]

eap_get_interface - Get pointer to EAP-EAPOL interface data : Pointer to EAP state machine allocated with eap_server_sm_init() Returns: Pointer to the EAP-EAPOL interface data

Definition at line 1361 of file eap_server.c.

void eap_server_sm_deinit ( struct eap_sm sm)

eap_server_sm_deinit - Deinitialize and free an EAP server state machine : Pointer to EAP state machine allocated with eap_server_sm_init()

This function deinitializes EAP state machine and frees all allocated resources.

Definition at line 1274 of file eap_server.c.

struct eap_sm* eap_server_sm_init ( void *  eapol_ctx,
struct eapol_callbacks eapol_cb,
struct eap_config conf 
) [read]

eap_server_sm_init - Allocate and initialize EAP server state machine : Context data to be used with eapol_cb calls : Pointer to EAPOL callback functions : EAP configuration Returns: Pointer to the allocated EAP state machine or NULL on failure

This function allocates and initializes an EAP state machine.

Definition at line 1216 of file eap_server.c.

int eap_server_sm_step ( struct eap_sm sm)

eap_server_sm_step - Step EAP server state machine : Pointer to EAP state machine allocated with eap_server_sm_init() Returns: 1 if EAP state was changed or 0 if not

This function advances EAP state machine to a new state to match with the current variables. This should be called whenever variables used by the EAP state machine have changed.

Definition at line 1184 of file eap_server.c.

static struct wpabuf * eap_sm_buildFailure ( struct eap_sm sm,
u8  id 
) [static, read]

Definition at line 954 of file eap_server.c.

static struct wpabuf * eap_sm_buildSuccess ( struct eap_sm sm,
u8  id 
) [static, read]

Definition at line 936 of file eap_server.c.

static int eap_sm_calculateTimeout ( struct eap_sm sm,
int  retransCount,
int  eapSRTT,
int  eapRTTVAR,
int  methodTimeout 
) [static]

Definition at line 814 of file eap_server.c.

static int eap_sm_getId ( const struct wpabuf data) [static]

Definition at line 923 of file eap_server.c.

int eap_sm_method_pending ( struct eap_sm sm)

eap_sm_method_pending - Query whether EAP method is waiting for pending data : Pointer to EAP state machine allocated with eap_server_sm_init() Returns: 1 if method is waiting for pending data or 0 if not

Definition at line 1335 of file eap_server.c.

static int eap_sm_nextId ( struct eap_sm sm,
int  id 
) [static]

Definition at line 972 of file eap_server.c.

void eap_sm_notify_cached ( struct eap_sm sm)

eap_sm_notify_cached - Notify EAP state machine of cached PMK : Pointer to EAP state machine allocated with eap_server_sm_init()

This function is called when PMKSA caching is used to skip EAP authentication.

Definition at line 1305 of file eap_server.c.

static void eap_sm_parseEapResp ( struct eap_sm sm,
const struct wpabuf resp 
) [static]

Definition at line 866 of file eap_server.c.

void eap_sm_pending_cb ( struct eap_sm sm)

eap_sm_pending_cb - EAP state machine callback for a pending EAP request : Pointer to EAP state machine allocated with eap_server_sm_init()

This function is called when data for a pending EAP-Request is received.

Definition at line 1320 of file eap_server.c.

static Boolean eap_sm_Policy_doPickUp ( struct eap_sm sm,
EapType  method 
) [static]

Definition at line 1169 of file eap_server.c.

static int eap_sm_Policy_getDecision ( struct eap_sm sm) [static]

Definition at line 1094 of file eap_server.c.

static EapType eap_sm_Policy_getNextMethod ( struct eap_sm sm,
int *  vendor 
) [static]

Definition at line 1062 of file eap_server.c.

static void eap_sm_Policy_update ( struct eap_sm sm,
const u8 *  nak_list,
size_t  len 
) [static]

Definition at line 1045 of file eap_server.c.

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

eap_sm_process_nak - Process EAP-Response/Nak : Pointer to EAP state machine allocated with eap_server_sm_init() : Nak list (allowed methods) from the supplicant : Length 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.

Definition at line 994 of file eap_server.c.

static void eap_user_free ( struct eap_user user) [static]

Definition at line 1197 of file eap_server.c.

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

eap_user_get - Fetch user information from the database : Pointer to EAP state machine allocated with eap_server_sm_init() : Identity (User-Name) of the user : Length of identity in bytes : 0 = 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).

Definition at line 99 of file eap_server.c.

SM_STATE ( EAP  ,
DISABLED   
)

Definition at line 128 of file eap_server.c.

SM_STATE ( EAP  ,
INITIALIZE   
)

Definition at line 135 of file eap_server.c.

SM_STATE ( EAP  ,
PICK_UP_METHOD   
)

Definition at line 177 of file eap_server.c.

SM_STATE ( EAP  ,
IDLE   
)

Definition at line 209 of file eap_server.c.

SM_STATE ( EAP  ,
RETRANSMIT   
)

Definition at line 219 of file eap_server.c.

SM_STATE ( EAP  ,
RECEIVED   
)

Definition at line 231 of file eap_server.c.

SM_STATE ( EAP  ,
DISCARD   
)

Definition at line 241 of file eap_server.c.

SM_STATE ( EAP  ,
SEND_REQUEST   
)

Definition at line 249 of file eap_server.c.

SM_STATE ( EAP  ,
INTEGRITY_CHECK   
)

Definition at line 272 of file eap_server.c.

SM_STATE ( EAP  ,
METHOD_REQUEST   
)

Definition at line 283 of file eap_server.c.

SM_STATE ( EAP  ,
METHOD_RESPONSE   
)

Definition at line 306 of file eap_server.c.

SM_STATE ( EAP  ,
PROPOSE_METHOD   
)

Definition at line 329 of file eap_server.c.

SM_STATE ( EAP  ,
NAK   
)

Definition at line 366 of file eap_server.c.

SM_STATE ( EAP  ,
SELECT_ACTION   
)

Definition at line 398 of file eap_server.c.

SM_STATE ( EAP  ,
TIMEOUT_FAILURE   
)

Definition at line 406 of file eap_server.c.

SM_STATE ( EAP  ,
FAILURE   
)

Definition at line 414 of file eap_server.c.

SM_STATE ( EAP  ,
SUCCESS   
)

Definition at line 429 of file eap_server.c.

SM_STATE ( EAP  ,
INITIALIZE_PASSTHROUGH   
)

Definition at line 446 of file eap_server.c.

SM_STATE ( EAP  ,
IDLE2   
)

Definition at line 455 of file eap_server.c.

SM_STATE ( EAP  ,
RETRANSMIT2   
)

Definition at line 465 of file eap_server.c.

SM_STATE ( EAP  ,
RECEIVED2   
)

Definition at line 477 of file eap_server.c.

SM_STATE ( EAP  ,
DISCARD2   
)

Definition at line 486 of file eap_server.c.

SM_STATE ( EAP  ,
SEND_REQUEST2   
)

Definition at line 494 of file eap_server.c.

SM_STATE ( EAP  ,
AAA_REQUEST   
)

Definition at line 517 of file eap_server.c.

SM_STATE ( EAP  ,
AAA_RESPONSE   
)

Definition at line 537 of file eap_server.c.

SM_STATE ( EAP  ,
AAA_IDLE   
)

Definition at line 547 of file eap_server.c.

SM_STATE ( EAP  ,
TIMEOUT_FAILURE2   
)

Definition at line 559 of file eap_server.c.

SM_STATE ( EAP  ,
FAILURE2   
)

Definition at line 567 of file eap_server.c.

SM_STATE ( EAP  ,
SUCCESS2   
)

Definition at line 576 of file eap_server.c.

SM_STEP ( EAP  )

Definition at line 602 of file eap_server.c.



wpa_supplicant
Author(s): Package maintained by Blaise Gassend
autogenerated on Thu Apr 24 2014 15:34:38