This teaches tcpdump to print the channel switch announcements used
for DFS and Ruckus ChannelFly, described in 7.3.2.20 in 802.11h-2003.
I think the "noTX" is used for radar-detected DFS where you want
everybody to shut up quickly, I don't have a good way to trigger
that ;)
I considered hiding output behind -v, but I think it's important enough
to display by default (it isn't present in every beacon, only in the ones
immediately preceding a channel switch, so doesn't add spam to the normal
case).
Sample output below the diff.
Any comments/OKs? Thanks.
Index: sys/net80211/ieee80211.h
===================================================================
RCS file: /cvs/src/sys/net80211/ieee80211.h,v
retrieving revision 1.50
diff -u -p -r1.50 ieee80211.h
--- sys/net80211/ieee80211.h 17 Jan 2013 02:51:56 -0000 1.50
+++ sys/net80211/ieee80211.h 8 Apr 2015 11:48:11 -0000
@@ -327,6 +327,7 @@ enum {
IEEE80211_ELEMID_EDCAPARMS = 12,
IEEE80211_ELEMID_CHALLENGE = 16,
/* 17-31 reserved for challenge text extension */
+ IEEE80211_ELEMID_CSA = 37, /* 11h */
IEEE80211_ELEMID_ERP = 42,
IEEE80211_ELEMID_HTCAPS = 45, /* 11n */
IEEE80211_ELEMID_QOS_CAP = 46,
Index: usr.sbin/tcpdump/print-802_11.c
===================================================================
RCS file: /cvs/src/usr.sbin/tcpdump/print-802_11.c,v
retrieving revision 1.16
diff -u -p -r1.16 print-802_11.c
--- usr.sbin/tcpdump/print-802_11.c 16 Jan 2015 06:40:21 -0000 1.16
+++ usr.sbin/tcpdump/print-802_11.c 8 Apr 2015 11:48:11 -0000
@@ -323,6 +323,10 @@ ieee80211_elements(struct ieee80211_fram
if (vflag)
ieee80211_print_element(data, len);
break;
+ case IEEE80211_ELEMID_CSA:
+ printf(", csa (chan %u count %u%s)", data[1], data[2],
+ (data[0] == 1) ? " noTX" : "");
+ break;
case IEEE80211_ELEMID_ERP:
printf(", erp");
if (vflag)
12:24:47.546150 802.11: beacon, ssid (Y2), rates, ds, tim, erp, xrates, vendor,
45:26, 61:22, 127:4, vendor, rsn, <radiotap v0, chan 11, 11g, sig -62dBm, noise
-91dBm>
12:24:49.899297 802.11: beacon, ssid (Y2), rates, ds, tim, csa (chan 9 count
6), erp, xrates, vendor, 45:26, 61:22, 127:4, vendor, rsn, <radiotap v0, chan
11, 11g, sig -59dBm, noise -91dBm>
12:24:50.001676 802.11: beacon, ssid (Y2), rates, ds, tim, csa (chan 9 count
5), erp, xrates, vendor, 45:26, 61:22, 127:4, vendor, rsn, <radiotap v0, chan
11, 11g, sig -54dBm, noise -91dBm>
12:24:50.104076 802.11: beacon, ssid (Y2), rates, ds, tim, csa (chan 9 count
4), erp, xrates, vendor, 45:26, 61:22, 127:4, vendor, rsn, <radiotap v0, chan
11, 11g, sig -63dBm, noise -83dBm>
12:24:50.206478 802.11: beacon, ssid (Y2), rates, ds, tim, csa (chan 9 count
3), erp, xrates, vendor, 45:26, 61:22, 127:4, vendor, rsn, <radiotap v0, chan
11, 11g, sig -62dBm, noise -83dBm>
12:24:50.308877 802.11: beacon, ssid (Y2), rates, ds, tim, csa (chan 9 count
2), erp, xrates, vendor, 45:26, 61:22, 127:4, vendor, rsn, <radiotap v0, chan
11, 11g, sig -62dBm, noise -91dBm>
12:24:50.411272 802.11: beacon, ssid (Y2), rates, ds, tim, csa (chan 9 count
1), erp, xrates, vendor, 45:26, 61:22, 127:4, vendor, rsn, <radiotap v0, chan
11, 11g, sig -64dBm, noise -91dBm>