• Home
  • Raw
  • Download

Lines Matching refs:sta

29 				   struct sta_info *sta);
33 struct sta_info *sta, in accounting_msg() argument
50 if (sta) { in accounting_msg()
51 radius_msg_make_authenticator(msg, (u8 *) sta, sizeof(*sta)); in accounting_msg()
54 sta->acct_session_id_hi, sta->acct_session_id_lo); in accounting_msg()
80 if (sta) { in accounting_msg()
82 val = ieee802_1x_get_identity(sta->eapol_sm, &len); in accounting_msg()
85 if (!val && sta->identity) { in accounting_msg()
86 val = (u8 *) sta->identity; in accounting_msg()
87 len = os_strlen(sta->identity); in accounting_msg()
94 MAC2STR(sta->addr)); in accounting_msg()
106 if (add_common_radius_attr(hapd, hapd->conf->radius_acct_req_attr, sta, in accounting_msg()
110 if (sta) { in accounting_msg()
112 val = ieee802_1x_get_radius_class(sta->eapol_sm, &len, in accounting_msg()
124 b = ieee802_1x_get_radius_cui(sta->eapol_sm); in accounting_msg()
133 if (!b && sta->radius_cui && in accounting_msg()
136 (u8 *) sta->radius_cui, in accounting_msg()
137 os_strlen(sta->radius_cui))) { in accounting_msg()
152 struct sta_info *sta, in accounting_sta_update_stats() argument
155 if (hostapd_drv_read_sta_data(hapd, data, sta->addr)) in accounting_sta_update_stats()
158 if (sta->last_rx_bytes > data->rx_bytes) in accounting_sta_update_stats()
159 sta->acct_input_gigawords++; in accounting_sta_update_stats()
160 if (sta->last_tx_bytes > data->tx_bytes) in accounting_sta_update_stats()
161 sta->acct_output_gigawords++; in accounting_sta_update_stats()
162 sta->last_rx_bytes = data->rx_bytes; in accounting_sta_update_stats()
163 sta->last_tx_bytes = data->tx_bytes; in accounting_sta_update_stats()
165 hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_RADIUS, in accounting_sta_update_stats()
169 sta->last_rx_bytes, sta->acct_input_gigawords, in accounting_sta_update_stats()
170 sta->last_tx_bytes, sta->acct_output_gigawords); in accounting_sta_update_stats()
179 struct sta_info *sta = timeout_ctx; in accounting_interim_update() local
182 if (sta->acct_interim_interval) { in accounting_interim_update()
183 accounting_sta_interim(hapd, sta); in accounting_interim_update()
184 interval = sta->acct_interim_interval; in accounting_interim_update()
187 accounting_sta_update_stats(hapd, sta, &data); in accounting_interim_update()
192 hapd, sta); in accounting_interim_update()
201 void accounting_sta_start(struct hostapd_data *hapd, struct sta_info *sta) in accounting_sta_start() argument
206 if (sta->acct_session_started) in accounting_sta_start()
209 hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_RADIUS, in accounting_sta_start()
212 sta->acct_session_id_hi, sta->acct_session_id_lo); in accounting_sta_start()
214 os_get_reltime(&sta->acct_session_start); in accounting_sta_start()
215 sta->last_rx_bytes = sta->last_tx_bytes = 0; in accounting_sta_start()
216 sta->acct_input_gigawords = sta->acct_output_gigawords = 0; in accounting_sta_start()
217 hostapd_drv_sta_clear_stats(hapd, sta->addr); in accounting_sta_start()
222 if (sta->acct_interim_interval) in accounting_sta_start()
223 interval = sta->acct_interim_interval; in accounting_sta_start()
227 hapd, sta); in accounting_sta_start()
229 msg = accounting_msg(hapd, sta, RADIUS_ACCT_STATUS_TYPE_START); in accounting_sta_start()
231 radius_client_send(hapd->radius, msg, RADIUS_ACCT, sta->addr) < 0) in accounting_sta_start()
234 sta->acct_session_started = 1; in accounting_sta_start()
239 struct sta_info *sta, int stop) in accounting_sta_report() argument
242 int cause = sta->acct_terminate_cause; in accounting_sta_report()
251 msg = accounting_msg(hapd, sta, in accounting_sta_report()
261 os_reltime_sub(&now_r, &sta->acct_session_start, &diff); in accounting_sta_report()
268 if (accounting_sta_update_stats(hapd, sta, &data) == 0) { in accounting_sta_report()
287 gigawords = sta->acct_input_gigawords; in accounting_sta_report()
304 gigawords = sta->acct_output_gigawords; in accounting_sta_report()
335 sta->addr) < 0) in accounting_sta_report()
350 struct sta_info *sta) in accounting_sta_interim() argument
352 if (sta->acct_session_started) in accounting_sta_interim()
353 accounting_sta_report(hapd, sta, 0); in accounting_sta_interim()
362 void accounting_sta_stop(struct hostapd_data *hapd, struct sta_info *sta) in accounting_sta_stop() argument
364 if (sta->acct_session_started) { in accounting_sta_stop()
365 accounting_sta_report(hapd, sta, 1); in accounting_sta_stop()
366 eloop_cancel_timeout(accounting_interim_update, hapd, sta); in accounting_sta_stop()
367 hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_RADIUS, in accounting_sta_stop()
370 sta->acct_session_id_hi, in accounting_sta_stop()
371 sta->acct_session_id_lo); in accounting_sta_stop()
372 sta->acct_session_started = 0; in accounting_sta_stop()
378 struct sta_info *sta) in accounting_sta_get_id() argument
380 sta->acct_session_id_lo = hapd->acct_session_id_lo++; in accounting_sta_get_id()
384 sta->acct_session_id_hi = hapd->acct_session_id_hi; in accounting_sta_get_id()