diff options
author | sam <sam@FreeBSD.org> | 2006-06-23 17:22:03 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2006-06-23 17:22:03 +0000 |
commit | c028917853f753acd8205ad5f7805bb7fae3783b (patch) | |
tree | 2aa76e53f243027034c1352cfecadef984bb7f86 /sbin | |
parent | d4be78a6fae10795dbaf8559b20b8f29c535b204 (diff) | |
download | FreeBSD-src-c028917853f753acd8205ad5f7805bb7fae3783b.zip FreeBSD-src-c028917853f753acd8205ad5f7805bb7fae3783b.tar.gz |
remove display of the ERP ie from the list sta output (it's always
zero); replace it with station capabilities
MFC after: 1 month
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/ifconfig/ifconfig.8 | 25 | ||||
-rw-r--r-- | sbin/ifconfig/ifieee80211.c | 35 |
2 files changed, 55 insertions, 5 deletions
diff --git a/sbin/ifconfig/ifconfig.8 b/sbin/ifconfig/ifconfig.8 index 363ec78..cf7d2d2 100644 --- a/sbin/ifconfig/ifconfig.8 +++ b/sbin/ifconfig/ifconfig.8 @@ -28,7 +28,7 @@ .\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94 .\" $FreeBSD$ .\" -.Dd April 12, 2006 +.Dd June 23, 2006 .Dt IFCONFIG 8 .Os .Sh NAME @@ -724,6 +724,29 @@ When operating as an access point display the stations that are currently associated. When operating in ad-hoc mode display stations identified as neighbors in the IBSS. +Capabilities advertised by the stations are described under +the +.Cm scan +request. +Depending on the capabilities of the stations the following +flags can be included in the output: +.Bl -tag -width 3n +.It Li A +Authorized. +Indicates that the station is permitted to send/receive data frames. +.It Li E +Extended Rate Phy (ERP). +Indicates that the station is operating in an 802.11g network +using extended transmit rates. +.It Li P +Power Save. +Indicates that the station is operating in power save mode. +.It Li Q +Quality of Service (QoS). +Indicates that the station is using QoS encapsulation for +data frame. +QoS encapsulation is enabled only when WME mode is enabled. +.El .It Cm list wme Display the current parameters to use when operating in WME mode. When WME mode is enabled for an adaptor this information will be diff --git a/sbin/ifconfig/ifieee80211.c b/sbin/ifconfig/ifieee80211.c index d660cb4..4b7c5fa 100644 --- a/sbin/ifconfig/ifieee80211.c +++ b/sbin/ifconfig/ifieee80211.c @@ -727,6 +727,33 @@ getcaps(int capinfo) return capstring; } +static const char * +getflags(int flags) +{ +/* XXX need these publicly defined or similar */ +#define IEEE80211_NODE_AUTH 0x0001 /* authorized for data */ +#define IEEE80211_NODE_QOS 0x0002 /* QoS enabled */ +#define IEEE80211_NODE_ERP 0x0004 /* ERP enabled */ +#define IEEE80211_NODE_PWR_MGT 0x0010 /* power save mode enabled */ + static char flagstring[32]; + char *cp = flagstring; + + if (flags & IEEE80211_NODE_AUTH) + *cp++ = 'A'; + if (flags & IEEE80211_NODE_QOS) + *cp++ = 'Q'; + if (flags & IEEE80211_NODE_ERP) + *cp++ = 'E'; + if (flags & IEEE80211_NODE_PWR_MGT) + *cp++ = 'P'; + *cp = '\0'; + return flagstring; +#undef IEEE80211_NODE_AUTH +#undef IEEE80211_NODE_QOS +#undef IEEE80211_NODE_ERP +#undef IEEE80211_NODE_PWR_MGT +} + static void printie(const char* tag, const uint8_t *ie, size_t ielen, int maxlen) { @@ -959,7 +986,7 @@ list_stations(int s) if (len < sizeof(struct ieee80211req_sta_info)) return; - printf("%-17.17s %4s %4s %4s %4s %4s %6s %6s %4s %3s\n" + printf("%-17.17s %4s %4s %4s %4s %4s %6s %6s %4s %4s\n" , "ADDR" , "AID" , "CHAN" @@ -969,7 +996,7 @@ list_stations(int s) , "TXSEQ" , "RXSEQ" , "CAPS" - , "ERP" + , "FLAG" ); cp = buf; do { @@ -978,7 +1005,7 @@ list_stations(int s) si = (struct ieee80211req_sta_info *) cp; vp = (u_int8_t *)(si+1); - printf("%s %4u %4d %3dM %4d %4d %6d %6d %-4.4s %3x" + printf("%s %4u %4d %3dM %4d %4d %6d %6d %-4.4s %-4.4s" , ether_ntoa((const struct ether_addr*) si->isi_macaddr) , IEEE80211_AID(si->isi_associd) , ieee80211_mhz2ieee(si->isi_freq) @@ -988,7 +1015,7 @@ list_stations(int s) , si->isi_txseqs[0] , si->isi_rxseqs[0] , getcaps(si->isi_capinfo) - , si->isi_erp + , getflags(si->isi_state) ); printies(vp, si->isi_ie_len, 24); printf("\n"); |