FreeBSD kernel WLAN code
ieee80211_scan.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ieee80211_scan_ssid
 
struct  ieee80211_scan_methods
 
struct  ieee80211_scan_state
 
struct  ieee80211_scanparams
 
struct  ieee80211_scan_entry
 
struct  ieee80211_scanner
 

Macros

#define IEEE80211_SCAN_MAX   IEEE80211_CHAN_MAX
 
#define IEEE80211_SCAN_MAX_SSID   1 /* max # ssid's to probe */
 
#define IEEE80211_SCAN_NOPICK   0x0001 /* scan only, no selection */
 
#define IEEE80211_SCAN_ACTIVE   0x0002 /* active scan (probe req) */
 
#define IEEE80211_SCAN_PICK1ST   0x0004 /* ``hey sailor'' mode */
 
#define IEEE80211_SCAN_BGSCAN   0x0008 /* bg scan, exit ps at end */
 
#define IEEE80211_SCAN_ONCE   0x0010 /* do one complete pass */
 
#define IEEE80211_SCAN_NOBCAST   0x0020 /* no broadcast probe req */
 
#define IEEE80211_SCAN_NOJOIN   0x0040 /* no auto-sequencing */
 
#define IEEE80211_SCAN_GOTPICK   0x1000 /* got candidate, can stop */
 
#define IEEE80211_SCAN_FLUSH   0x00010000 /* flush candidate table */
 
#define IEEE80211_SCAN_NOSSID   0x80000000 /* don't update ssid list */
 
#define IEEE80211_SCAN_FOREVER   0x7fffffff
 

Typedefs

typedef void ieee80211_scan_iter_func(void *, const struct ieee80211_scan_entry *)
 

Enumerations

enum  { IEEE80211_SCAN_FAIL_TIMEOUT = 1 , IEEE80211_SCAN_FAIL_STATUS = 2 }
 
enum  {
  IEEE80211_BPARSE_BADIELEN = 0x01 , IEEE80211_BPARSE_RATES_INVALID = 0x02 , IEEE80211_BPARSE_XRATES_INVALID = 0x04 , IEEE80211_BPARSE_SSID_INVALID = 0x08 ,
  IEEE80211_BPARSE_CHAN_INVALID = 0x10 , IEEE80211_BPARSE_OFFCHAN = 0x20 , IEEE80211_BPARSE_BINTVAL_INVALID = 0x40 , IEEE80211_BPARSE_CSA_INVALID = 0x80
}
 

Functions

void ieee80211_scan_attach (struct ieee80211com *)
 
void ieee80211_scan_detach (struct ieee80211com *)
 
void ieee80211_scan_vattach (struct ieee80211vap *)
 
void ieee80211_scan_vdetach (struct ieee80211vap *)
 
void ieee80211_scan_dump_channels (const struct ieee80211_scan_state *)
 
int ieee80211_start_scan (struct ieee80211vap *, int flags, u_int duration, u_int mindwell, u_int maxdwell, u_int nssid, const struct ieee80211_scan_ssid ssids[])
 
int ieee80211_check_scan (struct ieee80211vap *, int flags, u_int duration, u_int mindwell, u_int maxdwell, u_int nssid, const struct ieee80211_scan_ssid ssids[])
 
int ieee80211_check_scan_current (struct ieee80211vap *)
 
int ieee80211_bg_scan (struct ieee80211vap *, int)
 
void ieee80211_cancel_scan (struct ieee80211vap *)
 
void ieee80211_cancel_anyscan (struct ieee80211vap *)
 
void ieee80211_scan_next (struct ieee80211vap *)
 
void ieee80211_scan_done (struct ieee80211vap *)
 
void ieee80211_probe_curchan (struct ieee80211vap *, int)
 
struct ieee80211_channelieee80211_scan_pickchannel (struct ieee80211com *, int)
 
void ieee80211_add_scan (struct ieee80211vap *, struct ieee80211_channel *, const struct ieee80211_scanparams *, const struct ieee80211_frame *, int subtype, int rssi, int noise)
 
void ieee80211_scan_timeout (struct ieee80211com *)
 
void ieee80211_scan_assoc_success (struct ieee80211vap *, const uint8_t mac[IEEE80211_ADDR_LEN])
 
void ieee80211_scan_assoc_fail (struct ieee80211vap *, const uint8_t mac[IEEE80211_ADDR_LEN], int reason)
 
void ieee80211_scan_flush (struct ieee80211vap *)
 
void ieee80211_scan_iterate (struct ieee80211vap *, ieee80211_scan_iter_func, void *)
 
 MALLOC_DECLARE (M_80211_SCAN)
 
void ieee80211_scanner_register (enum ieee80211_opmode, const struct ieee80211_scanner *)
 
void ieee80211_scanner_unregister (enum ieee80211_opmode, const struct ieee80211_scanner *)
 
void ieee80211_scanner_unregister_all (const struct ieee80211_scanner *)
 
const struct ieee80211_scannerieee80211_scanner_get (enum ieee80211_opmode)
 
void ieee80211_scan_update_locked (struct ieee80211vap *vap, const struct ieee80211_scanner *scan)
 
void ieee80211_scan_copy_ssid (struct ieee80211vap *vap, struct ieee80211_scan_state *ss, int nssid, const struct ieee80211_scan_ssid ssids[])
 
void ieee80211_scan_dump_probe_beacon (uint8_t subtype, int isnew, const uint8_t mac[IEEE80211_ADDR_LEN], const struct ieee80211_scanparams *sp, int rssi)
 
void ieee80211_scan_dump (struct ieee80211_scan_state *ss)
 

Macro Definition Documentation

◆ IEEE80211_SCAN_ACTIVE

#define IEEE80211_SCAN_ACTIVE   0x0002 /* active scan (probe req) */

Definition at line 133 of file ieee80211_scan.h.

◆ IEEE80211_SCAN_BGSCAN

#define IEEE80211_SCAN_BGSCAN   0x0008 /* bg scan, exit ps at end */

Definition at line 135 of file ieee80211_scan.h.

◆ IEEE80211_SCAN_FLUSH

#define IEEE80211_SCAN_FLUSH   0x00010000 /* flush candidate table */

Definition at line 157 of file ieee80211_scan.h.

◆ IEEE80211_SCAN_FOREVER

#define IEEE80211_SCAN_FOREVER   0x7fffffff

Definition at line 168 of file ieee80211_scan.h.

◆ IEEE80211_SCAN_GOTPICK

#define IEEE80211_SCAN_GOTPICK   0x1000 /* got candidate, can stop */

Definition at line 139 of file ieee80211_scan.h.

◆ IEEE80211_SCAN_MAX

#define IEEE80211_SCAN_MAX   IEEE80211_CHAN_MAX

Definition at line 74 of file ieee80211_scan.h.

◆ IEEE80211_SCAN_MAX_SSID

#define IEEE80211_SCAN_MAX_SSID   1 /* max # ssid's to probe */

Definition at line 82 of file ieee80211_scan.h.

◆ IEEE80211_SCAN_NOBCAST

#define IEEE80211_SCAN_NOBCAST   0x0020 /* no broadcast probe req */

Definition at line 137 of file ieee80211_scan.h.

◆ IEEE80211_SCAN_NOJOIN

#define IEEE80211_SCAN_NOJOIN   0x0040 /* no auto-sequencing */

Definition at line 138 of file ieee80211_scan.h.

◆ IEEE80211_SCAN_NOPICK

#define IEEE80211_SCAN_NOPICK   0x0001 /* scan only, no selection */

Definition at line 132 of file ieee80211_scan.h.

◆ IEEE80211_SCAN_NOSSID

#define IEEE80211_SCAN_NOSSID   0x80000000 /* don't update ssid list */

Definition at line 158 of file ieee80211_scan.h.

◆ IEEE80211_SCAN_ONCE

#define IEEE80211_SCAN_ONCE   0x0010 /* do one complete pass */

Definition at line 136 of file ieee80211_scan.h.

◆ IEEE80211_SCAN_PICK1ST

#define IEEE80211_SCAN_PICK1ST   0x0004 /* ``hey sailor'' mode */

Definition at line 134 of file ieee80211_scan.h.

Typedef Documentation

◆ ieee80211_scan_iter_func

typedef void ieee80211_scan_iter_func(void *, const struct ieee80211_scan_entry *)

Definition at line 203 of file ieee80211_scan.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
IEEE80211_SCAN_FAIL_TIMEOUT 
IEEE80211_SCAN_FAIL_STATUS 

Definition at line 194 of file ieee80211_scan.h.

◆ anonymous enum

anonymous enum
Enumerator
IEEE80211_BPARSE_BADIELEN 
IEEE80211_BPARSE_RATES_INVALID 
IEEE80211_BPARSE_XRATES_INVALID 
IEEE80211_BPARSE_SSID_INVALID 
IEEE80211_BPARSE_CHAN_INVALID 
IEEE80211_BPARSE_OFFCHAN 
IEEE80211_BPARSE_BINTVAL_INVALID 
IEEE80211_BPARSE_CSA_INVALID 

Definition at line 207 of file ieee80211_scan.h.

Function Documentation

◆ ieee80211_add_scan()

void ieee80211_add_scan ( struct ieee80211vap vap,
struct ieee80211_channel curchan,
const struct ieee80211_scanparams sp,
const struct ieee80211_frame wh,
int  subtype,
int  rssi,
int  noise 
)

Definition at line 581 of file ieee80211_scan.c.

References ieee80211com::ic_scan_methods, ieee80211vap::iv_ic, and ieee80211_scan_methods::sc_add_scan.

Referenced by adhoc_recv_mgmt(), hostap_recv_mgmt(), mesh_recv_mgmt(), and sta_recv_mgmt().

Here is the caller graph for this function:

◆ ieee80211_bg_scan()

int ieee80211_bg_scan ( struct ieee80211vap vap,
int  flags 
)

Definition at line 425 of file ieee80211_scan.c.

References ieee80211com::ic_scan_methods, IEEE80211_DPRINTF, IEEE80211_MSG_SCAN, ieee80211_scanner_get(), ieee80211vap::iv_ic, ieee80211vap::iv_opmode, and ieee80211_scan_methods::sc_bg_scan.

Referenced by sta_recv_mgmt(), and sta_roam_check().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ieee80211_cancel_anyscan()

void ieee80211_cancel_anyscan ( struct ieee80211vap vap)

Definition at line 467 of file ieee80211_scan.c.

References ieee80211com::ic_scan_methods, ieee80211vap::iv_ic, and ieee80211_scan_methods::sc_cancel_anyscan.

Referenced by ieee80211_start_pkt().

Here is the caller graph for this function:

◆ ieee80211_cancel_scan()

void ieee80211_cancel_scan ( struct ieee80211vap vap)

◆ ieee80211_check_scan()

◆ ieee80211_check_scan_current()

int ieee80211_check_scan_current ( struct ieee80211vap vap)

Definition at line 412 of file ieee80211_scan.c.

References ieee80211_check_scan(), IEEE80211_SCAN_ACTIVE, IEEE80211_SCAN_FOREVER, ieee80211vap::iv_des_nssid, and ieee80211vap::iv_des_ssid.

Referenced by adhoc_newstate(), hostap_newstate(), mesh_newstate(), sta_authretry(), sta_newstate(), and wds_newstate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ieee80211_probe_curchan()

◆ ieee80211_scan_assoc_fail()

void ieee80211_scan_assoc_fail ( struct ieee80211vap ,
const uint8_t  mac[IEEE80211_ADDR_LEN],
int  reason 
)

◆ ieee80211_scan_assoc_success()

void ieee80211_scan_assoc_success ( struct ieee80211vap ,
const uint8_t  mac[IEEE80211_ADDR_LEN] 
)

◆ ieee80211_scan_attach()

void ieee80211_scan_attach ( struct ieee80211com ic)

Definition at line 76 of file ieee80211_scan.c.

References ieee80211com::ic_scan_methods, ieee80211_swscan_attach(), and ieee80211_scan_methods::sc_attach.

Referenced by ieee80211_ifattach().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ieee80211_scan_copy_ssid()

void ieee80211_scan_copy_ssid ( struct ieee80211vap vap,
struct ieee80211_scan_state ss,
int  nssid,
const struct ieee80211_scan_ssid  ssids[] 
)

◆ ieee80211_scan_detach()

void ieee80211_scan_detach ( struct ieee80211com ic)

Definition at line 89 of file ieee80211_scan.c.

References ieee80211com::ic_scan_methods, and ieee80211_scan_methods::sc_detach.

Referenced by ieee80211_ifdetach().

Here is the caller graph for this function:

◆ ieee80211_scan_done()

◆ ieee80211_scan_dump()

void ieee80211_scan_dump ( struct ieee80211_scan_state ss)

Referenced by ieee80211_swscan_bg_scan(), and ieee80211_swscan_start_scan_locked().

Here is the caller graph for this function:

◆ ieee80211_scan_dump_channels()

void ieee80211_scan_dump_channels ( const struct ieee80211_scan_state ss)

◆ ieee80211_scan_dump_probe_beacon()

void ieee80211_scan_dump_probe_beacon ( uint8_t  subtype,
int  isnew,
const uint8_t  mac[IEEE80211_ADDR_LEN],
const struct ieee80211_scanparams sp,
int  rssi 
)

Referenced by ieee80211_swscan_add_scan().

Here is the caller graph for this function:

◆ ieee80211_scan_flush()

◆ ieee80211_scan_iterate()

void ieee80211_scan_iterate ( struct ieee80211vap ,
ieee80211_scan_iter_func  ,
void *   
)

◆ ieee80211_scan_next()

void ieee80211_scan_next ( struct ieee80211vap vap)

◆ ieee80211_scan_pickchannel()

struct ieee80211_channel * ieee80211_scan_pickchannel ( struct ieee80211com ic,
int  flags 
)

◆ ieee80211_scan_timeout()

void ieee80211_scan_timeout ( struct ieee80211com ic)

Definition at line 598 of file ieee80211_scan.c.

References ieee80211com::ic_scan, ieee80211_scanner::scan_age, and ieee80211_scan_state::ss_ops.

Referenced by ieee80211_node_timeout().

Here is the caller graph for this function:

◆ ieee80211_scan_update_locked()

◆ ieee80211_scan_vattach()

◆ ieee80211_scan_vdetach()

◆ ieee80211_scanner_get()

const struct ieee80211_scanner * ieee80211_scanner_get ( enum  ieee80211_opmode)

Definition at line 188 of file ieee80211_scan.c.

References ieee80211_load_module(), IEEE80211_OPMODE_MAX, scan_modnames, and scanners.

Referenced by ieee80211_bg_scan(), ieee80211_check_scan(), and ieee80211_start_scan().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ieee80211_scanner_register()

void ieee80211_scanner_register ( enum  ieee80211_opmode,
const struct ieee80211_scanner scan 
)

Definition at line 198 of file ieee80211_scan.c.

References IEEE80211_OPMODE_MAX, and scanners.

◆ ieee80211_scanner_unregister()

void ieee80211_scanner_unregister ( enum  ieee80211_opmode,
const struct ieee80211_scanner scan 
)

Definition at line 207 of file ieee80211_scan.c.

References IEEE80211_OPMODE_MAX, and scanners.

◆ ieee80211_scanner_unregister_all()

void ieee80211_scanner_unregister_all ( const struct ieee80211_scanner scan)

Definition at line 217 of file ieee80211_scan.c.

References IEEE80211_OPMODE_MAX, and scanners.

◆ ieee80211_start_scan()

int ieee80211_start_scan ( struct ieee80211vap vap,
int  flags,
u_int  duration,
u_int  mindwell,
u_int  maxdwell,
u_int  nssid,
const struct ieee80211_scan_ssid  ssids[] 
)

Definition at line 329 of file ieee80211_scan.c.

References ieee80211com::ic_scan_methods, IEEE80211_DPRINTF, IEEE80211_MSG_SCAN, ieee80211_opmode_name, ieee80211_scanner_get(), ieee80211vap::iv_ic, ieee80211vap::iv_opmode, and ieee80211_scan_methods::sc_start_scan.

Referenced by ieee80211_ioctl_set80211(), and ieee80211_scanreq().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MALLOC_DECLARE()

MALLOC_DECLARE ( M_80211_SCAN  )