wpa.h File Reference

#include "common/defs.h"
#include "common/eapol_common.h"
#include "common/wpa_common.h"
Include dependency graph for wpa.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  rsn_supp_config
struct  wpa_sm_ctx

Enumerations

enum  wpa_sm_conf_params {
  RSNA_PMK_LIFETIME, RSNA_PMK_REAUTH_THRESHOLD, RSNA_SA_TIMEOUT, WPA_PARAM_PROTO,
  WPA_PARAM_PAIRWISE, WPA_PARAM_GROUP, WPA_PARAM_KEY_MGMT, WPA_PARAM_MGMT_GROUP,
  WPA_PARAM_RSN_ENABLED, WPA_PARAM_MFP
}

Functions

static int wpa_ft_is_completed (struct wpa_sm *sm)
static int wpa_ft_prepare_auth_request (struct wpa_sm *sm, const u8 *mdie)
static int wpa_ft_process_response (struct wpa_sm *sm, const u8 *ies, size_t ies_len, int ft_action, const u8 *target_ap)
static int wpa_ft_validate_reassoc_resp (struct wpa_sm *sm, const u8 *ies, size_t ies_len, const u8 *src_addr)
int wpa_parse_wpa_ie (const u8 *wpa_ie, size_t wpa_ie_len, struct wpa_ie_data *data)
void wpa_sm_aborted_cached (struct wpa_sm *sm)
void wpa_sm_deinit (struct wpa_sm *sm)
void wpa_sm_drop_sa (struct wpa_sm *sm)
int wpa_sm_get_mib (struct wpa_sm *sm, char *buf, size_t buflen)
unsigned int wpa_sm_get_param (struct wpa_sm *sm, enum wpa_sm_conf_params param)
int wpa_sm_get_status (struct wpa_sm *sm, char *buf, size_t buflen, int verbose)
int wpa_sm_has_ptk (struct wpa_sm *sm)
struct wpa_smwpa_sm_init (struct wpa_sm_ctx *ctx)
void wpa_sm_key_request (struct wpa_sm *sm, int error, int pairwise)
void wpa_sm_notify_assoc (struct wpa_sm *sm, const u8 *bssid)
void wpa_sm_notify_disassoc (struct wpa_sm *sm)
int wpa_sm_parse_own_wpa_ie (struct wpa_sm *sm, struct wpa_ie_data *data)
int wpa_sm_pmksa_cache_list (struct wpa_sm *sm, char *buf, size_t len)
int wpa_sm_rx_eapol (struct wpa_sm *sm, const u8 *src_addr, const u8 *buf, size_t len)
int wpa_sm_set_ap_rsn_ie (struct wpa_sm *sm, const u8 *ie, size_t len)
int wpa_sm_set_ap_wpa_ie (struct wpa_sm *sm, const u8 *ie, size_t len)
int wpa_sm_set_assoc_wpa_ie (struct wpa_sm *sm, const u8 *ie, size_t len)
int wpa_sm_set_assoc_wpa_ie_default (struct wpa_sm *sm, u8 *wpa_ie, size_t *wpa_ie_len)
void wpa_sm_set_config (struct wpa_sm *sm, struct rsn_supp_config *config)
void wpa_sm_set_eapol (struct wpa_sm *sm, struct eapol_sm *eapol)
void wpa_sm_set_fast_reauth (struct wpa_sm *sm, int fast_reauth)
static int wpa_sm_set_ft_params (struct wpa_sm *sm, const u8 *ies, size_t ies_len)
void wpa_sm_set_ifname (struct wpa_sm *sm, const char *ifname, const char *bridge_ifname)
void wpa_sm_set_own_addr (struct wpa_sm *sm, const u8 *addr)
int wpa_sm_set_param (struct wpa_sm *sm, enum wpa_sm_conf_params param, unsigned int value)
void wpa_sm_set_pmk (struct wpa_sm *sm, const u8 *pmk, size_t pmk_len)
void wpa_sm_set_pmk_from_pmksa (struct wpa_sm *sm)
void wpa_sm_set_scard_ctx (struct wpa_sm *sm, void *scard_ctx)
static int wpa_sm_stkstart (struct wpa_sm *sm, const u8 *peer)

Enumeration Type Documentation

Enumerator:
RSNA_PMK_LIFETIME 
RSNA_PMK_REAUTH_THRESHOLD 
RSNA_SA_TIMEOUT 
WPA_PARAM_PROTO 
WPA_PARAM_PAIRWISE 
WPA_PARAM_GROUP 
WPA_PARAM_KEY_MGMT 
WPA_PARAM_MGMT_GROUP 
WPA_PARAM_RSN_ENABLED 
WPA_PARAM_MFP 

Definition at line 61 of file wpa.h.


Function Documentation

static int wpa_ft_is_completed ( struct wpa_sm sm  )  [inline, static]

Definition at line 319 of file wpa.h.

static int wpa_ft_prepare_auth_request ( struct wpa_sm sm,
const u8 mdie 
) [inline, static]

Definition at line 306 of file wpa.h.

static int wpa_ft_process_response ( struct wpa_sm sm,
const u8 ies,
size_t  ies_len,
int  ft_action,
const u8 target_ap 
) [inline, static]

Definition at line 313 of file wpa.h.

static int wpa_ft_validate_reassoc_resp ( struct wpa_sm sm,
const u8 ies,
size_t  ies_len,
const u8 src_addr 
) [inline, static]

Definition at line 325 of file wpa.h.

int wpa_parse_wpa_ie ( const u8 wpa_ie,
size_t  wpa_ie_len,
struct wpa_ie_data data 
)

wpa_parse_wpa_ie - Parse WPA/RSN IE : Pointer to WPA or RSN IE : Length of the WPA/RSN IE : Pointer to data area for parsing results Returns: 0 on success, -1 on failure

Parse the contents of WPA or RSN IE and write the parsed data into data.

Definition at line 172 of file wpa_ie.c.

void wpa_sm_aborted_cached ( struct wpa_sm sm  ) 

wpa_sm_aborted_cached - Notify WPA that PMKSA caching was aborted : Pointer to WPA state machine data from wpa_sm_init()

Definition at line 1472 of file wpa.c.

void wpa_sm_deinit ( struct wpa_sm sm  ) 

wpa_sm_deinit - Deinitialize WPA state machine : Pointer to WPA state machine data from wpa_sm_init()

Definition at line 1991 of file wpa.c.

void wpa_sm_drop_sa ( struct wpa_sm sm  ) 

Definition at line 2542 of file wpa.c.

int wpa_sm_get_mib ( struct wpa_sm sm,
char *  buf,
size_t  buflen 
)
unsigned int wpa_sm_get_param ( struct wpa_sm sm,
enum wpa_sm_conf_params  param 
)

wpa_sm_get_param - Get WPA state machine parameters : Pointer to WPA state machine data from wpa_sm_init()

Parameters:
 Parameter field Returns: Parameter value

Definition at line 2302 of file wpa.c.

int wpa_sm_get_status ( struct wpa_sm sm,
char *  buf,
size_t  buflen,
int  verbose 
)

wpa_sm_get_status - Get WPA state machine : Pointer to WPA state machine data from wpa_sm_init() : Buffer for status information : Maximum buffer length : Whether to include verbose status information Returns: Number of bytes written to buf.

Query WPA state machine for status information. This function fills in a text area with current status information. If the buffer (buf) is not large enough, status information will be truncated to fit the buffer.

Definition at line 2346 of file wpa.c.

int wpa_sm_has_ptk ( struct wpa_sm sm  ) 

Definition at line 2553 of file wpa.c.

struct wpa_sm* wpa_sm_init ( struct wpa_sm_ctx ctx  )  [read]

wpa_sm_init - Initialize WPA state machine : Context pointer for callbacks; this needs to be an allocated buffer Returns: Pointer to the allocated WPA state machine data

This function is used to allocate a new WPA state machine and the returned value is passed to all WPA state machine calls.

Definition at line 1960 of file wpa.c.

void wpa_sm_key_request ( struct wpa_sm sm,
int  error,
int  pairwise 
)

wpa_sm_key_request - Send EAPOL-Key Request : Pointer to WPA state machine data from wpa_sm_init() : Indicate whether this is an Michael MIC error report : 1 = error report for pairwise packet, 0 = for group packet

Send an EAPOL-Key Request to the current authenticator. This function is used to request rekeying and it is usually called when a local Michael MIC failure is detected.

Definition at line 85 of file wpa.c.

void wpa_sm_notify_assoc ( struct wpa_sm sm,
const u8 bssid 
)

wpa_sm_notify_assoc - Notify WPA state machine about association : Pointer to WPA state machine data from wpa_sm_init() : The BSSID of the new association

This function is called to let WPA state machine know that the connection was established.

Definition at line 2018 of file wpa.c.

void wpa_sm_notify_disassoc ( struct wpa_sm sm  ) 

wpa_sm_notify_disassoc - Notify WPA state machine about disassociation : Pointer to WPA state machine data from wpa_sm_init()

This function is called to let WPA state machine know that the connection was lost. This will abort any existing pre-authentication session.

Definition at line 2068 of file wpa.c.

int wpa_sm_parse_own_wpa_ie ( struct wpa_sm sm,
struct wpa_ie_data data 
)

wpa_sm_parse_own_wpa_ie - Parse own WPA/RSN IE : Pointer to WPA state machine data from wpa_sm_init() : Pointer to data area for parsing results Returns: 0 on success, -1 if IE is not known, or -2 on parsing failure

Parse the contents of the own WPA or RSN IE from (Re)AssocReq and write the parsed data into data.

Definition at line 2519 of file wpa.c.

int wpa_sm_pmksa_cache_list ( struct wpa_sm sm,
char *  buf,
size_t  len 
)

Definition at line 2532 of file wpa.c.

int wpa_sm_rx_eapol ( struct wpa_sm sm,
const u8 src_addr,
const u8 buf,
size_t  len 
)

wpa_sm_rx_eapol - Process received WPA EAPOL frames : Pointer to WPA state machine data from wpa_sm_init() : Source MAC address of the EAPOL packet : Pointer to the beginning of the EAPOL data (EAPOL header) : Length of the EAPOL frame Returns: 1 = WPA EAPOL-Key processed, 0 = not a WPA EAPOL-Key, -1 failure

This function is called for each received EAPOL frame. Other than EAPOL-Key frames can be skipped if filtering is done elsewhere. wpa_sm_rx_eapol() is only processing WPA and WPA2 EAPOL-Key frames.

The received EAPOL-Key packets are validated and valid packets are replied to. In addition, key material (PTK, GTK) is configured at the end of a successful key handshake.

Definition at line 1531 of file wpa.c.

int wpa_sm_set_ap_rsn_ie ( struct wpa_sm sm,
const u8 ie,
size_t  len 
)

wpa_sm_set_ap_rsn_ie - Set AP RSN IE from Beacon/ProbeResp : Pointer to WPA state machine data from wpa_sm_init() : Pointer to IE data (starting from id) : IE length Returns: 0 on success, -1 on failure

Inform WPA state machine about the RSN IE used in Beacon / Probe Response frame.

Definition at line 2486 of file wpa.c.

int wpa_sm_set_ap_wpa_ie ( struct wpa_sm sm,
const u8 ie,
size_t  len 
)

wpa_sm_set_ap_wpa_ie - Set AP WPA IE from Beacon/ProbeResp : Pointer to WPA state machine data from wpa_sm_init() : Pointer to IE data (starting from id) : IE length Returns: 0 on success, -1 on failure

Inform WPA state machine about the WPA IE used in Beacon / Probe Response frame.

Definition at line 2452 of file wpa.c.

int wpa_sm_set_assoc_wpa_ie ( struct wpa_sm sm,
const u8 ie,
size_t  len 
)

wpa_sm_set_assoc_wpa_ie - Set own WPA/RSN IE from (Re)AssocReq : Pointer to WPA state machine data from wpa_sm_init() : Pointer to IE data (starting from id) : IE length Returns: 0 on success, -1 on failure

Inform WPA state machine about the WPA/RSN IE used in (Re)Association Request frame. The IE will be used to override the default value generated with wpa_sm_set_assoc_wpa_ie_default().

Definition at line 2418 of file wpa.c.

int wpa_sm_set_assoc_wpa_ie_default ( struct wpa_sm sm,
u8 wpa_ie,
size_t *  wpa_ie_len 
)

wpa_sm_set_assoc_wpa_ie_default - Generate own WPA/RSN IE from configuration : Pointer to WPA state machine data from wpa_sm_init() : Pointer to buffer for WPA/RSN IE : Pointer to the length of the wpa_ie buffer Returns: 0 on success, -1 on failure

Definition at line 2373 of file wpa.c.

void wpa_sm_set_config ( struct wpa_sm sm,
struct rsn_supp_config config 
)

wpa_sm_set_config - Notification of current configration change : Pointer to WPA state machine data from wpa_sm_init() : Pointer to current network configuration

Notify WPA state machine that configuration has changed. config will be stored as a backpointer to network configuration. This can be NULL to clear the stored pointed.

Definition at line 2158 of file wpa.c.

void wpa_sm_set_eapol ( struct wpa_sm sm,
struct eapol_sm eapol 
)

wpa_sm_set_eapol - Set EAPOL state machine pointer : Pointer to WPA state machine data from wpa_sm_init() : Pointer to EAPOL state machine allocated with eapol_sm_init()

Definition at line 2224 of file wpa.c.

void wpa_sm_set_fast_reauth ( struct wpa_sm sm,
int  fast_reauth 
)

wpa_sm_set_fast_reauth - Set fast reauthentication (EAP) enabled/disabled : Pointer to WPA state machine data from wpa_sm_init() : Whether fast reauthentication (EAP) is allowed

Definition at line 2127 of file wpa.c.

static int wpa_sm_set_ft_params ( struct wpa_sm sm,
const u8 ies,
size_t  ies_len 
) [inline, static]

Definition at line 301 of file wpa.h.

void wpa_sm_set_ifname ( struct wpa_sm sm,
const char *  ifname,
const char *  bridge_ifname 
)

wpa_sm_set_ifname - Set network interface name : Pointer to WPA state machine data from wpa_sm_init() : Interface name : Optional bridge interface name (for pre-auth)

Definition at line 2209 of file wpa.c.

void wpa_sm_set_own_addr ( struct wpa_sm sm,
const u8 addr 
)

wpa_sm_set_own_addr - Set own MAC address : Pointer to WPA state machine data from wpa_sm_init() : Own MAC address

Definition at line 2196 of file wpa.c.

int wpa_sm_set_param ( struct wpa_sm sm,
enum wpa_sm_conf_params  param,
unsigned int  value 
)

wpa_sm_set_param - Set WPA state machine parameters : Pointer to WPA state machine data from wpa_sm_init()

Parameters:
 Parameter field : Parameter value Returns: 0 on success, -1 on failure

Definition at line 2238 of file wpa.c.

void wpa_sm_set_pmk ( struct wpa_sm sm,
const u8 pmk,
size_t  pmk_len 
)

wpa_sm_set_pmk - Set PMK : Pointer to WPA state machine data from wpa_sm_init() : The new PMK : The length of the new PMK in bytes

Configure the PMK for WPA state machine.

Definition at line 2084 of file wpa.c.

void wpa_sm_set_pmk_from_pmksa ( struct wpa_sm sm  ) 

wpa_sm_set_pmk_from_pmksa - Set PMK based on the current PMKSA : Pointer to WPA state machine data from wpa_sm_init()

Take the PMK from the current PMKSA into use. If no PMKSA is active, the PMK will be cleared.

Definition at line 2107 of file wpa.c.

void wpa_sm_set_scard_ctx ( struct wpa_sm sm,
void *  scard_ctx 
)

wpa_sm_set_scard_ctx - Set context pointer for smartcard callbacks : Pointer to WPA state machine data from wpa_sm_init() : Context pointer for smartcard related callback functions

Definition at line 2139 of file wpa.c.

static int wpa_sm_stkstart ( struct wpa_sm sm,
const u8 peer 
) [inline, static]

Definition at line 279 of file wpa.h.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines


wpa_supplicant_node
Author(s): Package maintained by Blaise Gassend
autogenerated on Fri Jan 11 10:02:39 2013