bss.h
Go to the documentation of this file.
00001 /*
00002  * BSS table
00003  * Copyright (c) 2009-2010, Jouni Malinen <j@w1.fi>
00004  *
00005  * This program is free software; you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License version 2 as
00007  * published by the Free Software Foundation.
00008  *
00009  * Alternatively, this software may be distributed under the terms of BSD
00010  * license.
00011  *
00012  * See README and COPYING for more details.
00013  */
00014 
00015 #ifndef BSS_H
00016 #define BSS_H
00017 
00018 struct wpa_scan_res;
00019 
00020 #define WPA_BSS_QUAL_INVALID            BIT(0)
00021 #define WPA_BSS_NOISE_INVALID           BIT(1)
00022 #define WPA_BSS_LEVEL_INVALID           BIT(2)
00023 #define WPA_BSS_LEVEL_DBM               BIT(3)
00024 #define WPA_BSS_AUTHENTICATED           BIT(4)
00025 #define WPA_BSS_ASSOCIATED              BIT(5)
00026 
00050 struct wpa_bss {
00051         struct dl_list list;
00052         struct dl_list list_id;
00053         unsigned int id;
00054         unsigned int scan_miss_count;
00055         unsigned int last_update_idx;
00056         unsigned int flags;
00057         u8 bssid[ETH_ALEN];
00058         u8 ssid[32];
00059         size_t ssid_len;
00060         int freq;
00061         u16 beacon_int;
00062         u16 caps;
00063         int qual;
00064         int noise;
00065         int level;
00066         u64 tsf;
00067         struct os_time last_update;
00068         size_t ie_len;
00069         size_t beacon_ie_len;
00070         /* followed by ie_len octets of IEs */
00071         /* followed by beacon_ie_len octets of IEs */
00072 };
00073 
00074 void wpa_bss_update_start(struct wpa_supplicant *wpa_s);
00075 void wpa_bss_update_scan_res(struct wpa_supplicant *wpa_s,
00076                              struct wpa_scan_res *res);
00077 void wpa_bss_update_end(struct wpa_supplicant *wpa_s, struct scan_info *info,
00078                         int new_scan);
00079 int wpa_bss_init(struct wpa_supplicant *wpa_s);
00080 void wpa_bss_deinit(struct wpa_supplicant *wpa_s);
00081 struct wpa_bss * wpa_bss_get(struct wpa_supplicant *wpa_s, const u8 *bssid,
00082                              const u8 *ssid, size_t ssid_len);
00083 struct wpa_bss * wpa_bss_get_bssid(struct wpa_supplicant *wpa_s,
00084                                    const u8 *bssid);
00085 struct wpa_bss * wpa_bss_get_id(struct wpa_supplicant *wpa_s, unsigned int id);
00086 const u8 * wpa_bss_get_ie(const struct wpa_bss *bss, u8 ie);
00087 const u8 * wpa_bss_get_vendor_ie(const struct wpa_bss *bss, u32 vendor_type);
00088 struct wpabuf * wpa_bss_get_vendor_ie_multi(const struct wpa_bss *bss,
00089                                             u32 vendor_type);
00090 int wpa_bss_get_max_rate(const struct wpa_bss *bss);
00091 int wpa_bss_get_bit_rates(const struct wpa_bss *bss, u8 **rates);
00092 
00093 #endif /* BSS_H */


wpa_supplicant
Author(s): Package maintained by Blaise Gassend
autogenerated on Thu Apr 24 2014 15:34:33