summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstsp <stsp@openbsd.org>2015-07-17 17:41:41 +0000
committerstsp <stsp@openbsd.org>2015-07-17 17:41:41 +0000
commit8f0a8537f79b6794476459d70c80ad4c4f3e7079 (patch)
tree5dd46bb8824bf629f66f30fd9fc779ca0a382712
parentmerge conflicts (diff)
downloadwireguard-openbsd-8f0a8537f79b6794476459d70c80ad4c4f3e7079.tar.xz
wireguard-openbsd-8f0a8537f79b6794476459d70c80ad4c4f3e7079.zip
Make tcpdump display BSS load information contained in 802.11 mgmt frames.
ok phessler sthen
-rw-r--r--usr.sbin/tcpdump/print-802_11.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/usr.sbin/tcpdump/print-802_11.c b/usr.sbin/tcpdump/print-802_11.c
index 3256adc6b8d..aa546a9d86e 100644
--- a/usr.sbin/tcpdump/print-802_11.c
+++ b/usr.sbin/tcpdump/print-802_11.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: print-802_11.c,v 1.20 2015/07/16 23:34:54 sthen Exp $ */
+/* $OpenBSD: print-802_11.c,v 1.21 2015/07/17 17:41:41 stsp Exp $ */
/*
* Copyright (c) 2005 Reyk Floeter <reyk@openbsd.org>
@@ -438,6 +438,14 @@ ieee80211_elements(struct ieee80211_frame *wh, u_int flen)
if (vflag)
ieee80211_print_htcaps(data, len);
break;
+ case IEEE80211_ELEMID_QBSS_LOAD:
+ ELEM_CHECK(5);
+ printf(", %u stations, %d%% utilization, "
+ "admission capacity %uus/s",
+ (data[0] | data[1] << 8),
+ (data[2] * 100) / 255,
+ (data[3] | data[4] << 8) / 32);
+ break;
case IEEE80211_ELEMID_VENDOR:
printf(", vendor");
if (vflag)