wpa_supplicant / hostapd 2.0
Defines | Functions

scan.c File Reference

WPA Supplicant - Scanning. More...

#include "utils/includes.h"
#include "utils/common.h"
#include "utils/eloop.h"
#include "common/ieee802_11_defs.h"
#include "config.h"
#include "wpa_supplicant_i.h"
#include "driver_i.h"
#include "wps_supplicant.h"
#include "p2p_supplicant.h"
#include "p2p/p2p.h"
#include "notify.h"
#include "bss.h"
#include "scan.h"

Defines

#define GREAT_SNR   30
#define IS_5GHZ(n)   (n > 4000)
#define MIN(a, b)   a < b ? a : b

Functions

int wpa_supplicant_enabled_networks (struct wpa_config *conf)
int wpa_supplicant_trigger_scan (struct wpa_supplicant *wpa_s, struct wpa_driver_scan_params *params)
void wpa_supplicant_req_scan (struct wpa_supplicant *wpa_s, int sec, int usec)
 Schedule a scan for neighboring access points.
int wpa_supplicant_delayed_sched_scan (struct wpa_supplicant *wpa_s, int sec, int usec)
 Request a delayed scheduled scan.
int wpa_supplicant_req_sched_scan (struct wpa_supplicant *wpa_s)
 Start a periodic scheduled scan.
void wpa_supplicant_cancel_scan (struct wpa_supplicant *wpa_s)
 Cancel a scheduled scan request.
void wpa_supplicant_cancel_sched_scan (struct wpa_supplicant *wpa_s)
 Stop running scheduled scans.
void wpa_supplicant_notify_scanning (struct wpa_supplicant *wpa_s, int scanning)
const u8 * wpa_scan_get_ie (const struct wpa_scan_res *res, u8 ie)
const u8 * wpa_scan_get_vendor_ie (const struct wpa_scan_res *res, u32 vendor_type)
struct wpabufwpa_scan_get_vendor_ie_multi (const struct wpa_scan_res *res, u32 vendor_type)
struct wpabufwpa_scan_get_vendor_ie_multi_beacon (const struct wpa_scan_res *res, u32 vendor_type)
int wpa_supplicant_filter_bssid_match (struct wpa_supplicant *wpa_s, const u8 *bssid)
struct wpa_scan_resultswpa_supplicant_get_scan_results (struct wpa_supplicant *wpa_s, struct scan_info *info, int new_scan)
 Get scan results.
int wpa_supplicant_update_scan_results (struct wpa_supplicant *wpa_s)

Detailed Description

WPA Supplicant - Scanning.

Copyright
Copyright (c) 2003-2010, Jouni Malinen <j@w1.fi>

This software may be distributed under the terms of the BSD license. See README for more details.


Function Documentation

void wpa_supplicant_cancel_scan ( struct wpa_supplicant wpa_s)

Cancel a scheduled scan request.

Parameters:
wpa_sPointer to wpa_supplicant data

This function is used to cancel a scan request scheduled with wpa_supplicant_req_scan().

void wpa_supplicant_cancel_sched_scan ( struct wpa_supplicant wpa_s)

Stop running scheduled scans.

Parameters:
wpa_sPointer to wpa_supplicant data

This function is used to stop a periodic scheduled scan.

int wpa_supplicant_delayed_sched_scan ( struct wpa_supplicant wpa_s,
int  sec,
int  usec 
)

Request a delayed scheduled scan.

Parameters:
wpa_sPointer to wpa_supplicant data
secNumber of seconds after which to scan
usecNumber of microseconds after which to scan

This function is used to schedule periodic scans for neighboring access points after the specified time.

struct wpa_scan_results* wpa_supplicant_get_scan_results ( struct wpa_supplicant wpa_s,
struct scan_info *  info,
int  new_scan 
) [read]

Get scan results.

Parameters:
wpa_sPointer to wpa_supplicant data
infoInformation about what was scanned or NULL if not available
new_scanWhether a new scan was performed
Returns:
Scan results, NULL on failure

This function request the current scan results from the driver and updates the local BSS list wpa_s->bss. The caller is responsible for freeing the results with wpa_scan_results_free().

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

Schedule a scan for neighboring access points.

Parameters:
wpa_sPointer to wpa_supplicant data
secNumber of seconds after which to scan
usecNumber of microseconds after which to scan

This function is used to schedule a scan for neighboring access points after the specified time.

int wpa_supplicant_req_sched_scan ( struct wpa_supplicant wpa_s)

Start a periodic scheduled scan.

Parameters:
wpa_sPointer to wpa_supplicant data

This function is used to schedule periodic scans for neighboring access points repeating the scan continuously.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines