wpa.h File Reference

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

#include "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.

Defines

#define WPA_PMK_LEN   PMK_LEN
#define WPA_GMK_LEN   32
#define WPA_GTK_MAX_LEN   32
#define PMKID_LEN   16
#define WPA_CAPABILITY_PREAUTH   BIT(0)
#define WPA_CAPABILITY_MGMT_FRAME_PROTECTION   BIT(6)
#define WPA_CAPABILITY_PEERKEY_ENABLED   BIT(9)
#define WPA_KEY_INFO_TYPE_MASK   (BIT(0) | BIT(1) | BIT(2))
#define WPA_KEY_INFO_TYPE_HMAC_MD5_RC4   BIT(0)
#define WPA_KEY_INFO_TYPE_HMAC_SHA1_AES   BIT(1)
#define WPA_KEY_INFO_KEY_TYPE   BIT(3)
#define WPA_KEY_INFO_KEY_INDEX_MASK   (BIT(4) | BIT(5))
#define WPA_KEY_INFO_KEY_INDEX_SHIFT   4
#define WPA_KEY_INFO_INSTALL   BIT(6)
#define WPA_KEY_INFO_TXRX   BIT(6)
#define WPA_KEY_INFO_ACK   BIT(7)
#define WPA_KEY_INFO_MIC   BIT(8)
#define WPA_KEY_INFO_SECURE   BIT(9)
#define WPA_KEY_INFO_ERROR   BIT(10)
#define WPA_KEY_INFO_REQUEST   BIT(11)
#define WPA_KEY_INFO_ENCR_KEY_DATA   BIT(12)
#define WPA_KEY_INFO_SMK_MESSAGE   BIT(13)

Enumerations

enum  logger_level { LOGGER_DEBUG, LOGGER_INFO, LOGGER_WARNING }
enum  wpa_eapol_variable {
  WPA_EAPOL_portEnabled, WPA_EAPOL_portValid, WPA_EAPOL_authorized, WPA_EAPOL_portControl_Auto,
  WPA_EAPOL_keyRun, WPA_EAPOL_keyAvailable, WPA_EAPOL_keyDone, WPA_EAPOL_inc_EapolFramesTx
}
enum  {
  WPA_IE_OK, WPA_INVALID_IE, WPA_INVALID_GROUP, WPA_INVALID_PAIRWISE,
  WPA_INVALID_AKMP, WPA_NOT_ENABLED, WPA_ALLOC_FAIL, WPA_MGMT_FRAME_PROTECTION_VIOLATION,
  WPA_INVALID_MGMT_GROUP_CIPHER
}
enum  wpa_event {
  WPA_AUTH, WPA_ASSOC, WPA_DISASSOC, WPA_DEAUTH,
  WPA_REAUTH, WPA_REAUTH_EAPOL
}

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)
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_eapol_key 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.h.


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:23 2006 for hostapd by  doxygen 1.4.2