aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2013-12-27 17:24:24 (GMT)
committerJouni Malinen <j@w1.fi>2013-12-27 17:35:12 (GMT)
commitb76f4c27638fe7b57a931c7e8b63386aebc536fb (patch)
tree6797c996bf5ac8dcd5b9442fb30de1c99a39c0a4 /hostapd
parentaa03dbd517d7ec1e1d981e7ae548e8ff3405d1f7 (diff)
downloadhostap-b76f4c27638fe7b57a931c7e8b63386aebc536fb.zip
hostap-b76f4c27638fe7b57a931c7e8b63386aebc536fb.tar.gz
hostap-b76f4c27638fe7b57a931c7e8b63386aebc536fb.tar.bz2
hostapd: Make STA flags available through ctrl_iface STA command
Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'hostapd')
-rw-r--r--hostapd/dump_state.c26
1 files changed, 5 insertions, 21 deletions
diff --git a/hostapd/dump_state.c b/hostapd/dump_state.c
index 3c639f9..0903438 100644
--- a/hostapd/dump_state.c
+++ b/hostapd/dump_state.c
@@ -100,33 +100,17 @@ static void hostapd_dump_state(struct hostapd_data *hapd)
hapd->iface->num_sta_no_short_preamble);
for (sta = hapd->sta_list; sta != NULL; sta = sta->next) {
+ char flags[200];
+
fprintf(f, "\nSTA=" MACSTR "\n", MAC2STR(sta->addr));
+ ap_sta_flags_txt(sta->flags, flags, sizeof(flags));
fprintf(f,
- " AID=%d flags=0x%x %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s"
- "\n"
+ " AID=%d flags=0x%x %s\n"
" capability=0x%x listen_interval=%d\n",
sta->aid,
sta->flags,
- (sta->flags & WLAN_STA_AUTH ? "[AUTH]" : ""),
- (sta->flags & WLAN_STA_ASSOC ? "[ASSOC]" : ""),
- (ap_sta_is_authorized(sta) ? "[AUTHORIZED]" : ""),
- (sta->flags & WLAN_STA_PENDING_POLL ? "[PENDING_POLL" :
- ""),
- (sta->flags & WLAN_STA_SHORT_PREAMBLE ?
- "[SHORT_PREAMBLE]" : ""),
- (sta->flags & WLAN_STA_PREAUTH ? "[PREAUTH]" : ""),
- (sta->flags & WLAN_STA_WMM ? "[WMM]" : ""),
- (sta->flags & WLAN_STA_MFP ? "[MFP]" : ""),
- (sta->flags & WLAN_STA_WPS ? "[WPS]" : ""),
- (sta->flags & WLAN_STA_MAYBE_WPS ? "[MAYBE_WPS]" : ""),
- (sta->flags & WLAN_STA_WDS ? "[WDS]" : ""),
- (sta->flags & WLAN_STA_NONERP ? "[NonERP]" : ""),
- (sta->flags & WLAN_STA_WPS2 ? "[WPS2]" : ""),
- (sta->flags & WLAN_STA_GAS ? "[GAS]" : ""),
- (sta->flags & WLAN_STA_VHT ? "[VHT]" : ""),
- (sta->flags & WLAN_STA_WNM_SLEEP_MODE ?
- "[WNM_SLEEP_MODE]" : ""),
+ flags,
sta->capability,
sta->listen_interval);