2 * hostapd / Initialization and configuration
3 * Host AP kernel driver
4 * Copyright (c) 2002-2008, Jouni Malinen <j@w1.fi>
5 * Copyright (c) 2007-2008, Intel Corporation
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
11 * Alternatively, this software may be distributed under the terms of BSD
14 * See README and COPYING for more details.
22 #include "hostapd_defs.h"
25 struct wpa_driver_ops;
27 struct radius_server_data;
29 #ifdef CONFIG_FULL_DYNAMIC_VLAN
30 struct full_dynamic_vlan;
31 #endif /* CONFIG_FULL_DYNAMIC_VLAN */
34 * struct hostapd_data - hostapd per-BSS data structure
37 struct hostapd_iface *iface;
38 struct hostapd_config *iconf;
39 struct hostapd_bss_config *conf;
40 int interface_added; /* virtual interface added for this BSS */
42 u8 own_addr[ETH_ALEN];
44 int num_sta; /* number of entries in sta_list */
45 struct sta_info *sta_list; /* STA info list head */
46 struct sta_info *sta_hash[STA_HASH_SIZE];
48 /* pointers to STA info; based on allocated AID or NULL if AID free
49 * AID is in the range 1-2007, so sta_aid[0] corresponders to AID 1
52 struct sta_info *sta_aid[MAX_AID_TABLE_SIZE];
54 const struct wpa_driver_ops *driver;
58 u8 default_wep_key_idx;
60 struct radius_client_data *radius;
61 int radius_client_reconfigured;
62 u32 acct_session_id_hi, acct_session_id_lo;
64 struct iapp_data *iapp;
66 struct hostapd_cached_radius_acl *acl_cache;
67 struct hostapd_acl_query_data *acl_queries;
69 struct wpa_authenticator *wpa_auth;
70 struct eapol_authenticator *eapol_auth;
72 struct rsn_preauth_interface *preauth_iface;
73 time_t michael_mic_failure;
74 int michael_mic_failures;
75 int tkip_countermeasures;
78 struct wpa_ctrl_dst *ctrl_dst;
81 void *eap_sim_db_priv;
82 struct radius_server_data *radius_srv;
84 int parameter_set_count;
86 #ifdef CONFIG_FULL_DYNAMIC_VLAN
87 struct full_dynamic_vlan *full_dynamic_vlan;
88 #endif /* CONFIG_FULL_DYNAMIC_VLAN */
90 struct l2_packet_data *l2;
91 struct wps_context *wps;
95 size_t wps_beacon_ie_len;
96 u8 *wps_probe_resp_ie;
97 size_t wps_probe_resp_ie_len;
98 #endif /* CONFIG_WPS */
103 * struct hostapd_iface - hostapd per-interface data structure
105 struct hostapd_iface {
107 struct hostapd_config *conf;
110 struct hostapd_data **bss;
112 int num_ap; /* number of entries in ap_list */
113 struct ap_info *ap_list; /* AP info list head */
114 struct ap_info *ap_hash[STA_HASH_SIZE];
115 struct ap_info *ap_iter_list;
117 struct hostapd_hw_modes *hw_features;
119 struct hostapd_hw_modes *current_mode;
120 /* Rates that are currently used (i.e., filtered copy of
121 * current_mode->channels */
123 struct hostapd_rate_data *current_rates;
127 /* Number of associated Non-ERP stations (i.e., stations using 802.11b
131 /* Number of associated stations that do not support Short Slot Time */
132 int num_sta_no_short_slot_time;
134 /* Number of associated stations that do not support Short Preamble */
135 int num_sta_no_short_preamble;
137 int olbc; /* Overlapping Legacy BSS Condition */
139 /* Number of HT associated stations that do not support greenfield */
140 int num_sta_ht_no_gf;
142 /* Number of associated non-HT stations */
145 /* Number of HT associated stations 20 MHz */
146 int num_sta_ht_20mhz;
148 /* Overlapping BSS information */
151 #ifdef CONFIG_IEEE80211N
153 #endif /* CONFIG_IEEE80211N */
156 int hostapd_reload_config(struct hostapd_iface *iface);
157 int hostapd_for_each_interface(int (*cb)(struct hostapd_iface *iface,
158 void *ctx), void *ctx);
160 #endif /* HOSTAPD_H */