3 * Copyright (c) 2002-2003, Jouni Malinen <j@w1.fi>
4 * Copyright (c) 2003-2004, Instant802 Networks, Inc.
5 * Copyright (c) 2006, Devicescape Software, Inc.
7 * This software may be distributed under the terms of the BSD license.
8 * See README for more details.
15 /* Note: next/prev pointers are updated whenever a new beacon is
16 * received because these are used to find the least recently used
17 * entries. iter_next/iter_prev are updated only when adding new BSSes
18 * and when removing old ones. These should be used when iterating
19 * through the table in a manner that allows beacons to be received
20 * during the iteration. */
21 struct ap_info *next; /* next entry in AP list */
22 struct ap_info *prev; /* previous entry in AP list */
23 struct ap_info *hnext; /* next entry in hash table list */
24 struct ap_info *iter_next; /* next entry in AP iteration list */
25 struct ap_info *iter_prev; /* previous entry in AP iteration list */
29 u8 supported_rates[WLAN_SUPP_RATES_MAX];
33 int erp; /* ERP Info or -1 if ERP info element not present */
36 int datarate; /* in 100 kbps */
40 unsigned int num_beacons; /* number of beacon frames received */
41 os_time_t last_beacon;
43 int already_seen; /* whether API call AP-NEW has already fetched
44 * information about this AP */
47 struct ieee802_11_elems;
48 struct hostapd_frame_info;
50 struct ap_info * ap_get_ap(struct hostapd_iface *iface, const u8 *sta);
51 int ap_ap_for_each(struct hostapd_iface *iface,
52 int (*func)(struct ap_info *s, void *data), void *data);
53 void ap_list_process_beacon(struct hostapd_iface *iface,
54 const struct ieee80211_mgmt *mgmt,
55 struct ieee802_11_elems *elems,
56 struct hostapd_frame_info *fi);
58 int ap_list_init(struct hostapd_iface *iface);
59 void ap_list_deinit(struct hostapd_iface *iface);
60 #else /* NEED_AP_MLME */
61 static inline int ap_list_init(struct hostapd_iface *iface)
66 static inline void ap_list_deinit(struct hostapd_iface *iface)
69 #endif /* NEED_AP_MLME */
71 #endif /* AP_LIST_H */