sta_info.h
Go to the documentation of this file.00001
00016 #ifndef STA_INFO_H
00017 #define STA_INFO_H
00018
00019 #include "sta_flags.h"
00020
00021 #ifdef CONFIG_IEEE80211N
00022 #include "ieee802_11_defs.h"
00023 #endif
00024
00025
00026
00027 #define WLAN_SUPP_RATES_MAX 32
00028
00029
00030 struct sta_info {
00031 struct sta_info *next;
00032 struct sta_info *hnext;
00033 u8 addr[6];
00034 u16 aid;
00035 u32 flags;
00036 u16 capability;
00037 u16 listen_interval;
00038 u8 supported_rates[WLAN_SUPP_RATES_MAX];
00039 int supported_rates_len;
00040
00041 unsigned int nonerp_set:1;
00042 unsigned int no_short_slot_time_set:1;
00043 unsigned int no_short_preamble_set:1;
00044 unsigned int no_ht_gf_set:1;
00045 unsigned int no_ht_set:1;
00046 unsigned int ht_20mhz_set:1;
00047
00048 u16 auth_alg;
00049 u8 previous_ap[6];
00050
00051 enum {
00052 STA_NULLFUNC = 0, STA_DISASSOC, STA_DEAUTH, STA_REMOVE
00053 } timeout_next;
00054
00055
00056 struct eapol_state_machine *eapol_sm;
00057
00058
00059 struct ieee80211_mgmt *last_assoc_req;
00060
00061 u32 acct_session_id_hi;
00062 u32 acct_session_id_lo;
00063 time_t acct_session_start;
00064 int acct_session_started;
00065 int acct_terminate_cause;
00066 int acct_interim_interval;
00067
00068 unsigned long last_rx_bytes;
00069 unsigned long last_tx_bytes;
00070 u32 acct_input_gigawords;
00071 u32 acct_output_gigawords;
00072
00073 u8 *challenge;
00074
00075 struct wpa_state_machine *wpa_sm;
00076 struct rsn_preauth_interface *preauth_iface;
00077
00078 struct hostapd_ssid *ssid;
00079 struct hostapd_ssid *ssid_probe;
00080
00081 int vlan_id;
00082
00083 #ifdef CONFIG_IEEE80211N
00084 struct ht_cap_ie ht_capabilities;
00085 #endif
00086
00087 #ifdef CONFIG_IEEE80211W
00088 int sa_query_count;
00089
00090 int sa_query_timed_out;
00091 u8 *sa_query_trans_id;
00092
00093
00094 struct os_time sa_query_start;
00095 #endif
00096
00097 struct wpabuf *wps_ie;
00098 };
00099
00100
00101
00102
00103
00104
00105
00106
00107 #define AP_MAX_INACTIVITY (5 * 60)
00108 #define AP_DISASSOC_DELAY (1)
00109 #define AP_DEAUTH_DELAY (1)
00110
00111
00112 #define AP_MAX_INACTIVITY_AFTER_DISASSOC (1 * 30)
00113
00114 #define AP_MAX_INACTIVITY_AFTER_DEAUTH (1 * 5)
00115
00116
00117 struct hostapd_data;
00118
00119 int ap_for_each_sta(struct hostapd_data *hapd,
00120 int (*cb)(struct hostapd_data *hapd, struct sta_info *sta,
00121 void *ctx),
00122 void *ctx);
00123 struct sta_info * ap_get_sta(struct hostapd_data *hapd, const u8 *sta);
00124 void ap_sta_hash_add(struct hostapd_data *hapd, struct sta_info *sta);
00125 void ap_free_sta(struct hostapd_data *hapd, struct sta_info *sta);
00126 void ap_free_sta(struct hostapd_data *hapd, struct sta_info *sta);
00127 void hostapd_free_stas(struct hostapd_data *hapd);
00128 void ap_handle_timer(void *eloop_ctx, void *timeout_ctx);
00129 void ap_sta_session_timeout(struct hostapd_data *hapd, struct sta_info *sta,
00130 u32 session_timeout);
00131 void ap_sta_no_session_timeout(struct hostapd_data *hapd,
00132 struct sta_info *sta);
00133 struct sta_info * ap_sta_add(struct hostapd_data *hapd, const u8 *addr);
00134 void ap_sta_disassociate(struct hostapd_data *hapd, struct sta_info *sta,
00135 u16 reason);
00136 void ap_sta_deauthenticate(struct hostapd_data *hapd, struct sta_info *sta,
00137 u16 reason);
00138 int ap_sta_bind_vlan(struct hostapd_data *hapd, struct sta_info *sta,
00139 int old_vlanid);
00140 void ap_sta_start_sa_query(struct hostapd_data *hapd, struct sta_info *sta);
00141 void ap_sta_stop_sa_query(struct hostapd_data *hapd, struct sta_info *sta);
00142 int ap_check_sa_query_timeout(struct hostapd_data *hapd, struct sta_info *sta);
00143
00144 #endif
00145