|
hostapd
|
struct wpa_driver_ops - Driver interface API definition More...
#include <driver.h>
Public Attributes | |
| const char * | name |
| Name of the driver interface. | |
| const char * | desc |
| One line description of the driver interface. | |
| int(* | get_bssid )(void *priv, u8 *bssid) |
| get_bssid - Get the current BSSID : private driver interface data : buffer for BSSID (ETH_ALEN = 6 bytes) More... | |
| int(* | get_ssid )(void *priv, u8 *ssid) |
| get_ssid - Get the current SSID : private driver interface data : buffer for SSID (at least 32 bytes) More... | |
| int(* | set_key )(const char *ifname, void *priv, enum wpa_alg alg, const u8 *addr, int key_idx, int set_tx, const u8 *seq, size_t seq_len, const u8 *key, size_t key_len) |
| set_key - Configure encryption key : Interface name (for multi-SSID/VLAN support) : private driver interface data : encryption algorithm (WPA_ALG_NONE, WPA_ALG_WEP, WPA_ALG_TKIP, WPA_ALG_CCMP, WPA_ALG_IGTK, WPA_ALG_PMK, WPA_ALG_GCMP, WPA_ALG_GCMP_256, WPA_ALG_CCMP_256, WPA_ALG_BIP_GMAC_128, WPA_ALG_BIP_GMAC_256, WPA_ALG_BIP_CMAC_256); WPA_ALG_NONE clears the key. More... | |
| void *(* | init )(void *ctx, const char *ifname) |
| init - Initialize driver interface : context to be used when calling wpa_supplicant functions, e.g., wpa_supplicant_event() : interface name, e.g., wlan0 More... | |
| void(* | deinit )(void *priv) |
| deinit - Deinitialize driver interface : private driver interface data from init() More... | |
| int(* | set_param )(void *priv, const char *param) |
| set_param - Set driver configuration parameters : private driver interface data from init() More... | |
| int(* | set_countermeasures )(void *priv, int enabled) |
| set_countermeasures - Enable/disable TKIP countermeasures : private driver interface data : 1 = countermeasures enabled, 0 = disabled More... | |
| int(* | deauthenticate )(void *priv, const u8 *addr, int reason_code) |
| deauthenticate - Request driver to deauthenticate : private driver interface data : peer address (BSSID of the AP) : 16-bit reason code to be sent in the deauthentication frame More... | |
| int(* | associate )(void *priv, struct wpa_driver_associate_params *params) |
| associate - Request driver to associate : private driver interface data : association parameters More... | |
| int(* | add_pmkid )(void *priv, const u8 *bssid, const u8 *pmkid) |
| add_pmkid - Add PMKSA cache entry to the driver : private driver interface data : BSSID for the PMKSA cache entry : PMKID for the PMKSA cache entry More... | |
| int(* | remove_pmkid )(void *priv, const u8 *bssid, const u8 *pmkid) |
| remove_pmkid - Remove PMKSA cache entry to the driver : private driver interface data : BSSID for the PMKSA cache entry : PMKID for the PMKSA cache entry More... | |
| int(* | flush_pmkid )(void *priv) |
| flush_pmkid - Flush PMKSA cache : private driver interface data More... | |
| int(* | get_capa )(void *priv, struct wpa_driver_capa *capa) |
| get_capa - Get driver capabilities : private driver interface data More... | |
| void(* | poll )(void *priv) |
| poll - Poll driver for association information : private driver interface data More... | |
| unsigned int(* | get_ifindex )(void *priv) |
| get_ifindex - Get interface index : private driver interface data More... | |
| const char *(* | get_ifname )(void *priv) |
| get_ifname - Get interface name : private driver interface data More... | |
| const u8 *(* | get_mac_addr )(void *priv) |
| get_mac_addr - Get own MAC address : private driver interface data More... | |
| int(* | set_operstate )(void *priv, int state) |
| set_operstate - Sets device operating state to DORMANT or UP : private driver interface data : 0 = dormant, 1 = up Returns: 0 on success, -1 on failure More... | |
| int(* | mlme_setprotection )(void *priv, const u8 *addr, int protect_type, int key_type) |
| mlme_setprotection - MLME-SETPROTECTION.request primitive : Private driver interface data : Address of the station for which to set protection (may be NULL for group keys) : MLME_SETPROTECTION_PROTECT_TYPE_* : MLME_SETPROTECTION_KEY_TYPE_* Returns: 0 on success, -1 on failure More... | |
| struct hostapd_hw_modes *(* | get_hw_feature_data )(void *priv, u16 *num_modes, u16 *flags) |
| get_hw_feature_data - Get hardware support data (channels and rates) : Private driver interface data : Variable for returning the number of returned modes flags: Variable for returning hardware feature flags Returns: Pointer to allocated hardware data on success or NULL on failure. More... | |
| int(* | send_mlme )(void *priv, const u8 *data, size_t data_len, int noack, unsigned int freq, const u16 *csa_offs, size_t csa_offs_len) |
| send_mlme - Send management frame from MLME : Private driver interface data : IEEE 802.11 management frame with IEEE 802.11 header : Size of the management frame : Do not wait for this frame to be acked (disable retries) : Frequency (in MHz) to send the frame on, or 0 to let the driver decide : Array of CSA offsets or NULL : Number of elements in csa_offs Returns: 0 on success, -1 on failure | |
| int(* | update_ft_ies )(void *priv, const u8 *md, const u8 *ies, size_t ies_len) |
| update_ft_ies - Update FT (IEEE 802.11r) IEs : Private driver interface data : Mobility domain (2 octets) (also included inside ies) : FT IEs (MDIE, FTIE, ...) or NULL to remove IEs : Length of FT IEs in bytes Returns: 0 on success, -1 on failure More... | |
| struct wpa_scan_results *(* | get_scan_results2 )(void *priv) |
| get_scan_results2 - Fetch the latest scan results : private driver interface data More... | |
| int(* | set_country )(void *priv, const char *alpha2) |
| set_country - Set country : Private driver interface data : country to which to switch to Returns: 0 on success, -1 on failure More... | |
| int(* | get_country )(void *priv, char *alpha2) |
| get_country - Get country : Private driver interface data : Buffer for returning country code (at least 3 octets) Returns: 0 on success, -1 on failure | |
| void *(* | global_init )(void *ctx) |
| global_init - Global driver initialization : wpa_global pointer Returns: Pointer to private data (global), NULL on failure More... | |
| void(* | global_deinit )(void *priv) |
| global_deinit - Global driver deinitialization : private driver global data from global_init() More... | |
| void *(* | init2 )(void *ctx, const char *ifname, void *global_priv) |
| init2 - Initialize driver interface (with global data) : context to be used when calling wpa_supplicant functions, e.g., wpa_supplicant_event() : interface name, e.g., wlan0 : private driver global data from global_init() Returns: Pointer to private data, NULL on failure More... | |
| struct wpa_interface_info *(* | get_interfaces )(void *global_priv) |
| get_interfaces - Get information about available interfaces : private driver global data from global_init() Returns: Allocated buffer of interface information (caller is responsible for freeing the data structure) on success, NULL on failure | |
| int(* | scan2 )(void *priv, struct wpa_driver_scan_params *params) |
| scan2 - Request the driver to initiate scan : private driver interface data : Scan parameters More... | |
| int(* | authenticate )(void *priv, struct wpa_driver_auth_params *params) |
| authenticate - Request driver to authenticate : private driver interface data : authentication parameters Returns: 0 on success, -1 on failure More... | |
| int(* | set_ap )(void *priv, struct wpa_driver_ap_params *params) |
| set_ap - Set Beacon and Probe Response information for AP mode : Private driver interface data : Parameters to use in AP mode More... | |
| int(* | set_acl )(void *priv, struct hostapd_acl_params *params) |
| set_acl - Set ACL in AP mode : Private driver interface data : Parameters to configure ACL Returns: 0 on success, -1 on failure More... | |
| void *(* | hapd_init )(struct hostapd_data *hapd, struct wpa_init_params *params) |
| hapd_init - Initialize driver interface (hostapd only) : Pointer to hostapd context : Configuration for the driver wrapper Returns: Pointer to private data, NULL on failure More... | |
| void(* | hapd_deinit )(void *priv) |
| hapd_deinit - Deinitialize driver interface (hostapd only) : Private driver interface data from hapd_init() | |
| int(* | set_ieee8021x )(void *priv, struct wpa_bss_params *params) |
| set_ieee8021x - Enable/disable IEEE 802.1X support (AP only) : Private driver interface data : BSS parameters Returns: 0 on success, -1 on failure More... | |
| int(* | set_privacy )(void *priv, int enabled) |
| set_privacy - Enable/disable privacy (AP only) : Private driver interface data : 1 = privacy enabled, 0 = disabled Returns: 0 on success, -1 on failure More... | |
| int(* | get_seqnum )(const char *ifname, void *priv, const u8 *addr, int idx, u8 *seq) |
| get_seqnum - Fetch the current TSC/packet number (AP only) : The interface name (main or virtual) : Private driver interface data : MAC address of the station or NULL for group keys : Key index : Buffer for returning the latest used TSC/packet number Returns: 0 on success, -1 on failure More... | |
| int(* | flush )(void *priv) |
| flush - Flush all association stations (AP only) : Private driver interface data Returns: 0 on success, -1 on failure More... | |
| int(* | set_generic_elem )(void *priv, const u8 *elem, size_t elem_len) |
| set_generic_elem - Add IEs into Beacon/Probe Response frames (AP) : Private driver interface data : Information elements : Length of the elem buffer in octets Returns: 0 on success, -1 on failure More... | |
| int(* | read_sta_data )(void *priv, struct hostap_sta_driver_data *data, const u8 *addr) |
| read_sta_data - Fetch station data : Private driver interface data : Buffer for returning station information : MAC address of the station Returns: 0 on success, -1 on failure | |
| int(* | hapd_send_eapol )(void *priv, const u8 *addr, const u8 *data, size_t data_len, int encrypt, const u8 *own_addr, u32 flags) |
| hapd_send_eapol - Send an EAPOL packet (AP only) : private driver interface data : Destination MAC address : EAPOL packet starting with IEEE 802.1X header : Length of the EAPOL packet in octets : Whether the frame should be encrypted : Source MAC address : WPA_STA_* flags for the destination station More... | |
| int(* | sta_deauth )(void *priv, const u8 *own_addr, const u8 *addr, int reason) |
| sta_deauth - Deauthenticate a station (AP only) : Private driver interface data : Source address and BSSID for the Deauthentication frame : MAC address of the station to deauthenticate : Reason code for the Deauthentiation frame Returns: 0 on success, -1 on failure More... | |
| int(* | sta_disassoc )(void *priv, const u8 *own_addr, const u8 *addr, int reason) |
| sta_disassoc - Disassociate a station (AP only) : Private driver interface data : Source address and BSSID for the Disassociation frame : MAC address of the station to disassociate : Reason code for the Disassociation frame Returns: 0 on success, -1 on failure More... | |
| int(* | sta_remove )(void *priv, const u8 *addr) |
| sta_remove - Remove a station entry (AP only) : Private driver interface data : MAC address of the station to be removed Returns: 0 on success, -1 on failure | |
| int(* | hapd_get_ssid )(void *priv, u8 *buf, int len) |
| hapd_get_ssid - Get the current SSID (AP only) : Private driver interface data : Buffer for returning the SSID : Maximum length of the buffer Returns: Length of the SSID on success, -1 on failure More... | |
| int(* | hapd_set_ssid )(void *priv, const u8 *buf, int len) |
| hapd_set_ssid - Set SSID (AP only) : Private driver interface data : SSID : Length of the SSID in octets Returns: 0 on success, -1 on failure More... | |
| int(* | hapd_set_countermeasures )(void *priv, int enabled) |
| hapd_set_countermeasures - Enable/disable TKIP countermeasures (AP) : Private driver interface data : 1 = countermeasures enabled, 0 = disabled Returns: 0 on success, -1 on failure More... | |
| int(* | sta_add )(void *priv, struct hostapd_sta_add_params *params) |
| sta_add - Add a station entry : Private driver interface data : Station parameters Returns: 0 on success, -1 on failure More... | |
| int(* | get_inact_sec )(void *priv, const u8 *addr) |
| get_inact_sec - Get station inactivity duration (AP only) : Private driver interface data : Station address Returns: Number of seconds station has been inactive, -1 on failure | |
| int(* | sta_clear_stats )(void *priv, const u8 *addr) |
| sta_clear_stats - Clear station statistics (AP only) : Private driver interface data : Station address Returns: 0 on success, -1 on failure | |
| int(* | set_freq )(void *priv, struct hostapd_freq_params *freq) |
| set_freq - Set channel/frequency (AP only) : Private driver interface data : Channel parameters Returns: 0 on success, -1 on failure | |
| int(* | set_rts )(void *priv, int rts) |
| set_rts - Set RTS threshold : Private driver interface data : RTS threshold in octets Returns: 0 on success, -1 on failure | |
| int(* | set_frag )(void *priv, int frag) |
| set_frag - Set fragmentation threshold : Private driver interface data : Fragmentation threshold in octets Returns: 0 on success, -1 on failure | |
| int(* | sta_set_flags )(void *priv, const u8 *addr, unsigned int total_flags, unsigned int flags_or, unsigned int flags_and) |
| sta_set_flags - Set station flags (AP only) : Private driver interface data : Station address : Bitmap of all WPA_STA_* flags currently set : Bitmap of WPA_STA_* flags to add : Bitmap of WPA_STA_* flags to us as a mask Returns: 0 on success, -1 on failure | |
| int(* | set_tx_queue_params )(void *priv, int queue, int aifs, int cw_min, int cw_max, int burst_time) |
| set_tx_queue_params - Set TX queue parameters : Private driver interface data : Queue number (0 = VO, 1 = VI, 2 = BE, 3 = BK) : AIFS : cwMin : cwMax : Maximum length for bursting in 0.1 msec units | |
| int(* | if_add )(void *priv, enum wpa_driver_if_type type, const char *ifname, const u8 *addr, void *bss_ctx, void **drv_priv, char *force_ifname, u8 *if_addr, const char *bridge, int use_existing, int setup_ap) |
| if_add - Add a virtual interface : Private driver interface data : Interface type : Interface name for the new virtual interface : Local address to use for the interface or NULL to use the parent interface address : BSS context for WPA_IF_AP_BSS interfaces : Pointer for overwriting the driver context or NULL if not allowed (applies only to WPA_IF_AP_BSS type) : Buffer for returning an interface name that the driver ended up using if it differs from the requested ifname : Buffer for returning the allocated interface address (this may differ from the requested addr if the driver cannot change interface address) : Bridge interface to use or NULL if no bridge configured : Whether to allow existing interface to be used : Whether to setup AP for WPA_IF_AP_BSS interfaces Returns: 0 on success, -1 on failure | |
| int(* | if_remove )(void *priv, enum wpa_driver_if_type type, const char *ifname) |
| if_remove - Remove a virtual interface : Private driver interface data : Interface type : Interface name of the virtual interface to be removed Returns: 0 on success, -1 on failure | |
| int(* | set_sta_vlan )(void *priv, const u8 *addr, const char *ifname, int vlan_id) |
| set_sta_vlan - Bind a station into a specific interface (AP only) : Private driver interface data : Interface (main or virtual BSS or VLAN) : MAC address of the associated station : VLAN ID Returns: 0 on success, -1 on failure More... | |
| int(* | commit )(void *priv) |
| commit - Optional commit changes handler (AP only) : driver private data Returns: 0 on success, -1 on failure More... | |
| int(* | send_ether )(void *priv, const u8 *dst, const u8 *src, u16 proto, const u8 *data, size_t data_len) |
| send_ether - Send an ethernet packet (AP only) : private driver interface data : Destination MAC address : Source MAC address : Ethertype : EAPOL packet starting with IEEE 802.1X header : Length of the EAPOL packet in octets Returns: 0 on success, -1 on failure | |
| int(* | set_radius_acl_auth )(void *priv, const u8 *mac, int accepted, u32 session_timeout) |
| set_radius_acl_auth - Notification of RADIUS ACL change : Private driver interface data : MAC address of the station : Whether the station was accepted : Session timeout for the station Returns: 0 on success, -1 on failure | |
| int(* | set_radius_acl_expire )(void *priv, const u8 *mac) |
| set_radius_acl_expire - Notification of RADIUS ACL expiration : Private driver interface data : MAC address of the station Returns: 0 on success, -1 on failure | |
| int(* | set_ap_wps_ie )(void *priv, const struct wpabuf *beacon, const struct wpabuf *proberesp, const struct wpabuf *assocresp) |
| set_ap_wps_ie - Add WPS IE(s) into Beacon/Probe Response frames (AP) : Private driver interface data : WPS IE(s) for Beacon frames or NULL to remove extra IE(s) : WPS IE(s) for Probe Response frames or NULL to remove extra IE(s) : WPS IE(s) for (Re)Association Response frames or NULL to remove extra IE(s) Returns: 0 on success, -1 on failure More... | |
| int(* | set_supp_port )(void *priv, int authorized) |
| set_supp_port - Set IEEE 802.1X Supplicant Port status : Private driver interface data : Whether the port is authorized Returns: 0 on success, -1 on failure | |
| int(* | set_wds_sta )(void *priv, const u8 *addr, int aid, int val, const char *bridge_ifname, char *ifname_wds) |
| set_wds_sta - Bind a station into a 4-address WDS (AP only) : Private driver interface data : MAC address of the associated station : Association ID : 1 = bind to 4-address WDS; 0 = unbind : Bridge interface to use for the WDS station or NULL to indicate that bridge is not to be used : Buffer to return the interface name for the new WDS station or NULL to indicate name is not returned. More... | |
| int(* | send_action )(void *priv, unsigned int freq, unsigned int wait, const u8 *dst, const u8 *src, const u8 *bssid, const u8 *data, size_t data_len, int no_cck) |
| send_action - Transmit an Action frame : Private driver interface data : Frequency (in MHz) of the channel : Time to wait off-channel for a response (in ms), or zero : Destination MAC address (Address 1) : Source MAC address (Address 2) : BSSID (Address 3) : Frame body : data length in octets @ : Whether CCK rates must not be used to transmit this frame Returns: 0 on success, -1 on failure More... | |
| void(* | send_action_cancel_wait )(void *priv) |
| send_action_cancel_wait - Cancel action frame TX wait : Private driver interface data More... | |
| int(* | remain_on_channel )(void *priv, unsigned int freq, unsigned int duration) |
| remain_on_channel - Remain awake on a channel : Private driver interface data : Frequency (in MHz) of the channel : Duration in milliseconds Returns: 0 on success, -1 on failure More... | |
| int(* | cancel_remain_on_channel )(void *priv) |
| cancel_remain_on_channel - Cancel remain-on-channel operation : Private driver interface data More... | |
| int(* | probe_req_report )(void *priv, int report) |
| probe_req_report - Request Probe Request frames to be indicated : Private driver interface data : Whether to report received Probe Request frames Returns: 0 on success, -1 on failure (or if not supported) More... | |
| int(* | deinit_ap )(void *priv) |
| deinit_ap - Deinitialize AP mode : Private driver interface data Returns: 0 on success, -1 on failure (or if not supported) More... | |
| int(* | deinit_p2p_cli )(void *priv) |
| deinit_p2p_cli - Deinitialize P2P client mode : Private driver interface data Returns: 0 on success, -1 on failure (or if not supported) More... | |
| void(* | suspend )(void *priv) |
| suspend - Notification on system suspend/hibernate event : Private driver interface data | |
| void(* | resume )(void *priv) |
| resume - Notification on system resume/thaw event : Private driver interface data | |
| int(* | signal_monitor )(void *priv, int threshold, int hysteresis) |
| signal_monitor - Set signal monitoring parameters : Private driver interface data : Threshold value for signal change events; 0 = disabled : Minimum change in signal strength before indicating a new event Returns: 0 on success, -1 on failure (or if not supported) More... | |
| int(* | send_frame )(void *priv, const u8 *data, size_t data_len, int encrypt) |
| send_frame - Send IEEE 802.11 frame (testing use only) : Private driver interface data : IEEE 802.11 frame with IEEE 802.11 header : Size of the frame : Whether to encrypt the frame (if keys are set) Returns: 0 on success, -1 on failure More... | |
| int(* | get_noa )(void *priv, u8 *buf, size_t buf_len) |
| get_noa - Get current Notice of Absence attribute payload : Private driver interface data : Buffer for returning NoA : Buffer length in octets Returns: Number of octets used in buf, 0 to indicate no NoA is being advertized, or -1 on failure More... | |
| int(* | set_noa )(void *priv, u8 count, int start, int duration) |
| set_noa - Set Notice of Absence parameters for GO (testing) : Private driver interface data : Count : Start time in ms from next TBTT : Duration in ms Returns: 0 on success or -1 on failure More... | |
| int(* | set_p2p_powersave )(void *priv, int legacy_ps, int opp_ps, int ctwindow) |
| set_p2p_powersave - Set P2P power save options : Private driver interface data : 0 = disable, 1 = enable, 2 = maximum PS, -1 = no change : 0 = disable, 1 = enable, -1 = no change : 0. More... | |
| int(* | ampdu )(void *priv, int ampdu) |
| ampdu - Enable/disable aggregation : Private driver interface data : 1/0 = enable/disable A-MPDU aggregation Returns: 0 on success or -1 on failure | |
| const char *(* | get_radio_name )(void *priv) |
| get_radio_name - Get physical radio name for the device : Private driver interface data Returns: Radio name or NULL if not known More... | |
| int(* | send_tdls_mgmt )(void *priv, const u8 *dst, u8 action_code, u8 dialog_token, u16 status_code, u32 peer_capab, int initiator, const u8 *buf, size_t len) |
| send_tdls_mgmt - for sending TDLS management packets : private driver interface data : Destination (peer) MAC address : TDLS action code for the mssage : Dialog Token to use in the message (if needed) : Status Code or Reason Code to use (if needed) : TDLS peer capability (TDLS_PEER_* bitfield) : Is the current end the TDLS link initiator : TDLS IEs to add to the message : Length of buf in octets Returns: 0 on success, negative (<0) on failure More... | |
| int(* | tdls_oper )(void *priv, enum tdls_oper oper, const u8 *peer) |
| tdls_oper - Ask the driver to perform high-level TDLS operations : Private driver interface data : TDLS high-level operation. More... | |
| int(* | wnm_oper )(void *priv, enum wnm_oper oper, const u8 *peer, u8 *buf, u16 *buf_len) |
| wnm_oper - Notify driver of the WNM frame reception : Private driver interface data : WNM operation. More... | |
| int(* | set_qos_map )(void *priv, const u8 *qos_map_set, u8 qos_map_set_len) |
| set_qos_map - Set QoS Map : Private driver interface data : QoS Map : Length of QoS Map | |
| int(* | br_add_ip_neigh )(void *priv, u8 version, const u8 *ipaddr, int prefixlen, const u8 *addr) |
| br_add_ip_neigh - Add a neigh to the bridge ip neigh table : Private driver interface data More... | |
| int(* | br_delete_ip_neigh )(void *priv, u8 version, const u8 *ipaddr) |
| br_delete_ip_neigh - Remove a neigh from the bridge ip neigh table : Private driver interface data More... | |
| int(* | br_port_set_attr )(void *priv, enum drv_br_port_attr attr, unsigned int val) |
| br_port_set_attr - Set a bridge port attribute : Bridge port attribute to set : Value to be set Returns: 0 on success, negative (<0) on failure | |
| int(* | br_set_net_param )(void *priv, enum drv_br_net_param param, unsigned int val) |
| br_port_set_attr - Set a bridge network parameter More... | |
| int(* | set_wowlan )(void *priv, const struct wowlan_triggers *triggers) |
| set_wowlan - Set wake-on-wireless triggers : Private driver interface data : wowlan triggers | |
| int(* | signal_poll )(void *priv, struct wpa_signal_info *signal_info) |
| signal_poll - Get current connection information : Private driver interface data : Connection info structure | |
| int(* | set_authmode )(void *priv, int authmode) |
| set_authmode - Set authentication algorithm(s) for static WEP : Private driver interface data : 1=Open System, 2=Shared Key, 3=both Returns: 0 on success, -1 on failure More... | |
| int(* | vendor_cmd )(void *priv, unsigned int vendor_id, unsigned int subcmd, const u8 *data, size_t data_len, struct wpabuf *buf) |
| vendor_cmd - Execute vendor specific command : Private driver interface data : Vendor id : Vendor command id : Vendor command parameters (NULL if no parameters) : Data length : Return buffer (NULL to ignore reply) Returns: 0 on success, negative (<0) on failure More... | |
| void(* | set_rekey_info )(void *priv, const u8 *kek, size_t kek_len, const u8 *kck, size_t kck_len, const u8 *replay_ctr) |
| set_rekey_info - Set rekey information : Private driver interface data : Current KEK : KEK length in octets : Current KCK : KCK length in octets : Current EAPOL-Key Replay Counter More... | |
| int(* | sta_assoc )(void *priv, const u8 *own_addr, const u8 *addr, int reassoc, u16 status, const u8 *ie, size_t len) |
| sta_assoc - Station association indication : Private driver interface data : Source address and BSSID for association frame : MAC address of the station to associate : flag to indicate re-association : association response status code : assoc response ie buffer : ie buffer length Returns: 0 on success, -1 on failure More... | |
| int(* | sta_auth )(void *priv, const u8 *own_addr, const u8 *addr, u16 seq, u16 status, const u8 *ie, size_t len) |
| sta_auth - Station authentication indication : Private driver interface data : Source address and BSSID for authentication frame : MAC address of the station to associate : authentication sequence number : authentication response status code : authentication frame ie buffer : ie buffer length More... | |
| int(* | add_tspec )(void *priv, const u8 *addr, u8 *tspec_ie, size_t tspec_ielen) |
| add_tspec - Add traffic stream : Private driver interface data : MAC address of the station to associate : tspec ie buffer : tspec ie length Returns: 0 on success, -1 on failure More... | |
| int(* | add_sta_node )(void *priv, const u8 *addr, u16 auth_alg) |
| add_sta_node - Add a station node in the driver : Private driver interface data : MAC address of the station to add : authentication algorithm used by the station Returns: 0 on success, -1 on failure More... | |
| int(* | sched_scan )(void *priv, struct wpa_driver_scan_params *params) |
| sched_scan - Request the driver to initiate scheduled scan : Private driver interface data : Scan parameters Returns: 0 on success, -1 on failure More... | |
| int(* | stop_sched_scan )(void *priv) |
| stop_sched_scan - Request the driver to stop a scheduled scan : Private driver interface data Returns: 0 on success, -1 on failure More... | |
| void(* | poll_client )(void *priv, const u8 *own_addr, const u8 *addr, int qos) |
| poll_client - Probe (null data or such) the given station : Private driver interface data : MAC address of sending interface : MAC address of the station to probe : Indicates whether station is QoS station More... | |
| int(* | radio_disable )(void *priv, int disabled) |
| radio_disable - Disable/enable radio : Private driver interface data : 1=disable 0=enable radio Returns: 0 on success, -1 on failure More... | |
| int(* | switch_channel )(void *priv, struct csa_settings *settings) |
| switch_channel - Announce channel switch and migrate the GO to the given frequency : Private driver interface data : Settings for CSA period and new channel Returns: 0 on success, -1 on failure More... | |
| int(* | add_tx_ts )(void *priv, u8 tsid, const u8 *addr, u8 user_prio, u16 admitted_time) |
| add_tx_ts - Add traffic stream : Private driver interface data : Traffic stream ID : Receiver address : User priority of the traffic stream : Admitted time for this TS in units of 32 microsecond periods (per second). More... | |
| int(* | del_tx_ts )(void *priv, u8 tsid, const u8 *addr) |
| del_tx_ts - Delete traffic stream : Private driver interface data : Traffic stream ID : Receiver address Returns: 0 on success, -1 on failure | |
| int(* | tdls_enable_channel_switch )(void *priv, const u8 *addr, u8 oper_class, const struct hostapd_freq_params *params) |
| Enable channel-switching with TDLS peer : Private driver interface data : MAC address of the TDLS peer : Operating class of the switch channel : Channel specification Returns: 0 on success, -1 on failure. More... | |
| int(* | tdls_disable_channel_switch )(void *priv, const u8 *addr) |
| Disable channel switching with TDLS peer : Private driver interface data : MAC address of the TDLS peer Returns: 0 on success, -1 on failure. More... | |
| int(* | start_dfs_cac )(void *priv, struct hostapd_freq_params *freq) |
| start_dfs_cac - Listen for radar interference on the channel : Private driver interface data : Channel parameters Returns: 0 on success, -1 on failure | |
| int(* | stop_ap )(void *priv) |
| stop_ap - Removes beacon from AP : Private driver interface data Returns: 0 on success, -1 on failure (or if not supported) More... | |
| int(* | get_survey )(void *priv, unsigned int freq) |
| get_survey - Retrieve survey data : Private driver interface data : If set, survey data for the specified frequency is only being requested. More... | |
| int(* | status )(void *priv, char *buf, size_t buflen) |
| status - Get driver interface status information : Private driver interface data : Buffer for printing tou the status information : Maximum length of the buffer Returns: Length of written status information or -1 on failure | |
| int(* | roaming )(void *priv, int allowed, const u8 *bssid) |
| roaming - Set roaming policy for driver-based BSS selection : Private driver interface data : Whether roaming within ESS is allowed : Forced BSSID if roaming is disabled or NULL if not set Returns: Length of written status information or -1 on failure More... | |
| int(* | set_mac_addr )(void *priv, const u8 *addr) |
| set_mac_addr - Set MAC address : Private driver interface data : MAC address to use or NULL for setting back to permanent Returns: 0 on success, -1 on failure | |
| int(* | init_mesh )(void *priv) |
| init_mesh - Driver specific initialization for mesh : Private driver interface data Returns: 0 on success, -1 on failure | |
| int(* | join_mesh )(void *priv, struct wpa_driver_mesh_join_params *params) |
| join_mesh - Join a mesh network : Private driver interface data : Mesh configuration parameters Returns: 0 on success, -1 on failure | |
| int(* | leave_mesh )(void *priv) |
| leave_mesh - Leave a mesh network : Private driver interface data Returns 0 on success, -1 on failure | |
| int(* | do_acs )(void *priv, struct drv_acs_params *params) |
| do_acs - Automatically select channel : Private driver interface data : Parameters for ACS Returns 0 on success, -1 on failure More... | |
| int(* | set_band )(void *priv, enum set_band band) |
| set_band - Notify driver of band selection : Private driver interface data : The selected band(s) Returns 0 on success, -1 on failure | |
| int(* | get_pref_freq_list )(void *priv, enum wpa_driver_if_type if_type, unsigned int *num, unsigned int *freq_list) |
| get_pref_freq_list - Get preferred frequency list for an interface : Private driver interface data : Interface type : Number of channels : Preferred channel frequency list encoded in MHz values Returns 0 on success, -1 on failure More... | |
| int(* | set_prob_oper_freq )(void *priv, unsigned int freq) |
| set_prob_oper_freq - Indicate probable P2P operating channel : Private driver interface data : Channel frequency in MHz Returns 0 on success, -1 on failure More... | |
| int(* | abort_scan )(void *priv, u64 scan_cookie) |
| abort_scan - Request the driver to abort an ongoing scan : Private driver interface data : Cookie identifying the scan request. More... | |
| int(* | configure_data_frame_filters )(void *priv, u32 filter_flags) |
| configure_data_frame_filters - Request to configure frame filters : Private driver interface data : The type of frames to filter (bitfield of WPA_DATA_FRAME_FILTER_FLAG_*) Returns: 0 on success or -1 on failure | |
| int(* | get_ext_capab )(void *priv, enum wpa_driver_if_type type, const u8 **ext_capab, const u8 **ext_capab_mask, unsigned int *ext_capab_len) |
| get_ext_capab - Get extended capabilities for the specified interface : Private driver interface data : Interface type for which to get extended capabilities : Extended capabilities fetched : Extended capabilities mask : Length of the extended capabilities Returns: 0 on success or -1 on failure | |
| int(* | p2p_lo_start )(void *priv, unsigned int freq, unsigned int period, unsigned int interval, unsigned int count, const u8 *device_types, size_t dev_types_len, const u8 *ies, size_t ies_len) |
| p2p_lo_start - Start offloading P2P listen to device : Private driver interface data : Listening frequency (MHz) for P2P listen : Length of the listen operation in milliseconds : Interval for running the listen operation in milliseconds : Number of times to run the listen operation : Device primary and secondary types : Number of bytes for device_types : P2P IE and WSC IE for Probe Response frames : Length of ies in bytes Returns: 0 on success or -1 on failure | |
| int(* | p2p_lo_stop )(void *priv) |
| p2p_lo_stop - Stop P2P listen offload : Private driver interface data Returns: 0 on success or -1 on failure | |
| int(* | set_default_scan_ies )(void *priv, const u8 *ies, size_t ies_len) |
| set_default_scan_ies - Set default scan IEs : Private driver interface data : Scan default IEs buffer : Length of IEs in bytes Returns: 0 on success or -1 on failure More... | |
| int(* | set_tdls_mode )(void *priv, int tdls_external_control) |
| set_tdls_mode - Set TDLS trigger mode to the host driver : Private driver interface data : Represents if TDLS external trigger control mode is enabled/disabled. More... | |
struct wpa_driver_ops - Driver interface API definition
This structure defines the API that each driver interface needs to implement for core wpa_supplicant code. All driver specific functionality is captured in this wrapper.
| int(* wpa_driver_ops::abort_scan) (void *priv, u64 scan_cookie) |
abort_scan - Request the driver to abort an ongoing scan : Private driver interface data : Cookie identifying the scan request.
This is used only when the vendor interface QCA_NL80211_VENDOR_SUBCMD_TRIGGER_SCAN was used to trigger scan. Otherwise, 0 is used. Returns 0 on success, -1 on failure
| int(* wpa_driver_ops::add_pmkid) (void *priv, const u8 *bssid, const u8 *pmkid) |
add_pmkid - Add PMKSA cache entry to the driver : private driver interface data : BSSID for the PMKSA cache entry : PMKID for the PMKSA cache entry
Returns: 0 on success, -1 on failure
This function is called when a new PMK is received, as a result of either normal authentication or RSN pre-authentication.
If the driver generates RSN IE, i.e., it does not use wpa_ie in associate(), add_pmkid() can be used to add new PMKSA cache entries in the driver. If the driver uses wpa_ie from wpa_supplicant, this driver_ops function does not need to be implemented. Likewise, if the driver does not support WPA, this function is not needed.
| int(* wpa_driver_ops::add_sta_node) (void *priv, const u8 *addr, u16 auth_alg) |
add_sta_node - Add a station node in the driver : Private driver interface data : MAC address of the station to add : authentication algorithm used by the station Returns: 0 on success, -1 on failure
This function adds the station node in the driver, when the station gets added by FT-over-DS.
| int(* wpa_driver_ops::add_tspec) (void *priv, const u8 *addr, u8 *tspec_ie, size_t tspec_ielen) |
add_tspec - Add traffic stream : Private driver interface data : MAC address of the station to associate : tspec ie buffer : tspec ie length Returns: 0 on success, -1 on failure
This function adds the traffic steam for the station and fills the medium_time in tspec_ie.
| int(* wpa_driver_ops::add_tx_ts) (void *priv, u8 tsid, const u8 *addr, u8 user_prio, u16 admitted_time) |
add_tx_ts - Add traffic stream : Private driver interface data : Traffic stream ID : Receiver address : User priority of the traffic stream : Admitted time for this TS in units of 32 microsecond periods (per second).
Returns: 0 on success, -1 on failure
| int(* wpa_driver_ops::associate) (void *priv, struct wpa_driver_associate_params *params) |
associate - Request driver to associate : private driver interface data : association parameters
Returns: 0 on success, -1 on failure
| int(* wpa_driver_ops::authenticate) (void *priv, struct wpa_driver_auth_params *params) |
authenticate - Request driver to authenticate : private driver interface data : authentication parameters Returns: 0 on success, -1 on failure
This is an optional function that can be used with drivers that support separate authentication and association steps, i.e., when wpa_supplicant can act as the SME. If not implemented, associate() function is expected to take care of IEEE 802.11 authentication, too.
| int(* wpa_driver_ops::br_add_ip_neigh) (void *priv, u8 version, const u8 *ipaddr, int prefixlen, const u8 *addr) |
br_add_ip_neigh - Add a neigh to the bridge ip neigh table : Private driver interface data
| int(* wpa_driver_ops::br_delete_ip_neigh) (void *priv, u8 version, const u8 *ipaddr) |
br_delete_ip_neigh - Remove a neigh from the bridge ip neigh table : Private driver interface data
| int(* wpa_driver_ops::br_set_net_param) (void *priv, enum drv_br_net_param param, unsigned int val) |
br_port_set_attr - Set a bridge network parameter
| int(* wpa_driver_ops::cancel_remain_on_channel) (void *priv) |
cancel_remain_on_channel - Cancel remain-on-channel operation : Private driver interface data
This command can be used to cancel a remain-on-channel operation before its originally requested duration has passed. This could be used, e.g., when remain_on_channel() is used to request extra time to receive a response to an Action frame and the response is received when there is still unneeded time remaining on the remain-on-channel operation.
| int(* wpa_driver_ops::commit) (void *priv) |
commit - Optional commit changes handler (AP only) : driver private data Returns: 0 on success, -1 on failure
This optional handler function can be registered if the driver interface implementation needs to commit changes (e.g., by setting network interface up) at the end of initial configuration. If set, this handler will be called after initial setup has been completed.
| int(* wpa_driver_ops::deauthenticate) (void *priv, const u8 *addr, int reason_code) |
deauthenticate - Request driver to deauthenticate : private driver interface data : peer address (BSSID of the AP) : 16-bit reason code to be sent in the deauthentication frame
Returns: 0 on success, -1 on failure
| void(* wpa_driver_ops::deinit) (void *priv) |
| int(* wpa_driver_ops::deinit_ap) (void *priv) |
deinit_ap - Deinitialize AP mode : Private driver interface data Returns: 0 on success, -1 on failure (or if not supported)
This optional function can be used to disable AP mode related configuration. If the interface was not dynamically added, change the driver mode to station mode to allow normal station operations like scanning to be completed.
| int(* wpa_driver_ops::deinit_p2p_cli) (void *priv) |
deinit_p2p_cli - Deinitialize P2P client mode : Private driver interface data Returns: 0 on success, -1 on failure (or if not supported)
This optional function can be used to disable P2P client mode. If the interface was not dynamically added, change the interface type back to station mode.
| int(* wpa_driver_ops::do_acs) (void *priv, struct drv_acs_params *params) |
do_acs - Automatically select channel : Private driver interface data : Parameters for ACS Returns 0 on success, -1 on failure
This command can be used to offload ACS to the driver if the driver indicates support for such offloading (WPA_DRIVER_FLAGS_ACS_OFFLOAD).
| int(* wpa_driver_ops::flush) (void *priv) |
flush - Flush all association stations (AP only) : Private driver interface data Returns: 0 on success, -1 on failure
This function requests the driver to disassociate all associated stations. This function does not need to be implemented if the driver does not process association frames internally.
| int(* wpa_driver_ops::flush_pmkid) (void *priv) |
flush_pmkid - Flush PMKSA cache : private driver interface data
Returns: 0 on success, -1 on failure
This function is called when the supplicant drops all PMKSA cache entries for any reason.
If the driver generates RSN IE, i.e., it does not use wpa_ie in associate(), remove_pmkid() can be used to synchronize PMKSA caches between the driver and wpa_supplicant. If the driver uses wpa_ie from wpa_supplicant, this driver_ops function does not need to be implemented. Likewise, if the driver does not support WPA, this function is not needed.
| int(* wpa_driver_ops::get_bssid) (void *priv, u8 *bssid) |
get_bssid - Get the current BSSID : private driver interface data : buffer for BSSID (ETH_ALEN = 6 bytes)
Returns: 0 on success, -1 on failure
Query kernel driver for the current BSSID and copy it to bssid. Setting bssid to 00:00:00:00:00:00 is recommended if the STA is not associated.
| int(* wpa_driver_ops::get_capa) (void *priv, struct wpa_driver_capa *capa) |
get_capa - Get driver capabilities : private driver interface data
Returns: 0 on success, -1 on failure
Get driver/firmware/hardware capabilities.
| struct hostapd_hw_modes*(* wpa_driver_ops::get_hw_feature_data) (void *priv, u16 *num_modes, u16 *flags) |
get_hw_feature_data - Get hardware support data (channels and rates) : Private driver interface data : Variable for returning the number of returned modes flags: Variable for returning hardware feature flags Returns: Pointer to allocated hardware data on success or NULL on failure.
Caller is responsible for freeing this.
| unsigned int(* wpa_driver_ops::get_ifindex) (void *priv) |
get_ifindex - Get interface index : private driver interface data
Returns: Interface index
| const char*(* wpa_driver_ops::get_ifname) (void *priv) |
get_ifname - Get interface name : private driver interface data
Returns: Pointer to the interface name. This can differ from the interface name used in init() call. Init() is called first.
This optional function can be used to allow the driver interface to replace the interface name with something else, e.g., based on an interface mapping from a more descriptive name.
| const u8*(* wpa_driver_ops::get_mac_addr) (void *priv) |
get_mac_addr - Get own MAC address : private driver interface data
Returns: Pointer to own MAC address or NULL on failure
This optional function can be used to get the own MAC address of the device from the driver interface code. This is only needed if the l2_packet implementation for the OS does not provide easy access to a MAC address.
| int(* wpa_driver_ops::get_noa) (void *priv, u8 *buf, size_t buf_len) |
get_noa - Get current Notice of Absence attribute payload : Private driver interface data : Buffer for returning NoA : Buffer length in octets Returns: Number of octets used in buf, 0 to indicate no NoA is being advertized, or -1 on failure
This function is used to fetch the current Notice of Absence attribute value from GO.
| int(* wpa_driver_ops::get_pref_freq_list) (void *priv, enum wpa_driver_if_type if_type, unsigned int *num, unsigned int *freq_list) |
get_pref_freq_list - Get preferred frequency list for an interface : Private driver interface data : Interface type : Number of channels : Preferred channel frequency list encoded in MHz values Returns 0 on success, -1 on failure
This command can be used to query the preferred frequency list from the driver specific to a particular interface type.
| const char*(* wpa_driver_ops::get_radio_name) (void *priv) |
get_radio_name - Get physical radio name for the device : Private driver interface data Returns: Radio name or NULL if not known
The returned data must not be modified by the caller. It is assumed that any interface that has the same radio name as another is sharing the same physical radio. This information can be used to share scan results etc. information between the virtual interfaces to speed up various operations.
| struct wpa_scan_results*(* wpa_driver_ops::get_scan_results2) (void *priv) |
get_scan_results2 - Fetch the latest scan results : private driver interface data
Returns: Allocated buffer of scan results (caller is responsible for freeing the data structure) on success, NULL on failure
| int(* wpa_driver_ops::get_seqnum) (const char *ifname, void *priv, const u8 *addr, int idx, u8 *seq) |
get_seqnum - Fetch the current TSC/packet number (AP only) : The interface name (main or virtual) : Private driver interface data : MAC address of the station or NULL for group keys : Key index : Buffer for returning the latest used TSC/packet number Returns: 0 on success, -1 on failure
This function is used to fetch the last used TSC/packet number for a TKIP, CCMP, GCMP, or BIP/IGTK key. It is mainly used with group keys, so there is no strict requirement on implementing support for unicast keys (i.e., addr != NULL).
| int(* wpa_driver_ops::get_ssid) (void *priv, u8 *ssid) |
get_ssid - Get the current SSID : private driver interface data : buffer for SSID (at least 32 bytes)
Returns: Length of the SSID on success, -1 on failure
Query kernel driver for the current SSID and copy it to ssid. Returning zero is recommended if the STA is not associated.
Note: SSID is an array of octets, i.e., it is not nul terminated and can, at least in theory, contain control characters (including nul) and as such, should be processed as binary data, not a printable string.
| int(* wpa_driver_ops::get_survey) (void *priv, unsigned int freq) |
get_survey - Retrieve survey data : Private driver interface data : If set, survey data for the specified frequency is only being requested.
If not set, all survey data is requested. Returns: 0 on success, -1 on failure
Use this to retrieve:
This data can be used for spectrum heuristics. One example is Automatic Channel Selection (ACS). The channel survey data is kept on a linked list on the channel data, one entry is added for each survey. The min_nf of the channel is updated for each survey.
| void(* wpa_driver_ops::global_deinit) (void *priv) |
global_deinit - Global driver deinitialization : private driver global data from global_init()
Terminate any global driver related functionality and free the global data structure.
| void*(* wpa_driver_ops::global_init) (void *ctx) |
global_init - Global driver initialization : wpa_global pointer Returns: Pointer to private data (global), NULL on failure
This optional function is called to initialize the driver wrapper for global data, i.e., data that applies to all interfaces. If this function is implemented, global_deinit() will also need to be implemented to free the private data. The driver will also likely use init2() function instead of init() to get the pointer to global data available to per-interface initializer.
| int(* wpa_driver_ops::hapd_get_ssid) (void *priv, u8 *buf, int len) |
hapd_get_ssid - Get the current SSID (AP only) : Private driver interface data : Buffer for returning the SSID : Maximum length of the buffer Returns: Length of the SSID on success, -1 on failure
This function need not be implemented if the driver uses Beacon template from set_ap() and does not reply to Probe Request frames.
| void*(* wpa_driver_ops::hapd_init) (struct hostapd_data *hapd, struct wpa_init_params *params) |
| int(* wpa_driver_ops::hapd_send_eapol) (void *priv, const u8 *addr, const u8 *data, size_t data_len, int encrypt, const u8 *own_addr, u32 flags) |
hapd_send_eapol - Send an EAPOL packet (AP only) : private driver interface data : Destination MAC address : EAPOL packet starting with IEEE 802.1X header : Length of the EAPOL packet in octets : Whether the frame should be encrypted : Source MAC address : WPA_STA_* flags for the destination station
Returns: 0 on success, -1 on failure
| int(* wpa_driver_ops::hapd_set_countermeasures) (void *priv, int enabled) |
hapd_set_countermeasures - Enable/disable TKIP countermeasures (AP) : Private driver interface data : 1 = countermeasures enabled, 0 = disabled Returns: 0 on success, -1 on failure
This need not be implemented if the driver does not take care of association processing.
| int(* wpa_driver_ops::hapd_set_ssid) (void *priv, const u8 *buf, int len) |
hapd_set_ssid - Set SSID (AP only) : Private driver interface data : SSID : Length of the SSID in octets Returns: 0 on success, -1 on failure
DEPRECATED - use set_ap() instead
| void*(* wpa_driver_ops::init) (void *ctx, const char *ifname) |
init - Initialize driver interface : context to be used when calling wpa_supplicant functions, e.g., wpa_supplicant_event() : interface name, e.g., wlan0
Returns: Pointer to private data, NULL on failure
Initialize driver interface, including event processing for kernel driver events (e.g., associated, scan results, Michael MIC failure). This function can allocate a private configuration data area for , file descriptor, interface name, etc. information that may be needed in future driver operations. If this is not used, non-NULL value will need to be returned because NULL is used to indicate failure. The returned value will be used as 'void *priv' data for all other driver_ops functions.
The main event loop (eloop.c) of wpa_supplicant can be used to register callback for read sockets (eloop_register_read_sock()).
See below for more information about events and wpa_supplicant_event() function.
| void*(* wpa_driver_ops::init2) (void *ctx, const char *ifname, void *global_priv) |
init2 - Initialize driver interface (with global data) : context to be used when calling wpa_supplicant functions, e.g., wpa_supplicant_event() : interface name, e.g., wlan0 : private driver global data from global_init() Returns: Pointer to private data, NULL on failure
This function can be used instead of init() if the driver wrapper uses global data.
| int(* wpa_driver_ops::mlme_setprotection) (void *priv, const u8 *addr, int protect_type, int key_type) |
mlme_setprotection - MLME-SETPROTECTION.request primitive : Private driver interface data : Address of the station for which to set protection (may be NULL for group keys) : MLME_SETPROTECTION_PROTECT_TYPE_* : MLME_SETPROTECTION_KEY_TYPE_* Returns: 0 on success, -1 on failure
This is an optional function that can be used to set the driver to require protection for Tx and/or Rx frames. This uses the layer interface defined in IEEE 802.11i-2004 clause 10.3.22.1 (MLME-SETPROTECTION.request). Many drivers do not use explicit set protection operation; instead, they set protection implicitly based on configured keys.
| void(* wpa_driver_ops::poll) (void *priv) |
poll - Poll driver for association information : private driver interface data
This is an option callback that can be used when the driver does not provide event mechanism for association events. This is called when receiving WPA EAPOL-Key messages that require association information. The driver interface is supposed to generate associnfo event before returning from this callback function. In addition, the driver interface should generate an association event after having sent out associnfo.
| void(* wpa_driver_ops::poll_client) (void *priv, const u8 *own_addr, const u8 *addr, int qos) |
poll_client - Probe (null data or such) the given station : Private driver interface data : MAC address of sending interface : MAC address of the station to probe : Indicates whether station is QoS station
This function is used to verify whether an associated station is still present. This function does not need to be implemented if the driver provides such inactivity polling mechanism.
| int(* wpa_driver_ops::probe_req_report) (void *priv, int report) |
probe_req_report - Request Probe Request frames to be indicated : Private driver interface data : Whether to report received Probe Request frames Returns: 0 on success, -1 on failure (or if not supported)
This command can be used to request the driver to indicate when Probe Request frames are received with EVENT_RX_PROBE_REQ events. Since this operation may require extra resources, e.g., due to less optimal hardware/firmware RX filtering, many drivers may disable Probe Request reporting at least in station mode. This command is used to notify the driver when the Probe Request frames need to be reported, e.g., during remain-on-channel operations.
| int(* wpa_driver_ops::radio_disable) (void *priv, int disabled) |
radio_disable - Disable/enable radio : Private driver interface data : 1=disable 0=enable radio Returns: 0 on success, -1 on failure
This optional command is for testing purposes. It can be used to disable the radio on a testbed device to simulate out-of-radio-range conditions.
| int(* wpa_driver_ops::remain_on_channel) (void *priv, unsigned int freq, unsigned int duration) |
remain_on_channel - Remain awake on a channel : Private driver interface data : Frequency (in MHz) of the channel : Duration in milliseconds Returns: 0 on success, -1 on failure
This command is used to request the driver to remain awake on the specified channel for the specified duration and report received Action frames with EVENT_RX_MGMT events. Optionally, received Probe Request frames may also be requested to be reported by calling probe_req_report(). These will be reported with EVENT_RX_PROBE_REQ.
The driver may not be at the requested channel when this function returns, i.e., the return code is only indicating whether the request was accepted. The caller will need to wait until the EVENT_REMAIN_ON_CHANNEL event indicates that the driver has completed the channel change. This may take some time due to other need for the radio and the caller should be prepared to timing out its wait since there are no guarantees on when this request can be executed.
| int(* wpa_driver_ops::remove_pmkid) (void *priv, const u8 *bssid, const u8 *pmkid) |
remove_pmkid - Remove PMKSA cache entry to the driver : private driver interface data : BSSID for the PMKSA cache entry : PMKID for the PMKSA cache entry
Returns: 0 on success, -1 on failure
This function is called when the supplicant drops a PMKSA cache entry for any reason.
If the driver generates RSN IE, i.e., it does not use wpa_ie in associate(), remove_pmkid() can be used to synchronize PMKSA caches between the driver and wpa_supplicant. If the driver uses wpa_ie from wpa_supplicant, this driver_ops function does not need to be implemented. Likewise, if the driver does not support WPA, this function is not needed.
| int(* wpa_driver_ops::roaming) (void *priv, int allowed, const u8 *bssid) |
roaming - Set roaming policy for driver-based BSS selection : Private driver interface data : Whether roaming within ESS is allowed : Forced BSSID if roaming is disabled or NULL if not set Returns: Length of written status information or -1 on failure
This optional callback can be used to update roaming policy from the associate() command (bssid being set there indicates that the driver should not roam before getting this roaming() call to allow roaming. If the driver does not indicate WPA_DRIVER_FLAGS_BSS_SELECTION capability, roaming policy is handled within wpa_supplicant and there is no need to implement or react to this callback.
| int(* wpa_driver_ops::scan2) (void *priv, struct wpa_driver_scan_params *params) |
scan2 - Request the driver to initiate scan : private driver interface data : Scan parameters
Returns: 0 on success, -1 on failure
Once the scan results are ready, the driver should report scan results event for wpa_supplicant which will eventually request the results with wpa_driver_get_scan_results2().
| int(* wpa_driver_ops::sched_scan) (void *priv, struct wpa_driver_scan_params *params) |
sched_scan - Request the driver to initiate scheduled scan : Private driver interface data : Scan parameters Returns: 0 on success, -1 on failure
This operation should be used for scheduled scan offload to the hardware. Every time scan results are available, the driver should report scan results event for wpa_supplicant which will eventually request the results with wpa_driver_get_scan_results2(). This operation is optional and if not provided or if it returns -1, we fall back to normal host-scheduled scans.
| int(* wpa_driver_ops::send_action) (void *priv, unsigned int freq, unsigned int wait, const u8 *dst, const u8 *src, const u8 *bssid, const u8 *data, size_t data_len, int no_cck) |
send_action - Transmit an Action frame : Private driver interface data : Frequency (in MHz) of the channel : Time to wait off-channel for a response (in ms), or zero : Destination MAC address (Address 1) : Source MAC address (Address 2) : BSSID (Address 3) : Frame body : data length in octets @ : Whether CCK rates must not be used to transmit this frame Returns: 0 on success, -1 on failure
This command can be used to request the driver to transmit an action frame to the specified destination.
If the WPA_DRIVER_FLAGS_OFFCHANNEL_TX flag is set, the frame will be transmitted on the given channel and the device will wait for a response on that channel for the given wait time.
If the flag is not set, the wait time will be ignored. In this case, if a remain-on-channel duration is in progress, the frame must be transmitted on that channel; alternatively the frame may be sent on the current operational channel (if in associated state in station mode or while operating as an AP.)
| void(* wpa_driver_ops::send_action_cancel_wait) (void *priv) |
send_action_cancel_wait - Cancel action frame TX wait : Private driver interface data
This command cancels the wait time associated with sending an action frame. It is only available when WPA_DRIVER_FLAGS_OFFCHANNEL_TX is set in the driver flags.
| int(* wpa_driver_ops::send_frame) (void *priv, const u8 *data, size_t data_len, int encrypt) |
send_frame - Send IEEE 802.11 frame (testing use only) : Private driver interface data : IEEE 802.11 frame with IEEE 802.11 header : Size of the frame : Whether to encrypt the frame (if keys are set) Returns: 0 on success, -1 on failure
This function is only used for debugging purposes and is not required to be implemented for normal operations.
| int(* wpa_driver_ops::send_tdls_mgmt) (void *priv, const u8 *dst, u8 action_code, u8 dialog_token, u16 status_code, u32 peer_capab, int initiator, const u8 *buf, size_t len) |
send_tdls_mgmt - for sending TDLS management packets : private driver interface data : Destination (peer) MAC address : TDLS action code for the mssage : Dialog Token to use in the message (if needed) : Status Code or Reason Code to use (if needed) : TDLS peer capability (TDLS_PEER_* bitfield) : Is the current end the TDLS link initiator : TDLS IEs to add to the message : Length of buf in octets Returns: 0 on success, negative (<0) on failure
This optional function can be used to send packet to driver which is responsible for receiving and sending all TDLS packets.
| int(* wpa_driver_ops::set_acl) (void *priv, struct hostapd_acl_params *params) |
set_acl - Set ACL in AP mode : Private driver interface data : Parameters to configure ACL Returns: 0 on success, -1 on failure
This is used only for the drivers which support MAC address ACL.
| int(* wpa_driver_ops::set_ap) (void *priv, struct wpa_driver_ap_params *params) |
set_ap - Set Beacon and Probe Response information for AP mode : Private driver interface data : Parameters to use in AP mode
This function is used to configure Beacon template and/or extra IEs to add for Beacon and Probe Response frames for the driver in AP mode. The driver is responsible for building the full Beacon frame by concatenating the head part with TIM IE generated by the driver/firmware and finishing with the tail part. Depending on the driver architectue, this can be done either by using the full template or the set of additional IEs (e.g., WPS and P2P IE). Similarly, Probe Response processing depends on the driver design. If the driver (or firmware) takes care of replying to Probe Request frames, the extra IEs provided here needs to be added to the Probe Response frames.
Returns: 0 on success, -1 on failure
| int(* wpa_driver_ops::set_ap_wps_ie) (void *priv, const struct wpabuf *beacon, const struct wpabuf *proberesp, const struct wpabuf *assocresp) |
set_ap_wps_ie - Add WPS IE(s) into Beacon/Probe Response frames (AP) : Private driver interface data : WPS IE(s) for Beacon frames or NULL to remove extra IE(s) : WPS IE(s) for Probe Response frames or NULL to remove extra IE(s) : WPS IE(s) for (Re)Association Response frames or NULL to remove extra IE(s) Returns: 0 on success, -1 on failure
This is an optional function to add WPS IE in the kernel driver for Beacon and Probe Response frames. This can be left undefined (set to NULL) if the driver uses the Beacon template from set_ap() and does not process Probe Request frames. If the driver takes care of (Re)Association frame processing, the assocresp buffer includes WPS IE(s) that need to be added to (Re)Association Response frames whenever a (Re)Association Request frame indicated use of WPS.
This will also be used to add P2P IE(s) into Beacon/Probe Response frames when operating as a GO. The driver is responsible for adding timing related attributes (e.g., NoA) in addition to the IEs included here by appending them after these buffers. This call is also used to provide Probe Response IEs for P2P Listen state operations for drivers that generate the Probe Response frames internally.
DEPRECATED - use set_ap() instead
| int(* wpa_driver_ops::set_authmode) (void *priv, int authmode) |
set_authmode - Set authentication algorithm(s) for static WEP : Private driver interface data : 1=Open System, 2=Shared Key, 3=both Returns: 0 on success, -1 on failure
This function can be used to set authentication algorithms for AP mode when static WEP is used. If the driver uses user space MLME/SME implementation, there is no need to implement this function.
DEPRECATED - use set_ap() instead
| int(* wpa_driver_ops::set_countermeasures) (void *priv, int enabled) |
set_countermeasures - Enable/disable TKIP countermeasures : private driver interface data : 1 = countermeasures enabled, 0 = disabled
Returns: 0 on success, -1 on failure
Configure TKIP countermeasures. When these are enabled, the driver should drop all received and queued frames that are using TKIP.
| int(* wpa_driver_ops::set_country) (void *priv, const char *alpha2) |
set_country - Set country : Private driver interface data : country to which to switch to Returns: 0 on success, -1 on failure
This function is for drivers which support some form of setting a regulatory domain.
| int(* wpa_driver_ops::set_default_scan_ies) (void *priv, const u8 *ies, size_t ies_len) |
set_default_scan_ies - Set default scan IEs : Private driver interface data : Scan default IEs buffer : Length of IEs in bytes Returns: 0 on success or -1 on failure
The driver can use these by default when there are no scan IEs coming in the subsequent scan requests. Also in case of one or more of IEs given in set_default_scan_ies() are missing in the subsequent scan request, the driver should merge the missing scan IEs in the scan request from the IEs set by set_default_scan_ies() in the Probe Request frames sent.
| int(* wpa_driver_ops::set_generic_elem) (void *priv, const u8 *elem, size_t elem_len) |
set_generic_elem - Add IEs into Beacon/Probe Response frames (AP) : Private driver interface data : Information elements : Length of the elem buffer in octets Returns: 0 on success, -1 on failure
This is an optional function to add information elements in the kernel driver for Beacon and Probe Response frames. This can be left undefined (set to NULL) if the driver uses the Beacon template from set_ap().
DEPRECATED - use set_ap() instead
| int(* wpa_driver_ops::set_ieee8021x) (void *priv, struct wpa_bss_params *params) |
set_ieee8021x - Enable/disable IEEE 802.1X support (AP only) : Private driver interface data : BSS parameters Returns: 0 on success, -1 on failure
This is an optional function to configure the kernel driver to enable/disable IEEE 802.1X support and set WPA/WPA2 parameters. This can be left undefined (set to NULL) if IEEE 802.1X support is always enabled and the driver uses set_ap() to set WPA/RSN IE for Beacon frames.
DEPRECATED - use set_ap() instead
| int(* wpa_driver_ops::set_key) (const char *ifname, void *priv, enum wpa_alg alg, const u8 *addr, int key_idx, int set_tx, const u8 *seq, size_t seq_len, const u8 *key, size_t key_len) |
set_key - Configure encryption key : Interface name (for multi-SSID/VLAN support) : private driver interface data : encryption algorithm (WPA_ALG_NONE, WPA_ALG_WEP, WPA_ALG_TKIP, WPA_ALG_CCMP, WPA_ALG_IGTK, WPA_ALG_PMK, WPA_ALG_GCMP, WPA_ALG_GCMP_256, WPA_ALG_CCMP_256, WPA_ALG_BIP_GMAC_128, WPA_ALG_BIP_GMAC_256, WPA_ALG_BIP_CMAC_256); WPA_ALG_NONE clears the key.
: Address of the peer STA (BSSID of the current AP when setting pairwise key in station mode), ff:ff:ff:ff:ff:ff for broadcast keys, NULL for default keys that are used both for broadcast and unicast; when clearing keys, NULL is used to indicate that both the broadcast-only and default key of the specified key index is to be cleared : key index (0..3), usually 0 for unicast keys; 0..4095 for IGTK : configure this key as the default Tx key (only used when driver does not support separate unicast/individual key : sequence number/packet number, seq_len octets, the next packet number to be used for in replay protection; configured for Rx keys (in most cases, this is only used with broadcast keys and set to zero for unicast keys); NULL if not set : length of the seq, depends on the algorithm: TKIP: 6 octets, CCMP/GCMP: 6 octets, IGTK: 6 octets : key buffer; TKIP: 16-byte temporal key, 8-byte Tx Mic key, 8-byte Rx Mic Key : length of the key buffer in octets (WEP: 5 or 13, TKIP: 32, CCMP/GCMP: 16, IGTK: 16)
Returns: 0 on success, -1 on failure
Configure the given key for the kernel driver. If the driver supports separate individual keys (4 default keys + 1 individual), addr can be used to determine whether the key is default or individual. If only 4 keys are supported, the default key with key index 0 is used as the individual key. STA must be configured to use it as the default Tx key (set_tx is set) and accept Rx for all the key indexes. In most cases, WPA uses only key indexes 1 and 2 for broadcast keys, so key index 0 is available for this kind of configuration.
Please note that TKIP keys include separate TX and RX MIC keys and some drivers may expect them in different order than wpa_supplicant is using. If the TX/RX keys are swapped, all TKIP encrypted packets will trigger Michael MIC errors. This can be fixed by changing the order of MIC keys by swapping te bytes 16..23 and 24..31 of the key in driver_*.c set_key() implementation, see driver_ndis.c for an example on how this can be done.
| int(* wpa_driver_ops::set_noa) (void *priv, u8 count, int start, int duration) |
set_noa - Set Notice of Absence parameters for GO (testing) : Private driver interface data : Count : Start time in ms from next TBTT : Duration in ms Returns: 0 on success or -1 on failure
This function is used to set Notice of Absence parameters for GO. It is used only for testing. To disable NoA, all parameters are set to 0.
| int(* wpa_driver_ops::set_operstate) (void *priv, int state) |
set_operstate - Sets device operating state to DORMANT or UP : private driver interface data : 0 = dormant, 1 = up Returns: 0 on success, -1 on failure
This is an optional function that can be used on operating systems that support a concept of controlling network device state from user space applications. This function, if set, gets called with state = 1 when authentication has been completed and with state = 0 when connection is lost.
| int(* wpa_driver_ops::set_p2p_powersave) (void *priv, int legacy_ps, int opp_ps, int ctwindow) |
set_p2p_powersave - Set P2P power save options : Private driver interface data : 0 = disable, 1 = enable, 2 = maximum PS, -1 = no change : 0 = disable, 1 = enable, -1 = no change : 0.
. = change (msec), -1 = no change Returns: 0 on success or -1 on failure
| int(* wpa_driver_ops::set_param) (void *priv, const char *param) |
set_param - Set driver configuration parameters : private driver interface data from init()
| int(* wpa_driver_ops::set_privacy) (void *priv, int enabled) |
set_privacy - Enable/disable privacy (AP only) : Private driver interface data : 1 = privacy enabled, 0 = disabled Returns: 0 on success, -1 on failure
This is an optional function to configure privacy field in the kernel driver for Beacon frames. This can be left undefined (set to NULL) if the driver uses the Beacon template from set_ap().
DEPRECATED - use set_ap() instead
| int(* wpa_driver_ops::set_prob_oper_freq) (void *priv, unsigned int freq) |
set_prob_oper_freq - Indicate probable P2P operating channel : Private driver interface data : Channel frequency in MHz Returns 0 on success, -1 on failure
This command can be used to inform the driver of the operating frequency that an ongoing P2P group formation is likely to come up on. Local device is assuming P2P Client role.
| void(* wpa_driver_ops::set_rekey_info) (void *priv, const u8 *kek, size_t kek_len, const u8 *kck, size_t kck_len, const u8 *replay_ctr) |
set_rekey_info - Set rekey information : Private driver interface data : Current KEK : KEK length in octets : Current KCK : KCK length in octets : Current EAPOL-Key Replay Counter
This optional function can be used to provide information for the driver/firmware to process EAPOL-Key frames in Group Key Handshake while the host (including wpa_supplicant) is sleeping.
| int(* wpa_driver_ops::set_sta_vlan) (void *priv, const u8 *addr, const char *ifname, int vlan_id) |
set_sta_vlan - Bind a station into a specific interface (AP only) : Private driver interface data : Interface (main or virtual BSS or VLAN) : MAC address of the associated station : VLAN ID Returns: 0 on success, -1 on failure
This function is used to bind a station to a specific virtual interface. It is only used if when virtual interfaces are supported, e.g., to assign stations to different VLAN interfaces based on information from a RADIUS server. This allows separate broadcast domains to be used with a single BSS.
| int(* wpa_driver_ops::set_tdls_mode) (void *priv, int tdls_external_control) |
set_tdls_mode - Set TDLS trigger mode to the host driver : Private driver interface data : Represents if TDLS external trigger control mode is enabled/disabled.
This optional callback can be used to configure the TDLS external trigger control mode to the host driver.
| int(* wpa_driver_ops::set_wds_sta) (void *priv, const u8 *addr, int aid, int val, const char *bridge_ifname, char *ifname_wds) |
set_wds_sta - Bind a station into a 4-address WDS (AP only) : Private driver interface data : MAC address of the associated station : Association ID : 1 = bind to 4-address WDS; 0 = unbind : Bridge interface to use for the WDS station or NULL to indicate that bridge is not to be used : Buffer to return the interface name for the new WDS station or NULL to indicate name is not returned.
Returns: 0 on success, -1 on failure
| int(* wpa_driver_ops::signal_monitor) (void *priv, int threshold, int hysteresis) |
signal_monitor - Set signal monitoring parameters : Private driver interface data : Threshold value for signal change events; 0 = disabled : Minimum change in signal strength before indicating a new event Returns: 0 on success, -1 on failure (or if not supported)
This function can be used to configure monitoring of signal strength with the current AP. Whenever signal strength drops below the threshold value or increases above it, EVENT_SIGNAL_CHANGE event should be generated assuming the signal strength has changed at least hysteresis from the previously indicated signal change event.
| int(* wpa_driver_ops::sta_add) (void *priv, struct hostapd_sta_add_params *params) |
sta_add - Add a station entry : Private driver interface data : Station parameters Returns: 0 on success, -1 on failure
This function is used to add or set (params->set 1) a station entry in the driver. Adding STA entries is used only if the driver does not take care of association processing.
With drivers that don't support full AP client state, this function is used to add a station entry to the driver once the station has completed association.
With TDLS, this function is used to add or set (params->set 1) TDLS peer entries (even with drivers that do not support full AP client state).
| int(* wpa_driver_ops::sta_assoc) (void *priv, const u8 *own_addr, const u8 *addr, int reassoc, u16 status, const u8 *ie, size_t len) |
sta_assoc - Station association indication : Private driver interface data : Source address and BSSID for association frame : MAC address of the station to associate : flag to indicate re-association : association response status code : assoc response ie buffer : ie buffer length Returns: 0 on success, -1 on failure
This function indicates the driver to send (Re)Association Response frame to the station.
| int(* wpa_driver_ops::sta_auth) (void *priv, const u8 *own_addr, const u8 *addr, u16 seq, u16 status, const u8 *ie, size_t len) |
sta_auth - Station authentication indication : Private driver interface data : Source address and BSSID for authentication frame : MAC address of the station to associate : authentication sequence number : authentication response status code : authentication frame ie buffer : ie buffer length
This function indicates the driver to send Authentication frame to the station.
| int(* wpa_driver_ops::sta_deauth) (void *priv, const u8 *own_addr, const u8 *addr, int reason) |
sta_deauth - Deauthenticate a station (AP only) : Private driver interface data : Source address and BSSID for the Deauthentication frame : MAC address of the station to deauthenticate : Reason code for the Deauthentiation frame Returns: 0 on success, -1 on failure
This function requests a specific station to be deauthenticated and a Deauthentication frame to be sent to it.
| int(* wpa_driver_ops::sta_disassoc) (void *priv, const u8 *own_addr, const u8 *addr, int reason) |
sta_disassoc - Disassociate a station (AP only) : Private driver interface data : Source address and BSSID for the Disassociation frame : MAC address of the station to disassociate : Reason code for the Disassociation frame Returns: 0 on success, -1 on failure
This function requests a specific station to be disassociated and a Disassociation frame to be sent to it.
| int(* wpa_driver_ops::stop_ap) (void *priv) |
stop_ap - Removes beacon from AP : Private driver interface data Returns: 0 on success, -1 on failure (or if not supported)
This optional function can be used to disable AP mode related configuration. Unlike deinit_ap, it does not change to station mode.
| int(* wpa_driver_ops::stop_sched_scan) (void *priv) |
stop_sched_scan - Request the driver to stop a scheduled scan : Private driver interface data Returns: 0 on success, -1 on failure
This should cause the scheduled scan to be stopped and results should stop being sent. Must be supported if sched_scan is supported.
| int(* wpa_driver_ops::switch_channel) (void *priv, struct csa_settings *settings) |
switch_channel - Announce channel switch and migrate the GO to the given frequency : Private driver interface data : Settings for CSA period and new channel Returns: 0 on success, -1 on failure
This function is used to move the GO to the legacy STA channel to avoid frequency conflict in single channel concurrency.
| int(* wpa_driver_ops::tdls_disable_channel_switch) (void *priv, const u8 *addr) |
Disable channel switching with TDLS peer : Private driver interface data : MAC address of the TDLS peer Returns: 0 on success, -1 on failure.
This function indicates to the driver that it should stop switching with a given TDLS peer.
| int(* wpa_driver_ops::tdls_enable_channel_switch) (void *priv, const u8 *addr, u8 oper_class, const struct hostapd_freq_params *params) |
Enable channel-switching with TDLS peer : Private driver interface data : MAC address of the TDLS peer : Operating class of the switch channel : Channel specification Returns: 0 on success, -1 on failure.
The function indicates to driver that it can start switching to a different channel with a specified TDLS peer. The switching is assumed on until canceled with tdls_disable_channel_switch().
| int(* wpa_driver_ops::tdls_oper) (void *priv, enum tdls_oper oper, const u8 *peer) |
tdls_oper - Ask the driver to perform high-level TDLS operations : Private driver interface data : TDLS high-level operation.
See enum tdls_oper : Destination (peer) MAC address Returns: 0 on success, negative (<0) on failure
This optional function can be used to send high-level TDLS commands to the driver.
| int(* wpa_driver_ops::update_ft_ies) (void *priv, const u8 *md, const u8 *ies, size_t ies_len) |
update_ft_ies - Update FT (IEEE 802.11r) IEs : Private driver interface data : Mobility domain (2 octets) (also included inside ies) : FT IEs (MDIE, FTIE, ...) or NULL to remove IEs : Length of FT IEs in bytes Returns: 0 on success, -1 on failure
The supplicant uses this callback to let the driver know that keying material for FT is available and that the driver can use the provided IEs in the next message in FT authentication sequence.
This function is only needed for driver that support IEEE 802.11r (Fast BSS Transition).
| int(* wpa_driver_ops::vendor_cmd) (void *priv, unsigned int vendor_id, unsigned int subcmd, const u8 *data, size_t data_len, struct wpabuf *buf) |
vendor_cmd - Execute vendor specific command : Private driver interface data : Vendor id : Vendor command id : Vendor command parameters (NULL if no parameters) : Data length : Return buffer (NULL to ignore reply) Returns: 0 on success, negative (<0) on failure
This function handles vendor specific commands that are passed to the driver/device. The command is identified by vendor id and command id. Parameters can be passed as argument to the command in the data buffer. Reply (if any) will be filled in the supplied return buffer.
The exact driver behavior is driver interface and vendor specific. As an example, this will be converted to a vendor specific cfg80211 command in case of the nl80211 driver interface.
| int(* wpa_driver_ops::wnm_oper) (void *priv, enum wnm_oper oper, const u8 *peer, u8 *buf, u16 *buf_len) |
wnm_oper - Notify driver of the WNM frame reception : Private driver interface data : WNM operation.
See enum wnm_oper : Destination (peer) MAC address : Buffer for the driver to fill in (for getting IE) : Return the len of buf Returns: 0 on success, negative (<0) on failure
1.8.12