Classes | Defines | Enumerations | Functions
driver.h File Reference
#include "common/defs.h"
Include dependency graph for driver.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  wpa_event_data::assoc_info
struct  wpa_event_data::assoc_reject
struct  wpa_event_data::auth_info
struct  wpa_event_data::deauth_info
struct  wpa_event_data::disassoc_info
struct  wpa_event_data::eapol_rx
struct  wpa_event_data::ft_ies
struct  wpa_event_data::ft_rrb_rx
struct  hostap_sta_driver_data
struct  hostapd_channel_data
struct  hostapd_freq_params
struct  hostapd_hw_modes
struct  hostapd_sta_add_params
struct  wpa_event_data::ibss_rsn_start
struct  wpa_event_data::interface_status
struct  wpa_event_data::michael_mic_failure
struct  wpa_event_data::mlme_rx
struct  wpa_event_data::new_sta
struct  wpa_event_data::pmkid_candidate
struct  wpa_event_data::remain_on_channel
struct  wpa_event_data::rx_action
struct  wpa_event_data::rx_from_unknown
struct  wpa_event_data::rx_mgmt
struct  wpa_event_data::rx_probe_req
struct  wpa_event_data::scan_info
struct  wpa_event_data::signal_change
struct  wpa_event_data::stkstart
struct  wpa_event_data::timeout_event
struct  wpa_event_data::tx_status
struct  wpa_bss_params
struct  wpa_driver_associate_params
struct  wpa_driver_auth_params
struct  wpa_driver_capa
struct  wpa_driver_ops
struct  wpa_driver_scan_params::wpa_driver_scan_filter
struct  wpa_driver_scan_params
struct  wpa_driver_scan_params::wpa_driver_scan_ssid
union  wpa_event_data
struct  wpa_init_params
struct  wpa_interface_info
struct  wpa_scan_res
struct  wpa_scan_results

Defines

#define HOSTAPD_CHAN_DISABLED   0x00000001
#define HOSTAPD_CHAN_NO_IBSS   0x00000004
#define HOSTAPD_CHAN_PASSIVE_SCAN   0x00000002
#define HOSTAPD_CHAN_RADAR   0x00000008
#define IEEE80211_CAP_ESS   0x0001
#define IEEE80211_CAP_IBSS   0x0002
#define IEEE80211_CAP_PRIVACY   0x0010
#define IEEE80211_MODE_AP   2
#define IEEE80211_MODE_IBSS   1
#define IEEE80211_MODE_INFRA   0
#define WPA_DRIVER_AUTH_LEAP   0x00000004
#define WPA_DRIVER_AUTH_OPEN   0x00000001
#define WPA_DRIVER_AUTH_SHARED   0x00000002
#define WPA_DRIVER_CAPA_ENC_CCMP   0x00000008
#define WPA_DRIVER_CAPA_ENC_TKIP   0x00000004
#define WPA_DRIVER_CAPA_ENC_WEP104   0x00000002
#define WPA_DRIVER_CAPA_ENC_WEP40   0x00000001
#define WPA_DRIVER_CAPA_KEY_MGMT_FT   0x00000020
#define WPA_DRIVER_CAPA_KEY_MGMT_FT_PSK   0x00000040
#define WPA_DRIVER_CAPA_KEY_MGMT_WPA   0x00000001
#define WPA_DRIVER_CAPA_KEY_MGMT_WPA2   0x00000002
#define WPA_DRIVER_CAPA_KEY_MGMT_WPA2_PSK   0x00000008
#define WPA_DRIVER_CAPA_KEY_MGMT_WPA_NONE   0x00000010
#define WPA_DRIVER_CAPA_KEY_MGMT_WPA_PSK   0x00000004
#define WPA_DRIVER_FLAGS_4WAY_HANDSHAKE   0x00000008
#define WPA_DRIVER_FLAGS_AP   0x00000040
#define WPA_DRIVER_FLAGS_DRIVER_IE   0x00000001
#define WPA_DRIVER_FLAGS_SET_KEYS_AFTER_ASSOC   0x00000002
#define WPA_DRIVER_FLAGS_SET_KEYS_AFTER_ASSOC_DONE   0x00000080
#define WPA_DRIVER_FLAGS_SME   0x00000020
#define WPA_DRIVER_FLAGS_USER_SPACE_MLME   0x00000004
#define WPA_DRIVER_FLAGS_WIRED   0x00000010
#define WPA_SCAN_ASSOCIATED   BIT(5)
#define WPA_SCAN_AUTHENTICATED   BIT(4)
#define WPA_SCAN_LEVEL_DBM   BIT(3)
#define WPA_SCAN_LEVEL_INVALID   BIT(2)
#define WPA_SCAN_NOISE_INVALID   BIT(1)
#define WPA_SCAN_QUAL_INVALID   BIT(0)
#define WPA_STA_AUTHORIZED   BIT(0)
#define WPA_STA_MFP   BIT(3)
#define WPA_STA_SHORT_PREAMBLE   BIT(2)
#define WPA_STA_WMM   BIT(1)
#define WPA_SUPPLICANT_DRIVER_VERSION   4
#define WPAS_MAX_SCAN_SSIDS   4

Enumerations

enum  wpa_driver_if_type { WPA_IF_STATION, WPA_IF_AP_VLAN, WPA_IF_AP_BSS }
enum  wpa_event_type {
  EVENT_ASSOC, EVENT_DISASSOC, EVENT_MICHAEL_MIC_FAILURE, EVENT_SCAN_RESULTS,
  EVENT_ASSOCINFO, EVENT_INTERFACE_STATUS, EVENT_PMKID_CANDIDATE, EVENT_STKSTART,
  EVENT_FT_RESPONSE, EVENT_IBSS_RSN_START, EVENT_AUTH, EVENT_DEAUTH,
  EVENT_ASSOC_REJECT, EVENT_AUTH_TIMED_OUT, EVENT_ASSOC_TIMED_OUT, EVENT_FT_RRB_RX,
  EVENT_WPS_BUTTON_PUSHED, EVENT_TX_STATUS, EVENT_RX_FROM_UNKNOWN, EVENT_RX_MGMT,
  EVENT_RX_ACTION, EVENT_REMAIN_ON_CHANNEL, EVENT_CANCEL_REMAIN_ON_CHANNEL, EVENT_MLME_RX,
  EVENT_RX_PROBE_REQ, EVENT_NEW_STA, EVENT_EAPOL_RX, EVENT_SIGNAL_CHANGE
}

Functions

static void drv_event_assoc (void *ctx, const u8 *addr, const u8 *ie, size_t ielen)
static void drv_event_disassoc (void *ctx, const u8 *addr)
static void drv_event_eapol_rx (void *ctx, const u8 *src, const u8 *data, size_t data_len)
void wpa_supplicant_event (void *ctx, enum wpa_event_type event, union wpa_event_data *data)

Define Documentation

#define HOSTAPD_CHAN_DISABLED   0x00000001

Definition at line 30 of file driver.h.

#define HOSTAPD_CHAN_NO_IBSS   0x00000004

Definition at line 32 of file driver.h.

#define HOSTAPD_CHAN_PASSIVE_SCAN   0x00000002

Definition at line 31 of file driver.h.

#define HOSTAPD_CHAN_RADAR   0x00000008

Definition at line 33 of file driver.h.

#define IEEE80211_CAP_ESS   0x0001

Definition at line 110 of file driver.h.

#define IEEE80211_CAP_IBSS   0x0002

Definition at line 111 of file driver.h.

#define IEEE80211_CAP_PRIVACY   0x0010

Definition at line 112 of file driver.h.

#define IEEE80211_MODE_AP   2

Definition at line 108 of file driver.h.

#define IEEE80211_MODE_IBSS   1

Definition at line 107 of file driver.h.

#define IEEE80211_MODE_INFRA   0

Definition at line 106 of file driver.h.

#define WPA_DRIVER_AUTH_LEAP   0x00000004

Definition at line 486 of file driver.h.

#define WPA_DRIVER_AUTH_OPEN   0x00000001

Definition at line 484 of file driver.h.

#define WPA_DRIVER_AUTH_SHARED   0x00000002

Definition at line 485 of file driver.h.

#define WPA_DRIVER_CAPA_ENC_CCMP   0x00000008

Definition at line 481 of file driver.h.

#define WPA_DRIVER_CAPA_ENC_TKIP   0x00000004

Definition at line 480 of file driver.h.

#define WPA_DRIVER_CAPA_ENC_WEP104   0x00000002

Definition at line 479 of file driver.h.

#define WPA_DRIVER_CAPA_ENC_WEP40   0x00000001

Definition at line 478 of file driver.h.

#define WPA_DRIVER_CAPA_KEY_MGMT_FT   0x00000020

Definition at line 474 of file driver.h.

#define WPA_DRIVER_CAPA_KEY_MGMT_FT_PSK   0x00000040

Definition at line 475 of file driver.h.

#define WPA_DRIVER_CAPA_KEY_MGMT_WPA   0x00000001

Definition at line 469 of file driver.h.

#define WPA_DRIVER_CAPA_KEY_MGMT_WPA2   0x00000002

Definition at line 470 of file driver.h.

#define WPA_DRIVER_CAPA_KEY_MGMT_WPA2_PSK   0x00000008

Definition at line 472 of file driver.h.

#define WPA_DRIVER_CAPA_KEY_MGMT_WPA_NONE   0x00000010

Definition at line 473 of file driver.h.

#define WPA_DRIVER_CAPA_KEY_MGMT_WPA_PSK   0x00000004

Definition at line 471 of file driver.h.

#define WPA_DRIVER_FLAGS_4WAY_HANDSHAKE   0x00000008

Definition at line 496 of file driver.h.

#define WPA_DRIVER_FLAGS_AP   0x00000040

Definition at line 502 of file driver.h.

#define WPA_DRIVER_FLAGS_DRIVER_IE   0x00000001

Definition at line 490 of file driver.h.

#define WPA_DRIVER_FLAGS_SET_KEYS_AFTER_ASSOC   0x00000002

Definition at line 492 of file driver.h.

Definition at line 504 of file driver.h.

#define WPA_DRIVER_FLAGS_SME   0x00000020

Definition at line 500 of file driver.h.

#define WPA_DRIVER_FLAGS_USER_SPACE_MLME   0x00000004

Definition at line 493 of file driver.h.

#define WPA_DRIVER_FLAGS_WIRED   0x00000010

Definition at line 497 of file driver.h.

#define WPA_SCAN_ASSOCIATED   BIT(5)

Definition at line 119 of file driver.h.

#define WPA_SCAN_AUTHENTICATED   BIT(4)

Definition at line 118 of file driver.h.

#define WPA_SCAN_LEVEL_DBM   BIT(3)

Definition at line 117 of file driver.h.

#define WPA_SCAN_LEVEL_INVALID   BIT(2)

Definition at line 116 of file driver.h.

#define WPA_SCAN_NOISE_INVALID   BIT(1)

Definition at line 115 of file driver.h.

#define WPA_SCAN_QUAL_INVALID   BIT(0)

Definition at line 114 of file driver.h.

#define WPA_STA_AUTHORIZED   BIT(0)

Definition at line 600 of file driver.h.

#define WPA_STA_MFP   BIT(3)

Definition at line 603 of file driver.h.

#define WPA_STA_SHORT_PREAMBLE   BIT(2)

Definition at line 602 of file driver.h.

#define WPA_STA_WMM   BIT(1)

Definition at line 601 of file driver.h.

Definition at line 26 of file driver.h.

#define WPAS_MAX_SCAN_SSIDS   4

Definition at line 195 of file driver.h.


Enumeration Type Documentation

Enumerator:
WPA_IF_STATION 

WPA_IF_STATION - Station mode interface

WPA_IF_AP_VLAN 

WPA_IF_AP_VLAN - AP mode VLAN interface

This interface shares its address and Beacon frame with the main BSS.

WPA_IF_AP_BSS 

WPA_IF_AP_BSS - AP mode BSS interface

This interface has its own address and Beacon frame.

Definition at line 550 of file driver.h.

enum wpa_event_type - Event type for wpa_supplicant_event() calls

Enumerator:
EVENT_ASSOC 

EVENT_ASSOC - Association completed

This event needs to be delivered when the driver completes IEEE 802.11 association or reassociation successfully. wpa_driver_ops::get_bssid() is expected to provide the current BSSID after this event has been generated. In addition, optional EVENT_ASSOCINFO may be generated just before EVENT_ASSOC to provide more information about the association. If the driver interface gets both of these events at the same time, it can also include the assoc_info data in EVENT_ASSOC call.

EVENT_DISASSOC 

EVENT_DISASSOC - Association lost

This event should be called when association is lost either due to receiving deauthenticate or disassociate frame from the AP or when sending either of these frames to the current AP. If the driver supports separate deauthentication event, EVENT_DISASSOC should only be used for disassociation and EVENT_DEAUTH for deauthentication. In AP mode, union wpa_event_data::disassoc_info is required.

EVENT_MICHAEL_MIC_FAILURE 

EVENT_MICHAEL_MIC_FAILURE - Michael MIC (TKIP) detected

This event must be delivered when a Michael MIC error is detected by the local driver. Additional data for event processing is provided with union wpa_event_data::michael_mic_failure. This information is used to request new encyption key and to initiate TKIP countermeasures if needed.

EVENT_SCAN_RESULTS 

EVENT_SCAN_RESULTS - Scan results available

This event must be called whenever scan results are available to be fetched with struct wpa_driver_ops::get_scan_results(). This event is expected to be used some time after struct wpa_driver_ops::scan() is called. If the driver provides an unsolicited event when the scan has been completed, this event can be used to trigger EVENT_SCAN_RESULTS call. If such event is not available from the driver, the driver wrapper code is expected to use a registered timeout to generate EVENT_SCAN_RESULTS call after the time that the scan is expected to be completed. Optional information about completed scan can be provided with union wpa_event_data::scan_info.

EVENT_ASSOCINFO 

EVENT_ASSOCINFO - Report optional extra information for association

This event can be used to report extra association information for EVENT_ASSOC processing. This extra information includes IEs from association frames and Beacon/Probe Response frames in union wpa_event_data::assoc_info. EVENT_ASSOCINFO must be send just before EVENT_ASSOC. Alternatively, the driver interface can include assoc_info data in the EVENT_ASSOC call if it has all the information available at the same point.

EVENT_INTERFACE_STATUS 

EVENT_INTERFACE_STATUS - Report interface status changes

This optional event can be used to report changes in interface status (interface added/removed) using union wpa_event_data::interface_status. This can be used to trigger wpa_supplicant to stop and re-start processing for the interface, e.g., when a cardbus card is ejected/inserted.

EVENT_PMKID_CANDIDATE 

EVENT_PMKID_CANDIDATE - Report a candidate AP for pre-authentication

This event can be used to inform wpa_supplicant about candidates for RSN (WPA2) pre-authentication. If wpa_supplicant is not responsible for scan request (ap_scan=2 mode), this event is required for pre-authentication. If wpa_supplicant is performing scan request (ap_scan=1), this event is optional since scan results can be used to add pre-authentication candidates. union wpa_event_data::pmkid_candidate is used to report the BSSID of the candidate and priority of the candidate, e.g., based on the signal strength, in order to try to pre-authenticate first with candidates that are most likely targets for re-association.

EVENT_PMKID_CANDIDATE can be called whenever the driver has updates on the candidate list. In addition, it can be called for the current AP and APs that have existing PMKSA cache entries. wpa_supplicant will automatically skip pre-authentication in cases where a valid PMKSA exists. When more than one candidate exists, this event should be generated once for each candidate.

Driver will be notified about successful pre-authentication with struct wpa_driver_ops::add_pmkid() calls.

EVENT_STKSTART 

EVENT_STKSTART - Request STK handshake (MLME-STKSTART.request)

This event can be used to inform wpa_supplicant about desire to set up secure direct link connection between two stations as defined in IEEE 802.11e with a new PeerKey mechanism that replaced the original STAKey negotiation. The caller will need to set peer address for the event.

EVENT_FT_RESPONSE 

EVENT_FT_RESPONSE - Report FT (IEEE 802.11r) response IEs

The driver is expected to report the received FT IEs from FT authentication sequence from the AP. The FT IEs are included in the extra information in union wpa_event_data::ft_ies.

EVENT_IBSS_RSN_START 

EVENT_IBSS_RSN_START - Request RSN authentication in IBSS

The driver can use this event to inform wpa_supplicant about a STA in an IBSS with which protected frames could be exchanged. This event starts RSN authentication with the other STA to authenticate the STA and set up encryption keys with it.

EVENT_AUTH 

EVENT_AUTH - Authentication result

This event should be called when authentication attempt has been completed. This is only used if the driver supports separate authentication step (struct wpa_driver_ops::authenticate). Information about authentication result is included in union wpa_event_data::auth.

EVENT_DEAUTH 

EVENT_DEAUTH - Authentication lost

This event should be called when authentication is lost either due to receiving deauthenticate frame from the AP or when sending that frame to the current AP. In AP mode, union wpa_event_data::deauth_info is required.

EVENT_ASSOC_REJECT 

EVENT_ASSOC_REJECT - Association rejected

This event should be called when (re)association attempt has been rejected by the AP. Information about authentication result is included in union wpa_event_data::assoc_reject.

EVENT_AUTH_TIMED_OUT 

EVENT_AUTH_TIMED_OUT - Authentication timed out

EVENT_ASSOC_TIMED_OUT 

EVENT_ASSOC_TIMED_OUT - Association timed out

EVENT_FT_RRB_RX 

EVENT_FT_RRB_RX - FT (IEEE 802.11r) RRB frame received

EVENT_WPS_BUTTON_PUSHED 

EVENT_WPS_BUTTON_PUSHED - Report hardware push button press for WPS

EVENT_TX_STATUS 

EVENT_TX_STATUS - Report TX status

EVENT_RX_FROM_UNKNOWN 

EVENT_RX_FROM_UNKNOWN - Report RX from unknown STA

EVENT_RX_MGMT 

EVENT_RX_MGMT - Report RX of a management frame

EVENT_RX_ACTION 

EVENT_RX_ACTION - Action frame received

This event is used to indicate when an Action frame has been received. Information about the received frame is included in union wpa_event_data::rx_action.

EVENT_REMAIN_ON_CHANNEL 

EVENT_REMAIN_ON_CHANNEL - Remain-on-channel duration started

This event is used to indicate when the driver has started the requested remain-on-channel duration. Information about the operation is included in union wpa_event_data::remain_on_channel.

EVENT_CANCEL_REMAIN_ON_CHANNEL 

EVENT_CANCEL_REMAIN_ON_CHANNEL - Remain-on-channel timed out

This event is used to indicate when the driver has completed remain-on-channel duration, i.e., may noot be available on the requested channel anymore. Information about the operation is included in union wpa_event_data::remain_on_channel.

EVENT_MLME_RX 

EVENT_MLME_RX - Report reception of frame for MLME (test use only)

This event is used only by driver_test.c and userspace MLME.

EVENT_RX_PROBE_REQ 

EVENT_RX_PROBE_REQ - Indicate received Probe Request frame

This event is used to indicate when a Probe Request frame has been received. Information about the received frame is included in union wpa_event_data::rx_probe_req. The driver is required to report these events only after successfully completed probe_req_report() commands to request the events (i.e., report parameter is non-zero) in station mode. In AP mode, Probe Request frames should always be reported.

EVENT_NEW_STA 

EVENT_NEW_STA - New wired device noticed

This event is used to indicate that a new device has been detected in a network that does not use association-like functionality (i.e., mainly wired Ethernet). This can be used to start EAPOL authenticator when receiving a frame from a device. The address of the device is included in union wpa_event_data::new_sta.

EVENT_EAPOL_RX 

EVENT_EAPOL_RX - Report received EAPOL frame

When in AP mode with hostapd, this event is required to be used to deliver the receive EAPOL frames from the driver. With wpa_supplicant, this event is used only if the send_eapol() handler is used to override the use of l2_packet for EAPOL frame TX.

EVENT_SIGNAL_CHANGE 

EVENT_SIGNAL_CHANGE - Indicate change in signal strength

This event is used to indicate changes in the signal strength observed in frames received from the current AP if signal strength monitoring has been enabled with signal_monitor().

Definition at line 1774 of file driver.h.


Function Documentation

static void drv_event_assoc ( void *  ctx,
const u8 *  addr,
const u8 *  ie,
size_t  ielen 
) [inline, static]

Definition at line 2461 of file driver.h.

static void drv_event_disassoc ( void *  ctx,
const u8 *  addr 
) [inline, static]

Definition at line 2472 of file driver.h.

static void drv_event_eapol_rx ( void *  ctx,
const u8 *  src,
const u8 *  data,
size_t  data_len 
) [inline, static]

Definition at line 2480 of file driver.h.

void wpa_supplicant_event ( void *  ctx,
enum wpa_event_type  event,
union wpa_event_data data 
)

wpa_supplicant_event - Report a driver event for wpa_supplicant : Context pointer (wpa_s); this is the ctx variable registered with struct wpa_driver_ops::init() : event type (defined above) : possible extra data for the event

Driver wrapper code should call this function whenever an event is received from the driver.

Definition at line 1582 of file events.c.



wpa_supplicant
Author(s): Package maintained by Blaise Gassend
autogenerated on Thu Apr 24 2014 15:34:37