wpa_supplicant_i.h File Reference

wpa_supplicant - Internal definitions More...

#include "driver.h"

Include dependency graph for wpa_supplicant_i.h:

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

Go to the source code of this file.

Defines

#define BROADCAST_SSID_SCAN   ((struct wpa_ssid *) 1)

Functions

void wpa_supplicant_cancel_scan (struct wpa_supplicant *wpa_s)
 Cancel a scheduled scan request.
int wpa_supplicant_reload_configuration (struct wpa_supplicant *wpa_s)
 Reload configuration data.
const char * wpa_supplicant_state_txt (int state)
 Get the connection state name as a text string.
int wpa_supplicant_driver_init (struct wpa_supplicant *wpa_s, int wait_for_interface)
 Initialize driver interface parameters.
wpa_blacklist * wpa_blacklist_get (struct wpa_supplicant *wpa_s, const u8 *bssid)
 Get the blacklist entry for a BSSID.
int wpa_blacklist_add (struct wpa_supplicant *wpa_s, const u8 *bssid)
 Add an BSSID to the blacklist.
void wpa_blacklist_clear (struct wpa_supplicant *wpa_s)
 Clear the blacklist of all entries.
int wpa_supplicant_set_suites (struct wpa_supplicant *wpa_s, struct wpa_scan_result *bss, struct wpa_ssid *ssid, u8 *wpa_ie, size_t *wpa_ie_len)
 Set authentication and encryption parameters.
void wpa_supplicant_associate (struct wpa_supplicant *wpa_s, struct wpa_scan_result *bss, struct wpa_ssid *ssid)
 Request association.
void wpa_supplicant_set_non_wpa_policy (struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid)
 Set WPA parameters to non-WPA mode.
void wpa_supplicant_initiate_eapol (struct wpa_supplicant *wpa_s)
 Configure EAPOL state machine.
int wpa_supplicant_get_scan_results (struct wpa_supplicant *wpa_s)
 Get scan results.
void wpa_clear_keys (struct wpa_supplicant *wpa_s, const u8 *addr)
 Clear keys configured for the driver.
void wpa_supplicant_req_auth_timeout (struct wpa_supplicant *wpa_s, int sec, int usec)
 Schedule a timeout for authentication.
void wpa_supplicant_set_state (struct wpa_supplicant *wpa_s, wpa_states state)
 Set current connection state.
wpa_ssidwpa_supplicant_get_ssid (struct wpa_supplicant *wpa_s)
 Get a pointer to the current network structure.
void wpa_supplicant_cancel_auth_timeout (struct wpa_supplicant *wpa_s)
 Cancel authentication timeout.
void wpa_supplicant_deauthenticate (struct wpa_supplicant *wpa_s, int reason_code)
 Deauthenticate the current connection.
void wpa_supplicant_disassociate (struct wpa_supplicant *wpa_s, int reason_code)
 Disassociate the current connection.
void wpa_supplicant_req_scan (struct wpa_supplicant *wpa_s, int sec, int usec)
 Schedule a scan for neighboring access points.
void wpa_show_license (void)
wpa_supplicantwpa_supplicant_add_iface (struct wpa_global *global, struct wpa_interface *iface)
 Add a new network interface.
int wpa_supplicant_remove_iface (struct wpa_global *global, struct wpa_supplicant *wpa_s)
 Remove a network interface.
wpa_supplicantwpa_supplicant_get_iface (struct wpa_global *global, const char *ifname)
 Get a new network interface.
wpa_globalwpa_supplicant_init (struct wpa_params *params)
 Initialize wpa_supplicant.
int wpa_supplicant_run (struct wpa_global *global)
 Run the wpa_supplicant main event loop.
void wpa_supplicant_deinit (struct wpa_global *global)
 Deinitialize wpa_supplicant.
int wpa_supplicant_scard_init (struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid)
 Initialize SIM/USIM access with PC/SC.


Detailed Description

wpa_supplicant - Internal definitions

Copyright
Copyright (c) 2003-2006, Jouni Malinen <[email protected]>
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

Alternatively, this software may be distributed under the terms of BSD license.

See README and COPYING for more details.

Definition in file wpa_supplicant_i.h.


Function Documentation

int wpa_blacklist_add struct wpa_supplicant wpa_s,
const u8 *  bssid
 

Add an BSSID to the blacklist.

Parameters:
wpa_s Pointer to wpa_supplicant data
bssid BSSID to be added to the blacklist
Returns:
0 on success, -1 on failure
This function adds the specified BSSID to the blacklist or increases the blacklist count if the BSSID was already listed. It should be called when an association attempt fails either due to the selected BSS rejecting association or due to timeout.

This blacklist is used to force wpa_supplicant to go through all available BSSes before retrying to associate with an BSS that rejected or timed out association. It does not prevent the listed BSS from being used; it only changes the order in which they are tried.

Definition at line 418 of file wpa_supplicant.c.

Here is the call graph for this function:

void wpa_blacklist_clear struct wpa_supplicant wpa_s  ) 
 

Clear the blacklist of all entries.

Parameters:
wpa_s Pointer to wpa_supplicant data

Definition at line 474 of file wpa_supplicant.c.

Here is the call graph for this function:

struct wpa_blacklist* wpa_blacklist_get struct wpa_supplicant wpa_s,
const u8 *  bssid
 

Get the blacklist entry for a BSSID.

Parameters:
wpa_s Pointer to wpa_supplicant data
bssid BSSID
Returns:
Matching blacklist entry for the BSSID or NULL if not found

Definition at line 385 of file wpa_supplicant.c.

void wpa_clear_keys struct wpa_supplicant wpa_s,
const u8 *  addr
 

Clear keys configured for the driver.

Parameters:
wpa_s Pointer to wpa_supplicant data
addr Previously used BSSID or NULL if not available
This function clears the encryption keys that has been previously configured for the driver.

Definition at line 739 of file wpa_supplicant.c.

Here is the call graph for this function:

struct wpa_supplicant* wpa_supplicant_add_iface struct wpa_global global,
struct wpa_interface iface
 

Add a new network interface.

Parameters:
global Pointer to global data from wpa_supplicant_init()
iface Interface configuration options
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.

Definition at line 2386 of file wpa_supplicant.c.

Here is the call graph for this function:

void wpa_supplicant_associate struct wpa_supplicant wpa_s,
struct wpa_scan_result bss,
struct wpa_ssid ssid
 

Request association.

Parameters:
wpa_s Pointer to wpa_supplicant data
bss Scan results for the selected BSS, or NULL if not available
ssid Configuration data for the selected network
This function is used to request wpa_supplicant to associate with a BSS.

Definition at line 1336 of file wpa_supplicant.c.

Here is the call graph for this function:

void wpa_supplicant_cancel_auth_timeout struct wpa_supplicant wpa_s  ) 
 

Cancel authentication timeout.

Parameters:
wpa_s Pointer 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.

Definition at line 573 of file wpa_supplicant.c.

Here is the call graph for this function:

void wpa_supplicant_cancel_scan struct wpa_supplicant wpa_s  ) 
 

Cancel a scheduled scan request.

Parameters:
wpa_s Pointer to wpa_supplicant data
This function is used to cancel a scan request scheduled with wpa_supplicant_req_scan().

Definition at line 517 of file wpa_supplicant.c.

Here is the call graph for this function:

void wpa_supplicant_deauthenticate struct wpa_supplicant wpa_s,
int  reason_code
 

Deauthenticate the current connection.

Parameters:
wpa_s Pointer to wpa_supplicant data
reason_code IEEE 802.11 reason code for the deauthenticate frame
This function is used to request wpa_supplicant to disassociate with the current AP.

Definition at line 1604 of file wpa_supplicant.c.

Here is the call graph for this function:

void wpa_supplicant_deinit struct wpa_global global  ) 
 

Deinitialize wpa_supplicant.

Parameters:
global Pointer 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.

Definition at line 2608 of file wpa_supplicant.c.

Here is the call graph for this function:

void wpa_supplicant_disassociate struct wpa_supplicant wpa_s,
int  reason_code
 

Disassociate the current connection.

Parameters:
wpa_s Pointer to wpa_supplicant data
reason_code IEEE 802.11 reason code for the disassociate frame
This function is used to request wpa_supplicant to disassociate with the current AP.

Definition at line 1573 of file wpa_supplicant.c.

Here is the call graph for this function:

int wpa_supplicant_driver_init struct wpa_supplicant wpa_s,
int  wait_for_interface
 

Initialize driver interface parameters.

Parameters:
wpa_s Pointer to wpa_supplicant data
wait_for_interface 0 = do not wait for the interface (reports a failure if the interface is not present), 1 = wait until the interface is available
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.

Definition at line 1981 of file wpa_supplicant.c.

Here is the call graph for this function:

struct wpa_supplicant* wpa_supplicant_get_iface struct wpa_global global,
const char *  ifname
 

Get a new network interface.

Parameters:
global Pointer to global data from wpa_supplicant_init()
ifname Interface name
Returns:
Pointer to the interface or NULL if not found

Definition at line 2471 of file wpa_supplicant.c.

int wpa_supplicant_get_scan_results struct wpa_supplicant wpa_s  ) 
 

Get scan results.

Parameters:
wpa_s Pointer to wpa_supplicant data
Returns:
0 on success, -1 on failure
This function is request the current scan results from the driver and stores a local copy of the results in wpa_s->scan_results.

Definition at line 1636 of file wpa_supplicant.c.

Here is the call graph for this function:

struct wpa_ssid* wpa_supplicant_get_ssid struct wpa_supplicant wpa_s  ) 
 

Get a pointer to the current network structure.

Parameters:
wpa_s Pointer to wpa_supplicant data
Returns:
A pointer to the current network structure or NULL on failure

Definition at line 1743 of file wpa_supplicant.c.

Here is the call graph for this function:

struct wpa_global* wpa_supplicant_init struct wpa_params params  ) 
 

Initialize wpa_supplicant.

Parameters:
params Parameters 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.

Definition at line 2494 of file wpa_supplicant.c.

Here is the call graph for this function:

void wpa_supplicant_initiate_eapol struct wpa_supplicant wpa_s  ) 
 

Configure EAPOL state machine.

Parameters:
wpa_s Pointer to wpa_supplicant data
This function is used to configure EAPOL state machine based on the selected authentication mode.

Definition at line 589 of file wpa_supplicant.c.

Here is the call graph for this function:

int wpa_supplicant_reload_configuration struct wpa_supplicant wpa_s  ) 
 

Reload configuration data.

Parameters:
wpa_s Pointer 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.

Definition at line 892 of file wpa_supplicant.c.

Here is the call graph for this function:

int wpa_supplicant_remove_iface struct wpa_global global,
struct wpa_supplicant wpa_s
 

Remove a network interface.

Parameters:
global Pointer to global data from wpa_supplicant_init()
wpa_s Pointer 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 interdaces when wpa_supplicant is terminated.

Definition at line 2438 of file wpa_supplicant.c.

Here is the call graph for this function:

void wpa_supplicant_req_auth_timeout struct wpa_supplicant wpa_s,
int  sec,
int  usec
 

Schedule a timeout for authentication.

Parameters:
wpa_s Pointer to wpa_supplicant data
sec Number of seconds after which to time out authentication
usec Number of microseconds after which to time out authentication
This function is used to schedule a timeout for the current authentication attempt.

Definition at line 550 of file wpa_supplicant.c.

Here is the call graph for this function:

void wpa_supplicant_req_scan struct wpa_supplicant wpa_s,
int  sec,
int  usec
 

Schedule a scan for neighboring access points.

Parameters:
wpa_s Pointer to wpa_supplicant data
sec Number of seconds after which to scan
usec Number of microseconds after which to scan
This function is used to schedule a scan for neighboring access points after the specified time.

Definition at line 500 of file wpa_supplicant.c.

Here is the call graph for this function:

int wpa_supplicant_run struct wpa_global global  ) 
 

Run the wpa_supplicant main event loop.

Parameters:
global Pointer 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.

Definition at line 2576 of file wpa_supplicant.c.

Here is the call graph for this function:

int wpa_supplicant_scard_init struct wpa_supplicant wpa_s,
struct wpa_ssid ssid
 

Initialize SIM/USIM access with PC/SC.

Parameters:
wpa_s pointer to wpa_supplicant data
ssid Configuration data for the network
Returns:
0 on success, -1 on failure
This function is called when starting authentication with a network that is configured to use PC/SC for SIM/USIM access (EAP-SIM or EAP-AKA).

Definition at line 176 of file events.c.

Here is the call graph for this function:

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_s Pointer to wpa_supplicant data
ssid Configuration 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.

Definition at line 642 of file wpa_supplicant.c.

Here is the call graph for this function:

void wpa_supplicant_set_state struct wpa_supplicant wpa_s,
wpa_states  state
 

Set current connection state.

Parameters:
wpa_s Pointer to wpa_supplicant data
state The 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.

Definition at line 814 of file wpa_supplicant.c.

Here is the call graph for this function:

int wpa_supplicant_set_suites struct wpa_supplicant wpa_s,
struct wpa_scan_result bss,
struct wpa_ssid ssid,
u8 *  wpa_ie,
size_t *  wpa_ie_len
 

Set authentication and encryption parameters.

Parameters:
wpa_s Pointer to wpa_supplicant data
bss Scan results for the selected BSS, or NULL if not available
ssid Configuration data for the selected network
wpa_ie Buffer for the WPA/RSN IE
wpa_ie_len Maximum 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).

Definition at line 1177 of file wpa_supplicant.c.

Here is the call graph for this function:

const char* wpa_supplicant_state_txt int  state  ) 
 

Get the connection state name as a text string.

Parameters:
state State (wpa_state; WPA_*)
Returns:
The state name as a printable text string

Definition at line 780 of file wpa_supplicant.c.


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