wpa_supplicant / hostapd  2.5
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Macros | Functions | Variables
wpa_supplicant.c File Reference

WPA Supplicant. More...

#include "includes.h"
#include "common.h"
#include "crypto/random.h"
#include "crypto/sha1.h"
#include "eapol_supp/eapol_supp_sm.h"
#include "eap_peer/eap.h"
#include "eap_peer/eap_proxy.h"
#include "eap_server/eap_methods.h"
#include "rsn_supp/wpa.h"
#include "eloop.h"
#include "config.h"
#include "utils/ext_password.h"
#include "l2_packet/l2_packet.h"
#include "wpa_supplicant_i.h"
#include "driver_i.h"
#include "ctrl_iface.h"
#include "pcsc_funcs.h"
#include "common/version.h"
#include "rsn_supp/preauth.h"
#include "rsn_supp/pmksa_cache.h"
#include "common/wpa_ctrl.h"
#include "common/ieee802_11_defs.h"
#include "common/hw_features_common.h"
#include "p2p/p2p.h"
#include "fst/fst.h"
#include "blacklist.h"
#include "wpas_glue.h"
#include "wps_supplicant.h"
#include "ibss_rsn.h"
#include "sme.h"
#include "gas_query.h"
#include "ap.h"
#include "p2p_supplicant.h"
#include "wifi_display.h"
#include "notify.h"
#include "bgscan.h"
#include "autoscan.h"
#include "bss.h"
#include "scan.h"
#include "offchannel.h"
#include "hs20_supplicant.h"
#include "wnm_sta.h"
#include "wpas_kay.h"
#include "mesh.h"

Macros

#define WPA_SUPPLICANT_CLEANUP_INTERVAL   10
 

Functions

int wpa_set_wep_keys (struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid)
 
int wpa_supplicant_set_wpa_none_key (struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid)
 
void wpa_supplicant_req_auth_timeout (struct wpa_supplicant *wpa_s, int sec, int usec)
 Schedule a timeout for authentication. More...
 
void wpa_supplicant_cancel_auth_timeout (struct wpa_supplicant *wpa_s)
 Cancel authentication timeout. More...
 
void wpa_supplicant_initiate_eapol (struct wpa_supplicant *wpa_s)
 Configure EAPOL state machine. More...
 
void wpa_supplicant_set_non_wpa_policy (struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid)
 Set WPA parameters to non-WPA mode. More...
 
void free_hw_features (struct wpa_supplicant *wpa_s)
 
void wpa_clear_keys (struct wpa_supplicant *wpa_s, const u8 *addr)
 Clear keys configured for the driver. More...
 
const char * wpa_supplicant_state_txt (enum wpa_states state)
 Get the connection state name as a text string. More...
 
void wpa_supplicant_reinit_autoscan (struct wpa_supplicant *wpa_s)
 
void wpa_supplicant_set_state (struct wpa_supplicant *wpa_s, enum wpa_states state)
 Set current connection state. More...
 
void wpa_supplicant_terminate_proc (struct wpa_global *global)
 
void wpa_supplicant_clear_status (struct wpa_supplicant *wpa_s)
 
int wpa_supplicant_reload_configuration (struct wpa_supplicant *wpa_s)
 Reload configuration data. More...
 
int wpa_supplicant_set_suites (struct wpa_supplicant *wpa_s, struct wpa_bss *bss, struct wpa_ssid *ssid, u8 *wpa_ie, size_t *wpa_ie_len)
 Set authentication and encryption parameters. More...
 
int wpas_build_ext_capab (struct wpa_supplicant *wpa_s, u8 *buf, size_t buflen)
 
int wpas_valid_bss_ssid (struct wpa_supplicant *wpa_s, struct wpa_bss *test_bss, struct wpa_ssid *test_ssid)
 
void wpas_connect_work_free (struct wpa_connect_work *cwork)
 
void wpas_connect_work_done (struct wpa_supplicant *wpa_s)
 
int wpas_update_random_addr (struct wpa_supplicant *wpa_s, int style)
 
int wpas_update_random_addr_disassoc (struct wpa_supplicant *wpa_s)
 
void wpa_supplicant_associate (struct wpa_supplicant *wpa_s, struct wpa_bss *bss, struct wpa_ssid *ssid)
 Request association. More...
 
void ibss_mesh_setup_freq (struct wpa_supplicant *wpa_s, const struct wpa_ssid *ssid, struct hostapd_freq_params *freq)
 
void wpa_supplicant_deauthenticate (struct wpa_supplicant *wpa_s, int reason_code)
 Deauthenticate the current connection. More...
 
void wpa_supplicant_enable_network (struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid)
 Mark a configured network as enabled. More...
 
void wpa_supplicant_disable_network (struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid)
 Mark a configured network as disabled. More...
 
void wpa_supplicant_select_network (struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid)
 Attempt association with a network. More...
 
int wpas_set_pkcs11_engine_and_module_path (struct wpa_supplicant *wpa_s, const char *pkcs11_engine_path, const char *pkcs11_module_path)
 Set PKCS #11 engine and module path. More...
 
int wpa_supplicant_set_ap_scan (struct wpa_supplicant *wpa_s, int ap_scan)
 Set AP scan mode for interface. More...
 
int wpa_supplicant_set_bss_expiration_age (struct wpa_supplicant *wpa_s, unsigned int bss_expire_age)
 Set BSS entry expiration age. More...
 
int wpa_supplicant_set_bss_expiration_count (struct wpa_supplicant *wpa_s, unsigned int bss_expire_count)
 Set BSS entry expiration scan count. More...
 
int wpa_supplicant_set_scan_interval (struct wpa_supplicant *wpa_s, int scan_interval)
 Set scan interval. More...
 
int wpa_supplicant_set_debug_params (struct wpa_global *global, int debug_level, int debug_timestamp, int debug_show_keys)
 Set global debug params. More...
 
struct wpa_ssidwpa_supplicant_get_ssid (struct wpa_supplicant *wpa_s)
 Get a pointer to the current network structure. More...
 
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. More...
 
int wpa_supplicant_update_mac_addr (struct wpa_supplicant *wpa_s)
 
int wpa_supplicant_driver_init (struct wpa_supplicant *wpa_s)
 Initialize driver interface parameters. More...
 
int wpas_init_ext_pw (struct wpa_supplicant *wpa_s)
 
void radio_remove_works (struct wpa_supplicant *wpa_s, const char *type, int remove_all)
 
void radio_work_check_next (struct wpa_supplicant *wpa_s)
 
int radio_add_work (struct wpa_supplicant *wpa_s, unsigned int freq, const char *type, int next, void(*cb)(struct wpa_radio_work *work, int deinit), void *ctx)
 Add a radio work item. More...
 
void radio_work_done (struct wpa_radio_work *work)
 Indicate that a radio work item has been completed. More...
 
struct wpa_radio_workradio_work_pending (struct wpa_supplicant *wpa_s, const char *type)
 
struct wpa_supplicantwpa_supplicant_add_iface (struct wpa_global *global, struct wpa_interface *iface, struct wpa_supplicant *parent)
 Add a new network interface. More...
 
int wpa_supplicant_remove_iface (struct wpa_global *global, struct wpa_supplicant *wpa_s, int terminate)
 Remove a network interface. More...
 
const char * wpa_supplicant_get_eap_mode (struct wpa_supplicant *wpa_s)
 Get the current EAP mode. More...
 
struct wpa_supplicantwpa_supplicant_get_iface (struct wpa_global *global, const char *ifname)
 Get a new network interface. More...
 
struct wpa_globalwpa_supplicant_init (struct wpa_params *params)
 Initialize wpa_supplicant. More...
 
int wpa_supplicant_run (struct wpa_global *global)
 Run the wpa_supplicant main event loop. More...
 
void wpa_supplicant_deinit (struct wpa_global *global)
 Deinitialize wpa_supplicant. More...
 
void wpa_supplicant_update_config (struct wpa_supplicant *wpa_s)
 
void add_freq (int *freqs, int *num_freqs, int freq)
 
void wpas_connection_failed (struct wpa_supplicant *wpa_s, const u8 *bssid)
 
int wpas_driver_bss_selection (struct wpa_supplicant *wpa_s)
 
int wpa_supplicant_ctrl_iface_ctrl_rsp_handle (struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid, const char *field, const char *value)
 Handle a control response. More...
 
int wpas_network_disabled (struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid)
 
int wpas_get_ssid_pmf (struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid)
 
int wpas_is_p2p_prioritized (struct wpa_supplicant *wpa_s)
 
void wpas_auth_failed (struct wpa_supplicant *wpa_s, char *reason)
 
void wpas_clear_temp_disabled (struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid, int clear_failures)
 
int disallowed_bssid (struct wpa_supplicant *wpa_s, const u8 *bssid)
 
int disallowed_ssid (struct wpa_supplicant *wpa_s, const u8 *ssid, size_t ssid_len)
 
void wpas_request_connection (struct wpa_supplicant *wpa_s)
 Request a new connection. More...
 
void dump_freq_data (struct wpa_supplicant *wpa_s, const char *title, struct wpa_used_freq_data *freqs_data, unsigned int len)
 
int get_shared_radio_freqs_data (struct wpa_supplicant *wpa_s, struct wpa_used_freq_data *freqs_data, unsigned int len)
 
int get_shared_radio_freqs (struct wpa_supplicant *wpa_s, int *freq_array, unsigned int len)
 
void wpas_rrm_reset (struct wpa_supplicant *wpa_s)
 
void wpas_rrm_process_neighbor_rep (struct wpa_supplicant *wpa_s, const u8 *report, size_t report_len)
 
int wpas_rrm_send_neighbor_rep_request (struct wpa_supplicant *wpa_s, const struct wpa_ssid *ssid, void(*cb)(void *ctx, struct wpabuf *neighbor_rep), void *cb_ctx)
 Request a neighbor report from our AP. More...
 
void wpas_rrm_handle_link_measurement_request (struct wpa_supplicant *wpa_s, const u8 *src, const u8 *frame, size_t len, int rssi)
 

Variables

const char *const wpa_supplicant_version
 
const char *const wpa_supplicant_license
 
const char *const wpa_supplicant_full_license1
 
const char *const wpa_supplicant_full_license2
 
const char *const wpa_supplicant_full_license3
 
const char *const wpa_supplicant_full_license4
 
const char *const wpa_supplicant_full_license5
 

Detailed Description

WPA Supplicant.

This file implements functions for registering and unregistering wpa_supplicant interfaces. In addition, this file contains number of functions for managing network connections.

Function Documentation

int radio_add_work ( struct wpa_supplicant wpa_s,
unsigned int  freq,
const char *  type,
int  next,
void(*)(struct wpa_radio_work *work, int deinit)  cb,
void *  ctx 
)

Add a radio work item.

Parameters
wpa_sPointer to wpa_supplicant data
freqFrequency of the offchannel operation in MHz or 0
typeUnique identifier for each type of work
nextForce as the next work to be executed
cbCallback function for indicating when radio is available
ctxContext pointer for the work (work->ctx in cb())
Returns
0 on success, -1 on failure

This function is used to request time for an operation that requires exclusive radio control. Once the radio is available, the registered callback function will be called. radio_work_done() must be called once the exclusive radio operation has been completed, so that the radio is freed for other operations. The special case of deinit=1 is used to free the context data during interface removal. That does not allow the callback function to start the radio operation, i.e., it must free any resources allocated for the radio work and return.

The freq parameter can be used to indicate a single channel on which the offchannel operation will occur. This may allow multiple radio work operations to be performed in parallel if they apply for the same channel. Setting this to 0 indicates that the work item may use multiple channels or requires exclusive control of the radio.

void radio_work_done ( struct wpa_radio_work work)

Indicate that a radio work item has been completed.

Parameters
workCompleted work

This function is called once the callback function registered with radio_add_work() has completed its work.

void wpa_clear_keys ( struct wpa_supplicant wpa_s,
const u8 *  addr 
)

Clear keys configured for the driver.

Parameters
wpa_sPointer to wpa_supplicant data
addrPreviously used BSSID or NULL if not available

This function clears the encryption keys that has been previously configured for the driver.

struct wpa_supplicant* wpa_supplicant_add_iface ( struct wpa_global global,
struct wpa_interface iface,
struct wpa_supplicant parent 
)

Add a new network interface.

Parameters
globalPointer to global data from wpa_supplicant_init()
ifaceInterface configuration options
parentParent interface or NULL to assign new interface as parent
Returns
Pointer to the created interface or NULL on failure

This function is used to add new network interfaces for wpa_supplicant. This can be called before wpa_supplicant_run() to add interfaces before the main event loop has been started. In addition, new interfaces can be added dynamically while wpa_supplicant is already running. This could happen, e.g., when a hotplug network adapter is inserted.

void wpa_supplicant_associate ( struct wpa_supplicant wpa_s,
struct wpa_bss bss,
struct wpa_ssid ssid 
)

Request association.

Parameters
wpa_sPointer to wpa_supplicant data
bssScan results for the selected BSS, or NULL if not available
ssidConfiguration data for the selected network

This function is used to request wpa_supplicant to associate with a BSS.

void wpa_supplicant_cancel_auth_timeout ( struct wpa_supplicant wpa_s)

Cancel authentication timeout.

Parameters
wpa_sPointer to wpa_supplicant data

This function is used to cancel authentication timeout scheduled with wpa_supplicant_req_auth_timeout() and it is called when authentication has been completed.

int wpa_supplicant_ctrl_iface_ctrl_rsp_handle ( struct wpa_supplicant wpa_s,
struct wpa_ssid ssid,
const char *  field,
const char *  value 
)

Handle a control response.

Parameters
wpa_sPointer to wpa_supplicant data
ssidPointer to the network block the reply is for
fieldfield the response is a reply for
valuevalue (ie, password, etc) for field
Returns
0 on success, non-zero on error

Helper function to handle replies to control interface requests.

void wpa_supplicant_deauthenticate ( struct wpa_supplicant wpa_s,
int  reason_code 
)

Deauthenticate the current connection.

Parameters
wpa_sPointer to wpa_supplicant data
reason_codeIEEE 802.11 reason code for the deauthenticate frame

This function is used to request wpa_supplicant to deauthenticate from the current AP.

void wpa_supplicant_deinit ( struct wpa_global global)

Deinitialize wpa_supplicant.

Parameters
globalPointer to global data from wpa_supplicant_init()

This function is called to deinitialize wpa_supplicant and to free all allocated resources. Remaining network interfaces will also be removed.

void wpa_supplicant_disable_network ( struct wpa_supplicant wpa_s,
struct wpa_ssid ssid 
)

Mark a configured network as disabled.

Parameters
wpa_swpa_supplicant structure for a network interface
ssidwpa_ssid structure for a configured network or NULL

Disables the specified network or all networks if no network specified.

int wpa_supplicant_driver_init ( struct wpa_supplicant wpa_s)

Initialize driver interface parameters.

Parameters
wpa_sPointer to wpa_supplicant data
Returns
0 on success, -1 on failure

This function is called to initialize driver interface parameters. wpa_drv_init() must have been called before this function to initialize the driver interface.

void wpa_supplicant_enable_network ( struct wpa_supplicant wpa_s,
struct wpa_ssid ssid 
)

Mark a configured network as enabled.

Parameters
wpa_swpa_supplicant structure for a network interface
ssidwpa_ssid structure for a configured network or NULL

Enables the specified network or all networks if no network specified.

const char* wpa_supplicant_get_eap_mode ( struct wpa_supplicant wpa_s)

Get the current EAP mode.

Parameters
wpa_sPointer to the network interface
Returns
Pointer to the eap mode or the string "UNKNOWN" if not found
struct wpa_supplicant* wpa_supplicant_get_iface ( struct wpa_global global,
const char *  ifname 
)

Get a new network interface.

Parameters
globalPointer to global data from wpa_supplicant_init()
ifnameInterface name
Returns
Pointer to the interface or NULL if not found
struct wpa_ssid* wpa_supplicant_get_ssid ( struct wpa_supplicant wpa_s)

Get a pointer to the current network structure.

Parameters
wpa_sPointer to wpa_supplicant data
Returns
A pointer to the current network structure or NULL on failure
struct wpa_global* wpa_supplicant_init ( struct wpa_params params)

Initialize wpa_supplicant.

Parameters
paramsParameters for wpa_supplicant
Returns
Pointer to global wpa_supplicant data, or NULL on failure

This function is used to initialize wpa_supplicant. After successful initialization, the returned data pointer can be used to add and remove network interfaces, and eventually, to deinitialize wpa_supplicant.

void wpa_supplicant_initiate_eapol ( struct wpa_supplicant wpa_s)

Configure EAPOL state machine.

Parameters
wpa_sPointer to wpa_supplicant data

This function is used to configure EAPOL state machine based on the selected authentication mode.

int wpa_supplicant_reload_configuration ( struct wpa_supplicant wpa_s)

Reload configuration data.

Parameters
wpa_sPointer to wpa_supplicant data
Returns
0 on success or -1 if configuration parsing failed

This function can be used to request that the configuration data is reloaded (e.g., after configuration file change). This function is reloading configuration only for one interface, so this may need to be called multiple times if wpa_supplicant is controlling multiple interfaces and all interfaces need reconfiguration.

int wpa_supplicant_remove_iface ( struct wpa_global global,
struct wpa_supplicant wpa_s,
int  terminate 
)

Remove a network interface.

Parameters
globalPointer to global data from wpa_supplicant_init()
wpa_sPointer to the network interface to be removed
Returns
0 if interface was removed, -1 if interface was not found

This function can be used to dynamically remove network interfaces from wpa_supplicant, e.g., when a hotplug network adapter is ejected. In addition, this function is used to remove all remaining interfaces when wpa_supplicant is terminated.

void wpa_supplicant_req_auth_timeout ( struct wpa_supplicant wpa_s,
int  sec,
int  usec 
)

Schedule a timeout for authentication.

Parameters
wpa_sPointer to wpa_supplicant data
secNumber of seconds after which to time out authentication
usecNumber of microseconds after which to time out authentication

This function is used to schedule a timeout for the current authentication attempt.

int wpa_supplicant_run ( struct wpa_global global)

Run the wpa_supplicant main event loop.

Parameters
globalPointer to global data from wpa_supplicant_init()
Returns
0 after successful event loop run, -1 on failure

This function starts the main event loop and continues running as long as there are any remaining events. In most cases, this function is running as long as the wpa_supplicant process in still in use.

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
ctxContext pointer (wpa_s); this is the ctx variable registered with struct wpa_driver_ops::init()
src_addrSource address of the EAPOL frame
bufEAPOL data starting from the EAPOL header (i.e., no Ethernet header)
lenLength of the EAPOL data

This function is called for each received EAPOL frame. Most driver interfaces rely on more generic OS mechanism for receiving frames through l2_packet, but if such a mechanism is not available, the driver wrapper may take care of received EAPOL frames and deliver them to the core supplicant code by calling this function.

void wpa_supplicant_select_network ( struct wpa_supplicant wpa_s,
struct wpa_ssid ssid 
)

Attempt association with a network.

Parameters
wpa_swpa_supplicant structure for a network interface
ssidwpa_ssid structure for a configured network or NULL for any network
int wpa_supplicant_set_ap_scan ( struct wpa_supplicant wpa_s,
int  ap_scan 
)

Set AP scan mode for interface.

Parameters
wpa_swpa_supplicant structure for a network interface
ap_scanAP scan mode
Returns
0 if succeed or -1 if ap_scan has an invalid value
int wpa_supplicant_set_bss_expiration_age ( struct wpa_supplicant wpa_s,
unsigned int  bss_expire_age 
)

Set BSS entry expiration age.

Parameters
wpa_swpa_supplicant structure for a network interface
expire_ageExpiration age in seconds
Returns
0 if succeed or -1 if expire_age has an invalid value
int wpa_supplicant_set_bss_expiration_count ( struct wpa_supplicant wpa_s,
unsigned int  bss_expire_count 
)

Set BSS entry expiration scan count.

Parameters
wpa_swpa_supplicant structure for a network interface
expire_countnumber of scans after which an unseen BSS is reclaimed
Returns
0 if succeed or -1 if expire_count has an invalid value
int wpa_supplicant_set_debug_params ( struct wpa_global global,
int  debug_level,
int  debug_timestamp,
int  debug_show_keys 
)

Set global debug params.

Parameters
globalwpa_global structure
debug_leveldebug level
debug_timestampdetermines if show timestamp in debug data
debug_show_keysdetermines if show keys in debug data
Returns
0 if succeed or -1 if debug_level has wrong value
void wpa_supplicant_set_non_wpa_policy ( struct wpa_supplicant wpa_s,
struct wpa_ssid ssid 
)

Set WPA parameters to non-WPA mode.

Parameters
wpa_sPointer to wpa_supplicant data
ssidConfiguration data for the network

This function is used to configure WPA state machine and related parameters to a mode where WPA is not enabled. This is called as part of the authentication configuration when the selected network does not use WPA.

int wpa_supplicant_set_scan_interval ( struct wpa_supplicant wpa_s,
int  scan_interval 
)

Set scan interval.

Parameters
wpa_swpa_supplicant structure for a network interface
scan_intervalscan interval in seconds
Returns
0 if succeed or -1 if scan_interval has an invalid value
void wpa_supplicant_set_state ( struct wpa_supplicant wpa_s,
enum wpa_states  state 
)

Set current connection state.

Parameters
wpa_sPointer to wpa_supplicant data
stateThe new connection state

This function is called whenever the connection state changes, e.g., association is completed for WPA/WPA2 4-Way Handshake is started.

int wpa_supplicant_set_suites ( struct wpa_supplicant wpa_s,
struct wpa_bss bss,
struct wpa_ssid ssid,
u8 *  wpa_ie,
size_t *  wpa_ie_len 
)

Set authentication and encryption parameters.

Parameters
wpa_sPointer to wpa_supplicant data
bssScan results for the selected BSS, or NULL if not available
ssidConfiguration data for the selected network
wpa_ieBuffer for the WPA/RSN IE
wpa_ie_lenMaximum wpa_ie buffer size on input. This is changed to be the used buffer length in case the functions returns success.
Returns
0 on success or -1 on failure

This function is used to configure authentication and encryption parameters based on the network configuration and scan result for the selected BSS (if available).

const char* wpa_supplicant_state_txt ( enum wpa_states  state)

Get the connection state name as a text string.

Parameters
stateState (wpa_state; WPA_*)
Returns
The state name as a printable text string
void wpas_request_connection ( struct wpa_supplicant wpa_s)

Request a new connection.

Parameters
wpa_sPointer to the network interface

This function is used to request a new connection to be found. It will mark the interface to allow reassociation and request a new scan to find a suitable network to connect to.

int wpas_rrm_send_neighbor_rep_request ( struct wpa_supplicant wpa_s,
const struct wpa_ssid ssid,
void(*)(void *ctx, struct wpabuf *neighbor_rep)  cb,
void *  cb_ctx 
)

Request a neighbor report from our AP.

Parameters
wpa_sPointer to wpa_supplicant
ssidif not null, this is sent in the request. Otherwise, no SSID IE is sent in the request.
cbCallback function to be called once the requested report arrives, or timed out after RRM_NEIGHBOR_REPORT_TIMEOUT seconds. In the former case, 'neighbor_rep' is a newly allocated wpabuf, and it's the requester's responsibility to free it. In the latter case NULL will be sent in 'neighbor_rep'.
cb_ctxContext value to send the callback function
Returns
0 in case of success, negative error code otherwise

In case there is a previous request which has not been answered yet, the new request fails. The caller may retry after RRM_NEIGHBOR_REPORT_TIMEOUT. Request must contain a callback function.

int wpas_set_pkcs11_engine_and_module_path ( struct wpa_supplicant wpa_s,
const char *  pkcs11_engine_path,
const char *  pkcs11_module_path 
)

Set PKCS #11 engine and module path.

Parameters
wpa_swpa_supplicant structure for a network interface
pkcs11_engine_pathPKCS #11 engine path or NULL
pkcs11_module_pathPKCS #11 module path or NULL
Returns
0 on success; -1 on failure

Sets the PKCS #11 engine and module path. Both have to be NULL or a valid path. If resetting the EAPOL state machine with the new PKCS #11 engine and module path fails the paths will be reset to the default value (NULL).

Variable Documentation

const char* const wpa_supplicant_full_license1
Initial value:
=
""
const char* const wpa_supplicant_full_license2
Initial value:
=
"This software may be distributed under the terms of the BSD license.\n"
"\n"
"Redistribution and use in source and binary forms, with or without\n"
"modification, are permitted provided that the following conditions are\n"
"met:\n"
"\n"
const char* const wpa_supplicant_full_license3
Initial value:
=
"1. Redistributions of source code must retain the above copyright\n"
" notice, this list of conditions and the following disclaimer.\n"
"\n"
"2. Redistributions in binary form must reproduce the above copyright\n"
" notice, this list of conditions and the following disclaimer in the\n"
" documentation and/or other materials provided with the distribution.\n"
"\n"
const char* const wpa_supplicant_full_license4
Initial value:
=
"3. Neither the name(s) of the above-listed copyright holder(s) nor the\n"
" names of its contributors may be used to endorse or promote products\n"
" derived from this software without specific prior written permission.\n"
"\n"
"THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n"
"\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n"
"LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n"
"A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n"
const char* const wpa_supplicant_full_license5
Initial value:
=
"OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n"
"SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n"
"LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n"
"DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n"
"THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n"
"(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n"
"OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
"\n"
const char* const wpa_supplicant_license
Initial value:
=
"This software may be distributed under the terms of the BSD license.\n"
"See README for more details.\n"
const char* const wpa_supplicant_version
Initial value:
=
"wpa_supplicant v" VERSION_STR "\n"
"Copyright (c) 2003-2015, Jouni Malinen <[email protected]> and contributors"