aboutsummaryrefslogtreecommitdiff
path: root/sbin/ifconfig
diff options
context:
space:
mode:
authorAdrian Chadd <adrian@FreeBSD.org>2016-03-18 04:22:07 +0000
committerAdrian Chadd <adrian@FreeBSD.org>2016-03-18 04:22:07 +0000
commit56fe6744fef3741046bb99f5be4618c8e2914eaf (patch)
tree1fe180d16022bec6ab0b0a2246c8038fdd8edd09 /sbin/ifconfig
parente3b60083ce7d057da79266fe0796d3f57c21c37d (diff)
downloadsrc-56fe6744fef3741046bb99f5be4618c8e2914eaf.tar.gz
src-56fe6744fef3741046bb99f5be4618c8e2914eaf.zip
Add parsing for AP channel report IE.
Eg: TP-LINK_D579 60:e3:27:e1:d5:79 10 54M -72:-95 100 EP SSID<TP-LINK_D579> RATES<B2,B4,B11,B22,18,36,72,108> DSPARMS<10> XRATES<12,24,48,96> COUNTRY<US 1-11,20> APCHANREP<class 32, chan:[1,2,3,4,5,6,7]> APCHANREP<class 33, chan:[5,6,7,8,9,10,11]> TIM<050400010000> ERP<0x4> HTCAP<cap 0x106e param 0x17 mcsset[0-15,32] extcap 0x0 txbf 0x0 antenna 0x0> HTINFO<ctl 10, 7,0,0,0 basicmcs[]> ???<4a0e14000a002c01c800140005001900> RSN<v1 mc:AES-CCMP uc:AES-CCMP km:8021X-PSK> WME<qosinfo 0x0 BE[aifsn 3 cwmin 4 cwmax 10 txop 0] BK[aifsn 7 cwmin 4 cwmax 10 txop 0] VO[aifsn 2 cwmin 3 cwmax 4 txop 94] VI[aifsn 2 cwmin 2 cwmax 3 txop 47]> BSSLOAD<sta count 0, chan load 11, aac 18> VEN<dd07000c4300000000>
Notes
Notes: svn path=/head/; revision=297010
Diffstat (limited to 'sbin/ifconfig')
-rw-r--r--sbin/ifconfig/ifieee80211.c26
1 files changed, 23 insertions, 3 deletions
diff --git a/sbin/ifconfig/ifieee80211.c b/sbin/ifconfig/ifieee80211.c
index a0247a785375..84daec9681d1 100644
--- a/sbin/ifconfig/ifieee80211.c
+++ b/sbin/ifconfig/ifieee80211.c
@@ -2727,6 +2727,26 @@ printbssload(const char *tag, const uint8_t *ie, size_t ielen, int maxlen)
}
}
+static void
+printapchanrep(const char *tag, const u_int8_t *ie, size_t ielen, int maxlen)
+{
+ printf("%s", tag);
+ if (verbose) {
+ const struct ieee80211_ap_chan_report_ie *ap =
+ (const struct ieee80211_ap_chan_report_ie *) ie;
+ const char *sep = "";
+ int i;
+
+ printf("<class %u, chan:[", ap->i_class);
+
+ for (i = 3; i < ielen; i++) {
+ printf("%s%u", sep, ie[i]);
+ sep = ",";
+ }
+ printf("]>");
+ }
+}
+
static const char *
wpa_cipher(const u_int8_t *sel)
{
@@ -3129,11 +3149,8 @@ iename(int elemid)
case IEEE80211_ELEMID_MEASREP: return " MEASREP";
case IEEE80211_ELEMID_QUIET: return " QUIET";
case IEEE80211_ELEMID_IBSSDFS: return " IBSSDFS";
- case IEEE80211_ELEMID_APCHANREP:return " APCHANREP";
case IEEE80211_ELEMID_TPC: return " TPC";
case IEEE80211_ELEMID_CCKM: return " CCKM";
- case IEEE80211_ELEMID_VHT_CAP: return " VHTCAP";
- case IEEE80211_ELEMID_VHT_OPMODE: return " VHTOPMODE";
case IEEE80211_ELEMID_VHT_PWR_ENV: return " VHTPWRENV";
}
return " ???";
@@ -3208,6 +3225,9 @@ printies(const u_int8_t *vp, int ielen, int maxcols)
case IEEE80211_ELEMID_BSSLOAD:
printbssload(" BSSLOAD", vp, 2+vp[1], maxcols);
break;
+ case IEEE80211_ELEMID_APCHANREP:
+ printapchanrep(" APCHANREP", vp, 2+vp[1], maxcols);
+ break;
default:
if (verbose)
printie(iename(vp[0]), vp, 2+vp[1], maxcols);