ap_list.h
Go to the documentation of this file.
00001 /*
00002  * hostapd / AP table
00003  * Copyright (c) 2002-2003, Jouni Malinen <j@w1.fi>
00004  * Copyright (c) 2003-2004, Instant802 Networks, Inc.
00005  * Copyright (c) 2006, Devicescape Software, Inc.
00006  *
00007  * This program is free software; you can redistribute it and/or modify
00008  * it under the terms of the GNU General Public License version 2 as
00009  * published by the Free Software Foundation.
00010  *
00011  * Alternatively, this software may be distributed under the terms of BSD
00012  * license.
00013  *
00014  * See README and COPYING for more details.
00015  */
00016 
00017 #ifndef AP_LIST_H
00018 #define AP_LIST_H
00019 
00020 struct ap_info {
00021         /* Note: next/prev pointers are updated whenever a new beacon is
00022          * received because these are used to find the least recently used
00023          * entries. iter_next/iter_prev are updated only when adding new BSSes
00024          * and when removing old ones. These should be used when iterating
00025          * through the table in a manner that allows beacons to be received
00026          * during the iteration. */
00027         struct ap_info *next; /* next entry in AP list */
00028         struct ap_info *prev; /* previous entry in AP list */
00029         struct ap_info *hnext; /* next entry in hash table list */
00030         struct ap_info *iter_next; /* next entry in AP iteration list */
00031         struct ap_info *iter_prev; /* previous entry in AP iteration list */
00032         u8 addr[6];
00033         u16 beacon_int;
00034         u16 capability;
00035         u8 supported_rates[WLAN_SUPP_RATES_MAX];
00036         u8 ssid[33];
00037         size_t ssid_len;
00038         int wpa;
00039         int erp; /* ERP Info or -1 if ERP info element not present */
00040 
00041         int channel;
00042         int datarate; /* in 100 kbps */
00043         int ssi_signal;
00044 
00045         int ht_support;
00046 
00047         unsigned int num_beacons; /* number of beacon frames received */
00048         time_t last_beacon;
00049 
00050         int already_seen; /* whether API call AP-NEW has already fetched
00051                            * information about this AP */
00052 };
00053 
00054 struct ieee802_11_elems;
00055 struct hostapd_frame_info;
00056 
00057 struct ap_info * ap_get_ap(struct hostapd_iface *iface, const u8 *sta);
00058 int ap_ap_for_each(struct hostapd_iface *iface,
00059                    int (*func)(struct ap_info *s, void *data), void *data);
00060 void ap_list_process_beacon(struct hostapd_iface *iface,
00061                             const struct ieee80211_mgmt *mgmt,
00062                             struct ieee802_11_elems *elems,
00063                             struct hostapd_frame_info *fi);
00064 #ifdef NEED_AP_MLME
00065 int ap_list_init(struct hostapd_iface *iface);
00066 void ap_list_deinit(struct hostapd_iface *iface);
00067 #else /* NEED_AP_MLME */
00068 static inline int ap_list_init(struct hostapd_iface *iface)
00069 {
00070         return 0;
00071 }
00072 
00073 static inline void ap_list_deinit(struct hostapd_iface *iface)
00074 {
00075 }
00076 #endif /* NEED_AP_MLME */
00077 
00078 #endif /* AP_LIST_H */


wpa_supplicant
Author(s): Package maintained by Blaise Gassend
autogenerated on Thu Jan 2 2014 11:26:36