wpa_supplicant.h File Reference

wpa_supplicant - Exported functions for wpa_supplicant modules More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef enum wpa_event_type wpa_event_type

Enumerations

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
}

Functions

void wpa_supplicant_event (struct wpa_supplicant *wpa_s, wpa_event_type event, union wpa_event_data *data)
 Report a driver event for wpa_supplicant.
void wpa_supplicant_rx_eapol (void *ctx, const u8 *src_addr, const u8 *buf, size_t len)
 Deliver a received EAPOL frame to wpa_supplicant.


Detailed Description

wpa_supplicant - Exported functions for wpa_supplicant modules

Copyright
Copyright (c) 2003-2005, 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_supplicant.h.


Typedef Documentation

typedef enum wpa_event_type wpa_event_type
 

enum wpa_event_type - Event type for wpa_supplicant_event() calls


Enumeration Type Documentation

enum wpa_event_type
 

enum wpa_event_type - Event type for wpa_supplicant_event() calls

Enumeration values:
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 even 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  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.

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 is 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  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.

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  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  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  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.

Definition at line 27 of file wpa_supplicant.h.


Function Documentation

void wpa_supplicant_event struct wpa_supplicant wpa_s,
wpa_event_type  event,
union wpa_event_data data
 

Report a driver event for wpa_supplicant.

Parameters:
wpa_s pointer to wpa_supplicant data; this is the ctx variable registered with struct wpa_driver_ops::init()
event event type (defined above)
data possible extra data for the event
Driver wrapper code should call this function whenever an event is received from the driver.

Definition at line 800 of file events.c.

Here is the call graph for this function:

void wpa_supplicant_rx_eapol void *  ctx,
const u8 *  src_addr,
const u8 *  buf,
size_t  len
 

Deliver a received EAPOL frame to wpa_supplicant.

Parameters:
ctx Context pointer (wpa_s)
src_addr Source address of the EAPOL frame
buf EAPOL data starting from the EAPOL header (i.e., no Ethernet header)
len Length of the EAPOL data
This function is called for each received EAPOL frame.

Definition at line 1924 of file wpa_supplicant.c.

Here is the call graph for this function:


Generated on Sun Dec 31 13:55:35 2006 for wpa_supplicant by  doxygen 1.4.2