#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#include <unistd.h>
#include <string.h>
#include <time.h>
#include <signal.h>
#include <netinet/in.h>
#include "common.h"
#include "eapol_sm.h"
#include "eap.h"
#include "wpa.h"
#include "eloop.h"
#include "wpa_supplicant.h"
#include "config.h"
#include "l2_packet.h"
#include "wpa_supplicant_i.h"
#include "ctrl_iface.h"
#include "pcsc_funcs.h"
#include "version.h"
#include "preauth.h"
#include "wpa_ctrl.h"
Include dependency graph for wpa_supplicant.c:
Go to the source code of this file.
Defines | |
#define | SCAN_AP_LIMIT 128 |
Functions | |
void | wpa_msg (struct wpa_supplicant *wpa_s, int level, char *fmt,...) |
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. | |
const char * | wpa_ssid_txt (u8 *ssid, size_t ssid_len) |
Convert SSID to a printable string. | |
void | wpa_supplicant_req_scan (struct wpa_supplicant *wpa_s, int sec, int usec) |
Schedule a scan for neighboring access points. | |
void | wpa_supplicant_cancel_scan (struct wpa_supplicant *wpa_s) |
Cancel a scheduled scan request. | |
void | wpa_supplicant_req_auth_timeout (struct wpa_supplicant *wpa_s, int sec, int usec) |
Schedule a timeout for authentication. | |
void | wpa_supplicant_cancel_auth_timeout (struct wpa_supplicant *wpa_s) |
Cancel authentication timeout. | |
void | wpa_supplicant_initiate_eapol (struct wpa_supplicant *wpa_s) |
Configure EAPOL state machine. | |
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_clear_keys (struct wpa_supplicant *wpa_s, const u8 *addr) |
Clear keys configured for the driver. | |
const char * | wpa_supplicant_state_txt (int state) |
Get the connection state name as a text string. | |
void | wpa_supplicant_set_state (struct wpa_supplicant *wpa_s, wpa_states state) |
Set current connection state. | |
wpa_states | wpa_supplicant_get_state (struct wpa_supplicant *wpa_s) |
Get the connection state. | |
int | wpa_supplicant_reload_configuration (struct wpa_supplicant *wpa_s) |
Reload configuration data. | |
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_disassociate (struct wpa_supplicant *wpa_s, int reason_code) |
Disassociate the current connection. | |
void | wpa_supplicant_deauthenticate (struct wpa_supplicant *wpa_s, int reason_code) |
Deauthenticate the current connection. | |
int | wpa_supplicant_get_scan_results (struct wpa_supplicant *wpa_s) |
Get scan results. | |
wpa_ssid * | wpa_supplicant_get_ssid (struct wpa_supplicant *wpa_s) |
Get a pointer to the current network structure. | |
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. | |
int | wpa_supplicant_driver_init (struct wpa_supplicant *wpa_s, int wait_for_interface) |
Initialize driver interface parameters. | |
wpa_supplicant * | wpa_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_supplicant * | wpa_supplicant_get_iface (struct wpa_global *global, const char *ifname) |
Get a new network interface. | |
wpa_global * | wpa_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. | |
Variables | |
const char * | wpa_supplicant_version |
const char * | wpa_supplicant_license |
const char * | wpa_supplicant_full_license |
wpa_driver_ops * | wpa_supplicant_drivers [] |
int | wpa_debug_level |
int | wpa_debug_show_keys |
int | wpa_debug_timestamp |
Alternatively, this software may be distributed under the terms of BSD license.
See README and COPYING for more details.
This file implements functions for registering and unregistering wpa_supplicant interfaces. In addition, this file contains number of functions for managing network connections.
Definition in file wpa_supplicant.c.
|
Add an BSSID to the blacklist.
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 433 of file wpa_supplicant.c. Here is the call graph for this function: |
|
Clear the blacklist of all entries.
Definition at line 490 of file wpa_supplicant.c. Here is the call graph for this function: |
|
Get the blacklist entry for a BSSID.
Definition at line 400 of file wpa_supplicant.c. |
|
Clear keys configured for the driver.
Definition at line 767 of file wpa_supplicant.c. Here is the call graph for this function: |
|
Convert SSID to a printable string.
This function uses a static buffer, so only one call can be used at the time, i.e., this is not re-entrant and the returned buffer must be used before calling this again. Definition at line 521 of file wpa_supplicant.c. |
|
Add a new network interface.
Definition at line 2211 of file wpa_supplicant.c. Here is the call graph for this function: |
|
Request association.
Definition at line 1276 of file wpa_supplicant.c. Here is the call graph for this function: |
|
Cancel authentication timeout.
Definition at line 618 of file wpa_supplicant.c. Here is the call graph for this function: |
|
Cancel a scheduled scan request.
Definition at line 565 of file wpa_supplicant.c. Here is the call graph for this function: |
|
Deauthenticate the current connection.
Definition at line 1503 of file wpa_supplicant.c. Here is the call graph for this function: |
|
Deinitialize wpa_supplicant.
Definition at line 2395 of file wpa_supplicant.c. Here is the call graph for this function: |
|
Disassociate the current connection.
Definition at line 1476 of file wpa_supplicant.c. Here is the call graph for this function: |
|
Initialize driver interface parameters.
Definition at line 1837 of file wpa_supplicant.c. Here is the call graph for this function: |
|
Get a new network interface.
Definition at line 2288 of file wpa_supplicant.c. |
|
Get scan results.
Definition at line 1530 of file wpa_supplicant.c. Here is the call graph for this function: |
|
Get a pointer to the current network structure.
Definition at line 1626 of file wpa_supplicant.c. Here is the call graph for this function: |
|
Get the connection state.
Definition at line 862 of file wpa_supplicant.c. |
|
Initialize wpa_supplicant.
Definition at line 2311 of file wpa_supplicant.c. Here is the call graph for this function: |
|
Configure EAPOL state machine.
Definition at line 634 of file wpa_supplicant.c. Here is the call graph for this function: |
|
Reload configuration data.
Definition at line 893 of file wpa_supplicant.c. Here is the call graph for this function: |
|
Remove a network interface.
Definition at line 2255 of file wpa_supplicant.c. Here is the call graph for this function: |
|
Schedule a timeout for authentication.
Definition at line 595 of file wpa_supplicant.c. Here is the call graph for this function: |
|
Schedule a scan for neighboring access points.
Definition at line 548 of file wpa_supplicant.c. Here is the call graph for this function: |
|
Run the wpa_supplicant main event loop.
Definition at line 2362 of file wpa_supplicant.c. Here is the call graph for this function: |
|
Deliver a received EAPOL frame to wpa_supplicant.
Definition at line 1780 of file wpa_supplicant.c. Here is the call graph for this function: |
|
Set WPA parameters to non-WPA mode.
Definition at line 684 of file wpa_supplicant.c. Here is the call graph for this function: |
|
Set current connection state.
Definition at line 836 of file wpa_supplicant.c. Here is the call graph for this function: |
|
Set authentication and encryption parameters.
Definition at line 1146 of file wpa_supplicant.c. Here is the call graph for this function: |
|
Get the connection state name as a text string.
Definition at line 802 of file wpa_supplicant.c. |
|
Initial value: "This program is free software. You can distribute it and/or modify it\n" "under the terms of the GNU General Public License version 2.\n" "\n" "Alternatively, this software may be distributed under the terms of the\n" "BSD license. See README and COPYING for more details.\n" Definition at line 50 of file wpa_supplicant.c. |
|
Initial value: "wpa_supplicant v" VERSION_STR "\n" "Copyright (c) 2003-2006, Jouni Malinen <[email protected]> and contributors" Definition at line 46 of file wpa_supplicant.c. |