wpa.c File Reference

hostapd - IEEE 802.11i-2004 / WPA Authenticator More...

#include "includes.h"
#include "hostapd.h"
#include "eapol_sm.h"
#include "wpa.h"
#include "wme.h"
#include "sha1.h"
#include "md5.h"
#include "rc4.h"
#include "aes_wrap.h"
#include "crypto.h"
#include "eloop.h"
#include "ieee802_11.h"
#include "pmksa_cache.h"
#include "state_machine.h"

Include dependency graph for wpa.c:

Go to the source code of this file.

Defines

#define STATE_MACHINE_DATA   struct wpa_state_machine
#define STATE_MACHINE_DEBUG_PREFIX   "WPA"
#define STATE_MACHINE_ADDR   sm->addr
#define RSN_NUM_REPLAY_COUNTERS_1   0
#define RSN_NUM_REPLAY_COUNTERS_2   1
#define RSN_NUM_REPLAY_COUNTERS_4   2
#define RSN_NUM_REPLAY_COUNTERS_16   3
#define GENERIC_INFO_ELEM   0xdd
#define RSN_INFO_ELEM   0x30
#define RSN_SUITE   "%02x-%02x-%02x-%d"
#define RSN_SUITE_ARG(s)   (s)[0], (s)[1], (s)[2], (s)[3]

Functions

wpa_authenticator * wpa_init (const u8 *addr, struct wpa_auth_config *conf, struct wpa_auth_callbacks *cb)
 Initialize WPA authenticator.
void wpa_deinit (struct wpa_authenticator *wpa_auth)
 Deinitialize WPA authenticator.
int wpa_reconfig (struct wpa_authenticator *wpa_auth, struct wpa_auth_config *conf)
 Update WPA authenticator configuration.
int wpa_validate_wpa_ie (struct wpa_authenticator *wpa_auth, struct wpa_state_machine *sm, const u8 *wpa_ie, size_t wpa_ie_len)
wpa_state_machine * wpa_auth_sta_init (struct wpa_authenticator *wpa_auth, const u8 *addr)
void wpa_auth_sta_associated (struct wpa_authenticator *wpa_auth, struct wpa_state_machine *sm)
void wpa_auth_sta_deinit (struct wpa_state_machine *sm)
void wpa_receive (struct wpa_authenticator *wpa_auth, struct wpa_state_machine *sm, u8 *data, size_t data_len)
void wpa_remove_ptk (struct wpa_state_machine *sm)
void wpa_auth_sm_event (struct wpa_state_machine *sm, wpa_event event)
 SM_STATE (WPA_PTK, INITIALIZE)
 SM_STATE (WPA_PTK, DISCONNECT)
 SM_STATE (WPA_PTK, AUTHENTICATION)
 SM_STATE (WPA_PTK, INITPMK)
 SM_STATE (WPA_PTK, INITPSK)
 SM_STATE (WPA_PTK, PTKSTART)
 SM_STATE (WPA_PTK, PTKCALCNEGOTIATING)
 SM_STATE (WPA_PTK, PTKINITNEGOTIATING)
 SM_STATE (WPA_PTK, PTKINITDONE)
 SM_STEP (WPA_PTK)
 SM_STATE (WPA_PTK_GROUP, IDLE)
 SM_STATE (WPA_PTK_GROUP, REKEYNEGOTIATING)
 SM_STATE (WPA_PTK_GROUP, REKEYESTABLISHED)
 SM_STATE (WPA_PTK_GROUP, KEYERROR)
void wpa_auth_sm_notify (struct wpa_state_machine *sm)
void wpa_gtk_rekey (struct wpa_authenticator *wpa_auth)
int wpa_get_mib (struct wpa_authenticator *wpa_auth, char *buf, size_t buflen)
int wpa_get_mib_sta (struct wpa_state_machine *sm, char *buf, size_t buflen)
void wpa_auth_countermeasures_start (struct wpa_authenticator *wpa_auth)
int wpa_auth_pairwise_set (struct wpa_state_machine *sm)
int wpa_auth_sta_key_mgmt (struct wpa_state_machine *sm)
int wpa_auth_sta_wpa_version (struct wpa_state_machine *sm)
int wpa_auth_sta_clear_pmksa (struct wpa_state_machine *sm, struct rsn_pmksa_cache_entry *entry)
rsn_pmksa_cache_entrywpa_auth_sta_get_pmksa (struct wpa_state_machine *sm)
void wpa_auth_sta_local_mic_failure_report (struct wpa_state_machine *sm)
const u8 * wpa_auth_get_wpa_ie (struct wpa_authenticator *wpa_auth, size_t *len)
int wpa_auth_pmksa_add (struct wpa_state_machine *sm, const u8 *pmk, int session_timeout, struct eapol_state_machine *eapol)
int wpa_auth_pmksa_add_preauth (struct wpa_authenticator *wpa_auth, const u8 *pmk, size_t len, const u8 *sta_addr, int session_timeout, struct eapol_state_machine *eapol)
int wpa_auth_sta_set_vlan (struct wpa_state_machine *sm, int vlan_id)

Variables

wpa_ie_hdr STRUCT_PACKED


Detailed Description

hostapd - IEEE 802.11i-2004 / WPA Authenticator

Copyright
Copyright (c) 2004-2006, Jouni Malinen <[email protected]>
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

Alternatively, this software may be distributed under the terms of BSD license.

See README and COPYING for more details.

Definition in file wpa.c.


Function Documentation

void wpa_deinit struct wpa_authenticator *  wpa_auth  ) 
 

Deinitialize WPA authenticator.

Parameters:
wpa_auth Pointer to WPA authenticator data from wpa_init()

Definition at line 908 of file wpa.c.

Here is the call graph for this function:

struct wpa_authenticator* wpa_init const u8 *  addr,
struct wpa_auth_config *  conf,
struct wpa_auth_callbacks *  cb
 

Initialize WPA authenticator.

Parameters:
addr Authenticator address
conf Configuration for WPA authenticator
Returns:
Pointer to WPA authenticator data or NULL on failure

Definition at line 855 of file wpa.c.

Here is the call graph for this function:

int wpa_reconfig struct wpa_authenticator *  wpa_auth,
struct wpa_auth_config *  conf
 

Update WPA authenticator configuration.

Parameters:
wpa_auth Pointer to WPA authenticator data from wpa_init()
conf Configuration for WPA authenticator

Definition at line 939 of file wpa.c.


Generated on Sun Dec 31 13:46:21 2006 for hostapd by  doxygen 1.4.2