X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=wpa_supplicant%2Fbss.h;h=1de4722a6bea10b001ad7590292b42f8bd213cd2;hb=HEAD;hp=dde4ed9b672705fafe9a00fd1f7d3a2c8d8cf710;hpb=83922c2d344eb7fb77387bc0253449524e949901;p=libeap.git diff --git a/wpa_supplicant/bss.h b/wpa_supplicant/bss.h index dde4ed9..1de4722 100644 --- a/wpa_supplicant/bss.h +++ b/wpa_supplicant/bss.h @@ -1,6 +1,6 @@ /* * BSS table - * Copyright (c) 2009, Jouni Malinen + * Copyright (c) 2009-2010, Jouni Malinen * * 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 @@ -15,6 +15,8 @@ #ifndef BSS_H #define BSS_H +struct wpa_scan_res; + #define WPA_BSS_QUAL_INVALID BIT(0) #define WPA_BSS_NOISE_INVALID BIT(1) #define WPA_BSS_LEVEL_INVALID BIT(2) @@ -25,6 +27,7 @@ /** * struct wpa_bss - BSS table * @list: List entry for struct wpa_supplicant::bss + * @list_id: List entry for struct wpa_supplicant::bss_id * @id: Unique identifier for this BSS entry * @scan_miss_count: Number of counts without seeing this BSS * @flags: information flags about the BSS/IBSS (WPA_BSS_*) @@ -37,14 +40,16 @@ * @noise: noise level * @level: signal level * @tsf: Timestamp of last Beacon/Probe Response frame - * @last_update: Time of the last update (i.e., Beacon or Probe Response RX) - * @ie_len: length of the following IE field in octets + * @last_update: Time of the last update (i.e., Beacon or Probe Response RX) + * @ie_len: length of the following IE field in octets (from Probe Response) + * @beacon_ie_len: length of the following Beacon IE field in octets * * This structure is used to store information about neighboring BSSes in * generic format. It is mainly updated based on scan results from the driver. */ struct wpa_bss { struct dl_list list; + struct dl_list list_id; unsigned int id; unsigned int scan_miss_count; unsigned int last_update_idx; @@ -61,14 +66,28 @@ struct wpa_bss { u64 tsf; struct os_time last_update; size_t ie_len; + size_t beacon_ie_len; /* followed by ie_len octets of IEs */ + /* followed by beacon_ie_len octets of IEs */ }; void wpa_bss_update_start(struct wpa_supplicant *wpa_s); void wpa_bss_update_scan_res(struct wpa_supplicant *wpa_s, struct wpa_scan_res *res); -void wpa_bss_update_end(struct wpa_supplicant *wpa_s); +void wpa_bss_update_end(struct wpa_supplicant *wpa_s, struct scan_info *info, + int new_scan); int wpa_bss_init(struct wpa_supplicant *wpa_s); void wpa_bss_deinit(struct wpa_supplicant *wpa_s); +struct wpa_bss * wpa_bss_get(struct wpa_supplicant *wpa_s, const u8 *bssid, + const u8 *ssid, size_t ssid_len); +struct wpa_bss * wpa_bss_get_bssid(struct wpa_supplicant *wpa_s, + const u8 *bssid); +struct wpa_bss * wpa_bss_get_id(struct wpa_supplicant *wpa_s, unsigned int id); +const u8 * wpa_bss_get_ie(const struct wpa_bss *bss, u8 ie); +const u8 * wpa_bss_get_vendor_ie(const struct wpa_bss *bss, u32 vendor_type); +struct wpabuf * wpa_bss_get_vendor_ie_multi(const struct wpa_bss *bss, + u32 vendor_type); +int wpa_bss_get_max_rate(const struct wpa_bss *bss); +int wpa_bss_get_bit_rates(const struct wpa_bss *bss, u8 **rates); #endif /* BSS_H */