ieee802_1x.c File Reference

#include "utils/includes.h"
#include "utils/common.h"
#include "utils/eloop.h"
#include "crypto/md5.h"
#include "crypto/crypto.h"
#include "common/ieee802_11_defs.h"
#include "common/wpa_ctrl.h"
#include "radius/radius.h"
#include "radius/radius_client.h"
#include "eap_server/eap.h"
#include "eapol_auth/eapol_auth_sm.h"
#include "eapol_auth/eapol_auth_sm_i.h"
#include "hostapd.h"
#include "accounting.h"
#include "sta_info.h"
#include "wpa_auth.h"
#include "preauth_auth.h"
#include "ap_config.h"
#include "ieee802_1x.h"
Include dependency graph for ieee802_1x.c:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  sta_id_search

Functions

static void _ieee802_1x_abort_auth (void *ctx, void *sta_ctx)
static void _ieee802_1x_finished (void *ctx, void *sta_ctx, int success, int preauth)
static void _ieee802_1x_tx_key (void *ctx, void *sta_ctx)
static const char * bool_txt (Boolean bool)
static void handle_eap (struct hostapd_data *hapd, struct sta_info *sta, u8 *buf, size_t len)
static void handle_eap_response (struct hostapd_data *hapd, struct sta_info *sta, struct eap_hdr *eap, size_t len)
static void ieee802_1x_aaa_send (void *ctx, void *sta_ctx, const u8 *data, size_t datalen)
void ieee802_1x_abort_auth (struct hostapd_data *hapd, struct sta_info *sta)
static struct eapol_state_machineieee802_1x_alloc_eapol_sm (struct hostapd_data *hapd, struct sta_info *sta)
static void ieee802_1x_decapsulate_radius (struct hostapd_data *hapd, struct sta_info *sta)
void ieee802_1x_deinit (struct hostapd_data *hapd)
static void ieee802_1x_eapol_event (void *ctx, void *sta_ctx, enum eapol_event type)
static void ieee802_1x_eapol_send (void *ctx, void *sta_ctx, u8 type, const u8 *data, size_t datalen)
static void ieee802_1x_encapsulate_radius (struct hostapd_data *hapd, struct sta_info *sta, const u8 *eap, size_t len)
static void ieee802_1x_finished (struct hostapd_data *hapd, struct sta_info *sta, int success)
void ieee802_1x_free_station (struct sta_info *sta)
static int ieee802_1x_get_eap_user (void *ctx, const u8 *identity, size_t identity_len, int phase2, struct eap_user *user)
static struct hostapd_wep_keysieee802_1x_get_group (struct hostapd_data *hapd, struct hostapd_ssid *ssid, size_t vlan_id)
u8ieee802_1x_get_identity (struct eapol_state_machine *sm, size_t *len)
const u8ieee802_1x_get_key (struct eapol_state_machine *sm, size_t *len)
static void ieee802_1x_get_keys (struct hostapd_data *hapd, struct sta_info *sta, struct radius_msg *msg, struct radius_msg *req, const u8 *shared_secret, size_t shared_secret_len)
int ieee802_1x_get_mib (struct hostapd_data *hapd, char *buf, size_t buflen)
int ieee802_1x_get_mib_sta (struct hostapd_data *hapd, struct sta_info *sta, char *buf, size_t buflen)
u8ieee802_1x_get_radius_class (struct eapol_state_machine *sm, size_t *len, int idx)
static struct hostapd_wep_keysieee802_1x_group_alloc (struct hostapd_data *hapd, const char *ifname)
int ieee802_1x_init (struct hostapd_data *hapd)
static void ieee802_1x_learn_identity (struct hostapd_data *hapd, struct eapol_state_machine *sm, const u8 *eap, size_t len)
static void ieee802_1x_logger (void *ctx, const u8 *addr, eapol_logger_level level, const char *txt)
void ieee802_1x_new_station (struct hostapd_data *hapd, struct sta_info *sta)
void ieee802_1x_notify_port_enabled (struct eapol_state_machine *sm, int enabled)
void ieee802_1x_notify_port_valid (struct eapol_state_machine *sm, int valid)
void ieee802_1x_notify_pre_auth (struct eapol_state_machine *sm, int pre_auth)
void ieee802_1x_receive (struct hostapd_data *hapd, const u8 *sa, const u8 *buf, size_t len)
static RadiusRxResult ieee802_1x_receive_auth (struct radius_msg *msg, struct radius_msg *req, const u8 *shared_secret, size_t shared_secret_len, void *data)
static void ieee802_1x_rekey (void *eloop_ctx, void *timeout_ctx)
static int ieee802_1x_rekey_broadcast (struct hostapd_data *hapd)
static struct eapol_state_machineieee802_1x_search_radius_identifier (struct hostapd_data *hapd, u8 identifier)
static int ieee802_1x_select_radius_identifier (struct hostapd_data *hapd, struct sta_info *sta, void *ctx)
static void ieee802_1x_send (struct hostapd_data *hapd, struct sta_info *sta, u8 type, const u8 *data, size_t datalen)
static void ieee802_1x_set_port_authorized (void *ctx, void *sta_ctx, int authorized)
void ieee802_1x_set_sta_authorized (struct hostapd_data *hapd, struct sta_info *sta, int authorized)
static int ieee802_1x_sta_entry_alive (void *ctx, const u8 *addr)
static int ieee802_1x_sta_key_available (struct hostapd_data *hapd, struct sta_info *sta, void *ctx)
static void ieee802_1x_store_radius_class (struct hostapd_data *hapd, struct sta_info *sta, struct radius_msg *msg)
void ieee802_1x_tx_key (struct hostapd_data *hapd, struct sta_info *sta)
static void ieee802_1x_tx_key_one (struct hostapd_data *hapd, struct sta_info *sta, int idx, int broadcast, u8 *key_data, size_t key_len)
int ieee802_1x_tx_status (struct hostapd_data *hapd, struct sta_info *sta, const u8 *buf, size_t len, int ack)
static void ieee802_1x_update_sta_identity (struct hostapd_data *hapd, struct sta_info *sta, struct radius_msg *msg)
const char * radius_mode_txt (struct hostapd_data *hapd)
int radius_sta_rate (struct hostapd_data *hapd, struct sta_info *sta)

Function Documentation

static void _ieee802_1x_abort_auth ( void *  ctx,
void *  sta_ctx 
) [static]

Definition at line 1571 of file ieee802_1x.c.

static void _ieee802_1x_finished ( void *  ctx,
void *  sta_ctx,
int  success,
int  preauth 
) [static]

Definition at line 1475 of file ieee802_1x.c.

static void _ieee802_1x_tx_key ( void *  ctx,
void *  sta_ctx 
) [static]

Definition at line 1579 of file ieee802_1x.c.

static const char* bool_txt ( Boolean  bool  )  [static]

Definition at line 1809 of file ieee802_1x.c.

static void handle_eap ( struct hostapd_data hapd,
struct sta_info sta,
u8 buf,
size_t  len 
) [static]

Definition at line 593 of file ieee802_1x.c.

static void handle_eap_response ( struct hostapd_data hapd,
struct sta_info sta,
struct eap_hdr eap,
size_t  len 
) [static]

Definition at line 560 of file ieee802_1x.c.

static void ieee802_1x_aaa_send ( void *  ctx,
void *  sta_ctx,
const u8 data,
size_t  datalen 
) [static]

Definition at line 1463 of file ieee802_1x.c.

void ieee802_1x_abort_auth ( struct hostapd_data hapd,
struct sta_info sta 
)

Definition at line 1346 of file ieee802_1x.c.

static struct eapol_state_machine* ieee802_1x_alloc_eapol_sm ( struct hostapd_data hapd,
struct sta_info sta 
) [static, read]

Definition at line 643 of file ieee802_1x.c.

static void ieee802_1x_decapsulate_radius ( struct hostapd_data hapd,
struct sta_info sta 
) [static]

Definition at line 929 of file ieee802_1x.c.

void ieee802_1x_deinit ( struct hostapd_data hapd  ) 

Definition at line 1673 of file ieee802_1x.c.

static void ieee802_1x_eapol_event ( void *  ctx,
void *  sta_ctx,
enum eapol_event  type 
) [static]

Definition at line 1587 of file ieee802_1x.c.

static void ieee802_1x_eapol_send ( void *  ctx,
void *  sta_ctx,
u8  type,
const u8 data,
size_t  datalen 
) [static]

Definition at line 1456 of file ieee802_1x.c.

static void ieee802_1x_encapsulate_radius ( struct hostapd_data hapd,
struct sta_info sta,
const u8 eap,
size_t  len 
) [static]

Definition at line 419 of file ieee802_1x.c.

static void ieee802_1x_finished ( struct hostapd_data hapd,
struct sta_info sta,
int  success 
) [static]

Definition at line 1966 of file ieee802_1x.c.

void ieee802_1x_free_station ( struct sta_info sta  ) 

Definition at line 909 of file ieee802_1x.c.

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

Definition at line 1487 of file ieee802_1x.c.

static struct hostapd_wep_keys* ieee802_1x_get_group ( struct hostapd_data hapd,
struct hostapd_ssid ssid,
size_t  vlan_id 
) [static, read]

Definition at line 242 of file ieee802_1x.c.

u8* ieee802_1x_get_identity ( struct eapol_state_machine sm,
size_t *  len 
)

Definition at line 1746 of file ieee802_1x.c.

const u8* ieee802_1x_get_key ( struct eapol_state_machine sm,
size_t *  len 
)

Definition at line 1768 of file ieee802_1x.c.

static void ieee802_1x_get_keys ( struct hostapd_data hapd,
struct sta_info sta,
struct radius_msg msg,
struct radius_msg req,
const u8 shared_secret,
size_t  shared_secret_len 
) [static]

Definition at line 1011 of file ieee802_1x.c.

int ieee802_1x_get_mib ( struct hostapd_data hapd,
char *  buf,
size_t  buflen 
)

Definition at line 1815 of file ieee802_1x.c.

int ieee802_1x_get_mib_sta ( struct hostapd_data hapd,
struct sta_info sta,
char *  buf,
size_t  buflen 
)

Definition at line 1822 of file ieee802_1x.c.

u8* ieee802_1x_get_radius_class ( struct eapol_state_machine sm,
size_t *  len,
int  idx 
)

Definition at line 1756 of file ieee802_1x.c.

static struct hostapd_wep_keys* ieee802_1x_group_alloc ( struct hostapd_data hapd,
const char *  ifname 
) [static, read]

Definition at line 198 of file ieee802_1x.c.

int ieee802_1x_init ( struct hostapd_data hapd  ) 

Definition at line 1603 of file ieee802_1x.c.

static void ieee802_1x_learn_identity ( struct hostapd_data hapd,
struct eapol_state_machine sm,
const u8 eap,
size_t  len 
) [static]

Definition at line 387 of file ieee802_1x.c.

static void ieee802_1x_logger ( void *  ctx,
const u8 addr,
eapol_logger_level  level,
const char *  txt 
) [static]

Definition at line 1536 of file ieee802_1x.c.

void ieee802_1x_new_station ( struct hostapd_data hapd,
struct sta_info sta 
)

ieee802_1x_new_station - Start IEEE 802.1X authentication : hostapd BSS data : The station

This function is called to start IEEE 802.1X authentication when a new station completes IEEE 802.11 association.

Definition at line 825 of file ieee802_1x.c.

void ieee802_1x_notify_port_enabled ( struct eapol_state_machine sm,
int  enabled 
)

Definition at line 1778 of file ieee802_1x.c.

void ieee802_1x_notify_port_valid ( struct eapol_state_machine sm,
int  valid 
)

Definition at line 1788 of file ieee802_1x.c.

void ieee802_1x_notify_pre_auth ( struct eapol_state_machine sm,
int  pre_auth 
)

Definition at line 1798 of file ieee802_1x.c.

void ieee802_1x_receive ( struct hostapd_data hapd,
const u8 sa,
const u8 buf,
size_t  len 
)

ieee802_1x_receive - Process the EAPOL frames from the Supplicant : hostapd BSS data

See also:
: Source address (sender of the EAPOL frame) : EAPOL frame : Length of buf in octets

This function is called for each incoming EAPOL frame from the interface

Definition at line 668 of file ieee802_1x.c.

static RadiusRxResult ieee802_1x_receive_auth ( struct radius_msg msg,
struct radius_msg req,
const u8 shared_secret,
size_t  shared_secret_len,
void *  data 
) [static]

ieee802_1x_receive_auth - Process RADIUS frames from Authentication Server : RADIUS response message : RADIUS request message : RADIUS shared secret : Length of shared_secret in octets : Context data (struct hostapd_data *) Returns: Processing status

Definition at line 1185 of file ieee802_1x.c.

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

Definition at line 1410 of file ieee802_1x.c.

static int ieee802_1x_rekey_broadcast ( struct hostapd_data hapd  )  [static]

Definition at line 1373 of file ieee802_1x.c.

static struct eapol_state_machine* ieee802_1x_search_radius_identifier ( struct hostapd_data hapd,
u8  identifier 
) [static, read]

Definition at line 1165 of file ieee802_1x.c.

static int ieee802_1x_select_radius_identifier ( struct hostapd_data hapd,
struct sta_info sta,
void *  ctx 
) [static]

Definition at line 1148 of file ieee802_1x.c.

static void ieee802_1x_send ( struct hostapd_data hapd,
struct sta_info sta,
u8  type,
const u8 data,
size_t  datalen 
) [static]

Definition at line 42 of file ieee802_1x.c.

static void ieee802_1x_set_port_authorized ( void *  ctx,
void *  sta_ctx,
int  authorized 
) [static]

Definition at line 1562 of file ieee802_1x.c.

void ieee802_1x_set_sta_authorized ( struct hostapd_data hapd,
struct sta_info sta,
int  authorized 
)

Definition at line 79 of file ieee802_1x.c.

static int ieee802_1x_sta_entry_alive ( void *  ctx,
const u8 addr 
) [static]

Definition at line 1525 of file ieee802_1x.c.

static int ieee802_1x_sta_key_available ( struct hostapd_data hapd,
struct sta_info sta,
void *  ctx 
) [static]

Definition at line 1399 of file ieee802_1x.c.

static void ieee802_1x_store_radius_class ( struct hostapd_data hapd,
struct sta_info sta,
struct radius_msg msg 
) [static]

Definition at line 1052 of file ieee802_1x.c.

void ieee802_1x_tx_key ( struct hostapd_data hapd,
struct sta_info sta 
)

Definition at line 294 of file ieee802_1x.c.

static void ieee802_1x_tx_key_one ( struct hostapd_data hapd,
struct sta_info sta,
int  idx,
int  broadcast,
u8 key_data,
size_t  key_len 
) [static]

Definition at line 117 of file ieee802_1x.c.

int ieee802_1x_tx_status ( struct hostapd_data hapd,
struct sta_info sta,
const u8 buf,
size_t  len,
int  ack 
)

Definition at line 1686 of file ieee802_1x.c.

static void ieee802_1x_update_sta_identity ( struct hostapd_data hapd,
struct sta_info sta,
struct radius_msg msg 
) [static]

Definition at line 1108 of file ieee802_1x.c.

const char* radius_mode_txt ( struct hostapd_data hapd  ) 

Definition at line 359 of file ieee802_1x.c.

int radius_sta_rate ( struct hostapd_data hapd,
struct sta_info sta 
)

Definition at line 373 of file ieee802_1x.c.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines


wpa_supplicant
Author(s): Package maintained by Blaise Gassend
autogenerated on Fri Jan 11 10:04:44 2013