$search

eapol_auth_sm.c File Reference

#include "includes.h"
#include "common.h"
#include "eloop.h"
#include "state_machine.h"
#include "common/eapol_common.h"
#include "eap_common/eap_defs.h"
#include "eap_common/eap_common.h"
#include "eap_server/eap.h"
#include "eapol_auth_sm.h"
#include "eapol_auth_sm_i.h"
Include dependency graph for eapol_auth_sm.c:

Go to the source code of this file.

Defines

#define abortAuth()   sm->eapol->cb.abort_auth(sm->eapol->conf.ctx, sm->sta)
#define processKey()   do { } while (0)
#define setPortAuthorized()   sm->eapol->cb.set_port_authorized(sm->eapol->conf.ctx, sm->sta, 1)
#define setPortUnauthorized()   sm->eapol->cb.set_port_authorized(sm->eapol->conf.ctx, sm->sta, 0)
#define STATE_MACHINE_ADDR   sm->addr
#define STATE_MACHINE_DATA   struct eapol_state_machine
#define STATE_MACHINE_DEBUG_PREFIX   "IEEE 802.1X"
#define txCannedFail()   eapol_auth_tx_canned_eap(sm, 0)
#define txCannedSuccess()   eapol_auth_tx_canned_eap(sm, 1)
#define txKey()   sm->eapol->cb.tx_key(sm->eapol->conf.ctx, sm->sta)
#define txReq()   eapol_auth_tx_req(sm)

Functions

struct eapol_state_machineeapol_auth_alloc (struct eapol_authenticator *eapol, const u8 *addr, int flags, const struct wpabuf *assoc_wps_ie, void *sta_ctx)
static int eapol_auth_conf_clone (struct eapol_auth_config *dst, struct eapol_auth_config *src)
static void eapol_auth_conf_free (struct eapol_auth_config *conf)
void eapol_auth_deinit (struct eapol_authenticator *eapol)
int eapol_auth_eap_pending_cb (struct eapol_state_machine *sm, void *ctx)
void eapol_auth_free (struct eapol_state_machine *sm)
struct eapol_authenticatoreapol_auth_init (struct eapol_auth_config *conf, struct eapol_auth_cb *cb)
static void eapol_auth_initialize (struct eapol_state_machine *sm)
static void eapol_auth_logger (struct eapol_authenticator *eapol, const u8 *addr, eapol_logger_level level, const char *txt)
void eapol_auth_step (struct eapol_state_machine *sm)
static void eapol_auth_tx_canned_eap (struct eapol_state_machine *sm, int success)
static void eapol_auth_tx_req (struct eapol_state_machine *sm)
static void eapol_auth_vlogger (struct eapol_authenticator *eapol, const u8 *addr, eapol_logger_level level, const char *fmt,...)
static void eapol_port_timers_tick (void *eloop_ctx, void *timeout_ctx)
static const char * eapol_sm_get_eap_req_id_text (void *ctx, size_t *len)
static int eapol_sm_get_eap_user (void *ctx, const u8 *identity, size_t identity_len, int phase2, struct eap_user *user)
static int eapol_sm_sta_entry_alive (struct eapol_authenticator *eapol, const u8 *addr)
static void eapol_sm_step_cb (void *eloop_ctx, void *timeout_ctx)
static void eapol_sm_step_run (struct eapol_state_machine *sm)
 SM_STATE (CTRL_DIR, IN_OR_BOTH)
 SM_STATE (CTRL_DIR, FORCE_BOTH)
 SM_STATE (KEY_RX, KEY_RECEIVE)
 SM_STATE (KEY_RX, NO_KEY_RECEIVE)
 SM_STATE (AUTH_KEY_TX, KEY_TRANSMIT)
 SM_STATE (AUTH_KEY_TX, NO_KEY_TRANSMIT)
 SM_STATE (REAUTH_TIMER, REAUTHENTICATE)
 SM_STATE (REAUTH_TIMER, INITIALIZE)
 SM_STATE (BE_AUTH, IGNORE)
 SM_STATE (BE_AUTH, IDLE)
 SM_STATE (BE_AUTH, TIMEOUT)
 SM_STATE (BE_AUTH, FAIL)
 SM_STATE (BE_AUTH, SUCCESS)
 SM_STATE (BE_AUTH, RESPONSE)
 SM_STATE (BE_AUTH, REQUEST)
 SM_STATE (BE_AUTH, INITIALIZE)
 SM_STATE (AUTH_PAE, FORCE_UNAUTH)
 SM_STATE (AUTH_PAE, FORCE_AUTH)
 SM_STATE (AUTH_PAE, ABORTING)
 SM_STATE (AUTH_PAE, AUTHENTICATING)
 SM_STATE (AUTH_PAE, AUTHENTICATED)
 SM_STATE (AUTH_PAE, HELD)
 SM_STATE (AUTH_PAE, CONNECTING)
 SM_STATE (AUTH_PAE, RESTART)
 SM_STATE (AUTH_PAE, DISCONNECTED)
 SM_STATE (AUTH_PAE, INITIALIZE)
 SM_STEP (CTRL_DIR)
 SM_STEP (KEY_RX)
 SM_STEP (AUTH_KEY_TX)
 SM_STEP (REAUTH_TIMER)
 SM_STEP (BE_AUTH)
 SM_STEP (AUTH_PAE)

Variables

static struct eapol_callbacks eapol_cb

Define Documentation

 
#define abortAuth (  )     sm->eapol->cb.abort_auth(sm->eapol->conf.ctx, sm->sta)

Definition at line 44 of file eapol_auth_sm.c.

 
#define processKey (  )     do { } while (0)

Definition at line 46 of file eapol_auth_sm.c.

 
#define setPortAuthorized (  )     sm->eapol->cb.set_port_authorized(sm->eapol->conf.ctx, sm->sta, 1)

Definition at line 35 of file eapol_auth_sm.c.

 
#define setPortUnauthorized (  )     sm->eapol->cb.set_port_authorized(sm->eapol->conf.ctx, sm->sta, 0)

Definition at line 37 of file eapol_auth_sm.c.

#define STATE_MACHINE_ADDR   sm->addr

Definition at line 29 of file eapol_auth_sm.c.

#define STATE_MACHINE_DATA   struct eapol_state_machine

Definition at line 27 of file eapol_auth_sm.c.

#define STATE_MACHINE_DEBUG_PREFIX   "IEEE 802.1X"

Definition at line 28 of file eapol_auth_sm.c.

 
#define txCannedFail (  )     eapol_auth_tx_canned_eap(sm, 0)

Definition at line 41 of file eapol_auth_sm.c.

 
#define txCannedSuccess (  )     eapol_auth_tx_canned_eap(sm, 1)

Definition at line 42 of file eapol_auth_sm.c.

 
#define txKey (  )     sm->eapol->cb.tx_key(sm->eapol->conf.ctx, sm->sta)

Definition at line 45 of file eapol_auth_sm.c.

 
#define txReq (  )     eapol_auth_tx_req(sm)

Definition at line 43 of file eapol_auth_sm.c.


Function Documentation

struct eapol_state_machine* eapol_auth_alloc ( struct eapol_authenticator eapol,
const u8 addr,
int  flags,
const struct wpabuf assoc_wps_ie,
void *  sta_ctx 
) [read]

Definition at line 764 of file eapol_auth_sm.c.

static int eapol_auth_conf_clone ( struct eapol_auth_config dst,
struct eapol_auth_config src 
) [static]

Definition at line 1025 of file eapol_auth_sm.c.

static void eapol_auth_conf_free ( struct eapol_auth_config conf  )  [static]

Definition at line 1084 of file eapol_auth_sm.c.

void eapol_auth_deinit ( struct eapol_authenticator eapol  ) 

Definition at line 1131 of file eapol_auth_sm.c.

int eapol_auth_eap_pending_cb ( struct eapol_state_machine sm,
void *  ctx 
)

Definition at line 1013 of file eapol_auth_sm.c.

void eapol_auth_free ( struct eapol_state_machine sm  ) 

Definition at line 846 of file eapol_auth_sm.c.

struct eapol_authenticator* eapol_auth_init ( struct eapol_auth_config conf,
struct eapol_auth_cb cb 
) [read]

Definition at line 1097 of file eapol_auth_sm.c.

static void eapol_auth_initialize ( struct eapol_state_machine sm  )  [static]

Definition at line 971 of file eapol_auth_sm.c.

static void eapol_auth_logger ( struct eapol_authenticator eapol,
const u8 addr,
eapol_logger_level  level,
const char *  txt 
) [static]

Definition at line 54 of file eapol_auth_sm.c.

void eapol_auth_step ( struct eapol_state_machine sm  ) 

eapol_auth_step - Advance EAPOL state machines : EAPOL state machine

This function is called to advance EAPOL state machines after any change that could affect their state.

Definition at line 959 of file eapol_auth_sm.c.

static void eapol_auth_tx_canned_eap ( struct eapol_state_machine sm,
int  success 
) [static]

Definition at line 90 of file eapol_auth_sm.c.

static void eapol_auth_tx_req ( struct eapol_state_machine sm  )  [static]

Definition at line 111 of file eapol_auth_sm.c.

static void eapol_auth_vlogger ( struct eapol_authenticator eapol,
const u8 addr,
eapol_logger_level  level,
const char *  fmt,
  ... 
) [static]

Definition at line 64 of file eapol_auth_sm.c.

static void eapol_port_timers_tick ( void *  eloop_ctx,
void *  timeout_ctx 
) [static]

eapol_port_timers_tick - Port Timers state machine : struct eapol_state_machine * : Not used

This statemachine is implemented as a function that will be called once a second as a registered event loop timeout.

Definition at line 153 of file eapol_auth_sm.c.

static const char* eapol_sm_get_eap_req_id_text ( void *  ctx,
size_t *  len 
) [static]

Definition at line 998 of file eapol_auth_sm.c.

static int eapol_sm_get_eap_user ( void *  ctx,
const u8 identity,
size_t  identity_len,
int  phase2,
struct eap_user user 
) [static]

Definition at line 988 of file eapol_auth_sm.c.

static int eapol_sm_sta_entry_alive ( struct eapol_authenticator eapol,
const u8 addr 
) [static]

Definition at line 859 of file eapol_auth_sm.c.

static void eapol_sm_step_cb ( void *  eloop_ctx,
void *  timeout_ctx 
) [static]

Definition at line 945 of file eapol_auth_sm.c.

static void eapol_sm_step_run ( struct eapol_state_machine sm  )  [static]

Definition at line 866 of file eapol_auth_sm.c.

SM_STATE ( CTRL_DIR  ,
IN_OR_BOTH   
)

Definition at line 732 of file eapol_auth_sm.c.

SM_STATE ( CTRL_DIR  ,
FORCE_BOTH   
)

Definition at line 725 of file eapol_auth_sm.c.

SM_STATE ( KEY_RX  ,
KEY_RECEIVE   
)

Definition at line 693 of file eapol_auth_sm.c.

SM_STATE ( KEY_RX  ,
NO_KEY_RECEIVE   
)

Definition at line 687 of file eapol_auth_sm.c.

SM_STATE ( AUTH_KEY_TX  ,
KEY_TRANSMIT   
)

Definition at line 651 of file eapol_auth_sm.c.

SM_STATE ( AUTH_KEY_TX  ,
NO_KEY_TRANSMIT   
)

Definition at line 645 of file eapol_auth_sm.c.

SM_STATE ( REAUTH_TIMER  ,
REAUTHENTICATE   
)

Definition at line 612 of file eapol_auth_sm.c.

SM_STATE ( REAUTH_TIMER  ,
INITIALIZE   
)

Definition at line 604 of file eapol_auth_sm.c.

SM_STATE ( BE_AUTH  ,
IGNORE   
)

Definition at line 529 of file eapol_auth_sm.c.

SM_STATE ( BE_AUTH  ,
IDLE   
)

Definition at line 521 of file eapol_auth_sm.c.

SM_STATE ( BE_AUTH  ,
TIMEOUT   
)

Definition at line 513 of file eapol_auth_sm.c.

SM_STATE ( BE_AUTH  ,
FAIL   
)

Definition at line 504 of file eapol_auth_sm.c.

SM_STATE ( BE_AUTH  ,
SUCCESS   
)

Definition at line 494 of file eapol_auth_sm.c.

SM_STATE ( BE_AUTH  ,
RESPONSE   
)

Definition at line 480 of file eapol_auth_sm.c.

SM_STATE ( BE_AUTH  ,
REQUEST   
)

Definition at line 457 of file eapol_auth_sm.c.

SM_STATE ( BE_AUTH  ,
INITIALIZE   
)

Definition at line 447 of file eapol_auth_sm.c.

SM_STATE ( AUTH_PAE  ,
FORCE_UNAUTH   
)

Definition at line 360 of file eapol_auth_sm.c.

SM_STATE ( AUTH_PAE  ,
FORCE_AUTH   
)

Definition at line 348 of file eapol_auth_sm.c.

SM_STATE ( AUTH_PAE  ,
ABORTING   
)

Definition at line 329 of file eapol_auth_sm.c.

SM_STATE ( AUTH_PAE  ,
AUTHENTICATING   
)

Definition at line 315 of file eapol_auth_sm.c.

SM_STATE ( AUTH_PAE  ,
AUTHENTICATED   
)

Definition at line 289 of file eapol_auth_sm.c.

SM_STATE ( AUTH_PAE  ,
HELD   
)

Definition at line 262 of file eapol_auth_sm.c.

SM_STATE ( AUTH_PAE  ,
CONNECTING   
)

Definition at line 250 of file eapol_auth_sm.c.

SM_STATE ( AUTH_PAE  ,
RESTART   
)

Definition at line 233 of file eapol_auth_sm.c.

SM_STATE ( AUTH_PAE  ,
DISCONNECTED   
)

Definition at line 209 of file eapol_auth_sm.c.

SM_STATE ( AUTH_PAE  ,
INITIALIZE   
)

Definition at line 202 of file eapol_auth_sm.c.

SM_STEP ( CTRL_DIR   ) 

Definition at line 739 of file eapol_auth_sm.c.

SM_STEP ( KEY_RX   ) 

Definition at line 702 of file eapol_auth_sm.c.

SM_STEP ( AUTH_KEY_TX   ) 

Definition at line 661 of file eapol_auth_sm.c.

SM_STEP ( REAUTH_TIMER   ) 

Definition at line 622 of file eapol_auth_sm.c.

SM_STEP ( BE_AUTH   ) 

Definition at line 537 of file eapol_auth_sm.c.

SM_STEP ( AUTH_PAE   ) 

Definition at line 372 of file eapol_auth_sm.c.


Variable Documentation

static struct eapol_callbacks eapol_cb [static]
Initial value:

Definition at line 31 of file eapol_auth_sm.c.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines


wpa_supplicant_node
Author(s): Package maintained by Blaise Gassend
autogenerated on Fri Mar 1 16:00:19 2013