aboutsummaryrefslogtreecommitdiffstats
path: root/src/ap/ap_list.h
blob: 9e0353cfec95a3da8fdbb3d0506bf4b3f99b1dac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*
 * hostapd / AP table
 * Copyright (c) 2002-2003, Jouni Malinen <j@w1.fi>
 * Copyright (c) 2003-2004, Instant802 Networks, Inc.
 * Copyright (c) 2006, Devicescape Software, Inc.
 *
 * This software may be distributed under the terms of the BSD license.
 * See README for more details.
 */

#ifndef AP_LIST_H
#define AP_LIST_H

struct ap_info {
	/* Note: next/prev pointers are updated whenever a new beacon is
	 * received because these are used to find the least recently used
	 * entries. */
	struct ap_info *next; /* next entry in AP list */
	struct ap_info *prev; /* previous entry in AP list */
	struct ap_info *hnext; /* next entry in hash table list */
	u8 addr[6];
	u8 supported_rates[WLAN_SUPP_RATES_MAX];
	int erp; /* ERP Info or -1 if ERP info element not present */

	int channel;

	int ht_support;

	struct os_reltime last_beacon;
};

struct ieee802_11_elems;
struct hostapd_frame_info;

void ap_list_process_beacon(struct hostapd_iface *iface,
			    const struct ieee80211_mgmt *mgmt,
			    struct ieee802_11_elems *elems,
			    struct hostapd_frame_info *fi);
#ifdef NEED_AP_MLME
int ap_list_init(struct hostapd_iface *iface);
void ap_list_deinit(struct hostapd_iface *iface);
void ap_list_timer(struct hostapd_iface *iface);
#else /* NEED_AP_MLME */
static inline int ap_list_init(struct hostapd_iface *iface)
{
	return 0;
}

static inline void ap_list_deinit(struct hostapd_iface *iface)
{
}

static inline void ap_list_timer(struct hostapd_iface *iface)
{
}
#endif /* NEED_AP_MLME */

#endif /* AP_LIST_H */