#include "common/defs.h"
Go to the source code of this file.
#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 |
enum wpa_driver_if_type |
enum wpa_event_type |
enum wpa_event_type - Event type for wpa_supplicant_event() calls
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(). |
static void drv_event_assoc | ( | void * | ctx, |
const u8 * | addr, | ||
const u8 * | ie, | ||
size_t | ielen | ||
) | [inline, static] |
static void drv_event_disassoc | ( | void * | ctx, |
const u8 * | addr | ||
) | [inline, static] |
static void drv_event_eapol_rx | ( | void * | ctx, |
const u8 * | src, | ||
const u8 * | data, | ||
size_t | data_len | ||
) | [inline, static] |
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.