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;
28 struct upnp_wps_device_sm;
30 #ifdef CONFIG_FULL_DYNAMIC_VLAN
31 struct full_dynamic_vlan;
32 #endif /* CONFIG_FULL_DYNAMIC_VLAN */
35 * struct hostapd_data - hostapd per-BSS data structure
38 struct hostapd_iface *iface;
39 struct hostapd_config *iconf;
40 struct hostapd_bss_config *conf;
41 int interface_added; /* virtual interface added for this BSS */
43 u8 own_addr[ETH_ALEN];
45 int num_sta; /* number of entries in sta_list */
46 struct sta_info *sta_list; /* STA info list head */
47 struct sta_info *sta_hash[STA_HASH_SIZE];
49 /* pointers to STA info; based on allocated AID or NULL if AID free
50 * AID is in the range 1-2007, so sta_aid[0] corresponders to AID 1
53 struct sta_info *sta_aid[MAX_AID_TABLE_SIZE];
55 const struct wpa_driver_ops *driver;
59 u8 default_wep_key_idx;
61 struct radius_client_data *radius;
62 int radius_client_reconfigured;
63 u32 acct_session_id_hi, acct_session_id_lo;
65 struct iapp_data *iapp;
67 struct hostapd_cached_radius_acl *acl_cache;
68 struct hostapd_acl_query_data *acl_queries;
70 struct wpa_authenticator *wpa_auth;
71 struct eapol_authenticator *eapol_auth;
73 struct rsn_preauth_interface *preauth_iface;
74 time_t michael_mic_failure;
75 int michael_mic_failures;
76 int tkip_countermeasures;
79 struct wpa_ctrl_dst *ctrl_dst;
82 void *eap_sim_db_priv;
83 struct radius_server_data *radius_srv;
85 int parameter_set_count;
87 #ifdef CONFIG_FULL_DYNAMIC_VLAN
88 struct full_dynamic_vlan *full_dynamic_vlan;
89 #endif /* CONFIG_FULL_DYNAMIC_VLAN */
91 struct l2_packet_data *l2;
92 struct wps_context *wps;
96 size_t wps_beacon_ie_len;
97 u8 *wps_probe_resp_ie;
98 size_t wps_probe_resp_ie_len;
99 unsigned int ap_pin_failures;
100 struct upnp_wps_device_sm *wps_upnp;
101 #endif /* CONFIG_WPS */
106 * struct hostapd_iface - hostapd per-interface data structure
108 struct hostapd_iface {
110 struct hostapd_config *conf;
113 struct hostapd_data **bss;
115 int num_ap; /* number of entries in ap_list */
116 struct ap_info *ap_list; /* AP info list head */
117 struct ap_info *ap_hash[STA_HASH_SIZE];
118 struct ap_info *ap_iter_list;
120 struct hostapd_hw_modes *hw_features;
122 struct hostapd_hw_modes *current_mode;
123 /* Rates that are currently used (i.e., filtered copy of
124 * current_mode->channels */
126 struct hostapd_rate_data *current_rates;
130 /* Number of associated Non-ERP stations (i.e., stations using 802.11b
134 /* Number of associated stations that do not support Short Slot Time */
135 int num_sta_no_short_slot_time;
137 /* Number of associated stations that do not support Short Preamble */
138 int num_sta_no_short_preamble;
140 int olbc; /* Overlapping Legacy BSS Condition */
142 /* Number of HT associated stations that do not support greenfield */
143 int num_sta_ht_no_gf;
145 /* Number of associated non-HT stations */
148 /* Number of HT associated stations 20 MHz */
149 int num_sta_ht_20mhz;
151 /* Overlapping BSS information */
154 #ifdef CONFIG_IEEE80211N
156 #endif /* CONFIG_IEEE80211N */
159 int hostapd_reload_config(struct hostapd_iface *iface);
160 int hostapd_for_each_interface(int (*cb)(struct hostapd_iface *iface,
161 void *ctx), void *ctx);
163 #endif /* HOSTAPD_H */