path: root/wpa_supplicant/bss.h
diff options
authorJouni Malinen <j@w1.fi>2009-12-27 22:30:38 (GMT)
committerJouni Malinen <j@w1.fi>2009-12-27 22:30:38 (GMT)
commitd4bf8f132a4455e5240eb4371b0a562ef49ea868 (patch)
treec0d4e6dad138763ec990682cfbb0b41c2e474cd4 /wpa_supplicant/bss.h
parentc9df730b039fd3162cb51773a1af27c62fb7f095 (diff)
Add BSS list sorted by id and add some helper functions
This allows the BSS list to be iterated in order of increasing id to avoid problems with new scans reordering entries. The order on the wpa_s->bss list changes with most recently updated entries being moved to the tail of the list while wpa_s->bss_id list maintains its order with new entries being added to the tail and old entries being removed when they expire.
Diffstat (limited to 'wpa_supplicant/bss.h')
1 files changed, 9 insertions, 0 deletions
diff --git a/wpa_supplicant/bss.h b/wpa_supplicant/bss.h
index dde4ed9..e861e8a 100644
--- a/wpa_supplicant/bss.h
+++ b/wpa_supplicant/bss.h
@@ -25,6 +25,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_*)
@@ -45,6 +46,7 @@
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;
@@ -70,5 +72,12 @@ void wpa_bss_update_scan_res(struct wpa_supplicant *wpa_s,
void wpa_bss_update_end(struct wpa_supplicant *wpa_s);
int wpa_bss_init(struct wpa_supplicant *wpa_s);
void wpa_bss_deinit(struct wpa_supplicant *wpa_s);
+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);
#endif /* BSS_H */