]> The Tcpdump Group git mirrors - libpcap/commitdiff
IEEE 802.11: add support to filter Block Ack Req & Block Ack control frames 1039/head
authorGokul Sivakumar <[email protected]>
Wed, 28 Jul 2021 16:46:18 +0000 (22:16 +0530)
committerGokul Sivakumar <[email protected]>
Wed, 28 Jul 2021 17:45:11 +0000 (23:15 +0530)
As per the IEEE 802.11-2016 std, section 9.2.4.1.3, Table 9-1, the control
frame Block Ack Request has the subtype 0b1000 and frame Block Ack has the
subtype 0b1001. Add this two control frame subtypes in ieee80211.h so that
the 802.11 frames can be filtered using "bar" or "ba" in addition to the
other ctl frame subtypes.

grammar.y.in
ieee80211.h
pcap-filter.manmisc.in

index 2fbd861533672484846966a1e87ca3af0f0cbd11..2f2c86132c3cd21d274e98ae3f4b1c30f0b5bbde 100644 (file)
@@ -171,6 +171,8 @@ static const struct tok ieee80211_mgt_subtypes[] = {
        { 0, NULL }
 };
 static const struct tok ieee80211_ctl_subtypes[] = {
+       { IEEE80211_FC0_SUBTYPE_BAR, "bar" },
+       { IEEE80211_FC0_SUBTYPE_BA, "ba" },
        { IEEE80211_FC0_SUBTYPE_PS_POLL, "ps-poll" },
        { IEEE80211_FC0_SUBTYPE_RTS, "rts" },
        { IEEE80211_FC0_SUBTYPE_CTS, "cts" },
index 473803d8a242760be6bba87c1090c7548db3b5ed..8b2641f3a8a727c8eed6873cfd865517db213b4e 100644 (file)
@@ -62,6 +62,8 @@
 #define        IEEE80211_FC0_SUBTYPE_AUTH              0xb0
 #define        IEEE80211_FC0_SUBTYPE_DEAUTH            0xc0
 /* for TYPE_CTL */
+#define        IEEE80211_FC0_SUBTYPE_BAR               0x80
+#define        IEEE80211_FC0_SUBTYPE_BA                0x90
 #define        IEEE80211_FC0_SUBTYPE_PS_POLL           0xa0
 #define        IEEE80211_FC0_SUBTYPE_RTS               0xb0
 #define        IEEE80211_FC0_SUBTYPE_CTS               0xc0
        "reserved#2",           "reserved#3",           \
        "reserved#3",           "reserved#5",           \
        "reserved#6",           "reserved#7",           \
-       "reserved#8",           "reserved#9",           \
+       "bar",                  "ba",                   \
        "ps-poll",              "rts",                  \
        "cts",                  "ack",                  \
        "cf-end",               "cf-end-ack"            \
index b4296901bf1fec997561a8cc0cbd6ba620a5812b..ab5358e9809957dead90178731b2d642849e5b08 100644 (file)
@@ -630,6 +630,8 @@ then valid \fIwlan_subtype\fRs are:
 .IP
 If the specified \fIwlan_type\fR is \fBctl\fP,
 then valid \fIwlan_subtype\fRs are:
+\fBbar\fP,
+\fBba\fP,
 \fBps-poll\fP,
 \fBrts\fP,
 \fBcts\fP,