]> The Tcpdump Group git mirrors - tcpdump/commitdiff
The FC flag is now "protected", not "WEP".
authorGuy Harris <[email protected]>
Thu, 16 Apr 2015 03:11:41 +0000 (20:11 -0700)
committerGuy Harris <[email protected]>
Thu, 16 Apr 2015 03:11:41 +0000 (20:11 -0700)
It's also used for WPA/WPA2, so it's a generic "protected by encryption"
flag.  Update the name of the macro that checks it, and report it as
"Protected" rather than "WEP Encrypted".

print-802_11.c
tests/ieee802.11_rx-stbc.out

index 489aec4e5e1e965be00065c62b1368d4861682ac..d7310cb2d53f38250a80e845331d52f5799b2dd1 100644 (file)
@@ -168,7 +168,7 @@ static const struct tok ctrl_str[] = {
 #define        FC_RETRY(fc)            ((fc) & 0x0800)
 #define        FC_POWER_MGMT(fc)       ((fc) & 0x1000)
 #define        FC_MORE_DATA(fc)        ((fc) & 0x2000)
-#define        FC_WEP(fc)              ((fc) & 0x4000)
+#define        FC_PROTECTED(fc)        ((fc) & 0x4000)
 #define        FC_ORDER(fc)            ((fc) & 0x8000)
 
 struct mgmt_header_t {
@@ -2274,8 +2274,8 @@ ieee_802_11_hdr_print(netdissect_options *ndo,
                        ND_PRINT((ndo, "Retry "));
                if (FC_ORDER(fc))
                        ND_PRINT((ndo, "Strictly Ordered "));
-               if (FC_WEP(fc))
-                       ND_PRINT((ndo, "WEP Encrypted "));
+               if (FC_PROTECTED(fc))
+                       ND_PRINT((ndo, "Protected "));
                if (FC_TYPE(fc) != T_CTRL || FC_SUBTYPE(fc) != CTRL_PS_POLL)
                        ND_PRINT((ndo, "%dus ",
                            EXTRACT_LE_16BITS(
@@ -2377,9 +2377,9 @@ ieee802_11_print(netdissect_options *ndo,
 
        switch (FC_TYPE(fc)) {
        case T_MGMT:
-               if (FC_WEP(fc)) {
+               if (FC_PROTECTED(fc)) {
                        if (!ndo->ndo_eflag)
-                               ND_PRINT((ndo, "WEP Encrypted "));
+                               ND_PRINT((ndo, "Protected "));
                }
                if (!mgmt_body_print(ndo, fc,
                    (const struct mgmt_header_t *)(p - hdrlen), p, length)) {
@@ -2397,9 +2397,9 @@ ieee802_11_print(netdissect_options *ndo,
                if (DATA_FRAME_IS_NULL(FC_SUBTYPE(fc)))
                        return hdrlen;  /* no-data frame */
                /* There may be a problem w/ AP not having this bit set */
-               if (FC_WEP(fc)) {
+               if (FC_PROTECTED(fc)) {
                        if (!ndo->ndo_eflag)
-                               ND_PRINT((ndo, "WEP Encrypted "));
+                               ND_PRINT((ndo, "Protected "));
                        if (!wep_print(ndo, p)) {
                                ND_PRINT((ndo, "%s", tstr));
                                return hdrlen;
index c86f7ff19503e383f7b305f9bdcccbed9b843f48..c45fcb550d7007d8519fa7de54b89bcdb205dd7f 100644 (file)
@@ -1,3 +1,3 @@
-7268us tsft 2462 MHz 11g -51dB signal antenna 1 150.0 Mb/s MCS 7 40 MHz short GI RX-STBC1 WEP Encrypted Data IV: 11 Pad 20 KeyID 0
-119738173us tsft 2462 MHz 11g -46dB signal antenna 1 135.0 Mb/s MCS 7 40 MHz lon GI RX-STBC2 WEP Encrypted Data IV:  1 Pad 20 KeyID 0
-470382336us tsft 2462 MHz 11g -45dB signal antenna 1 150.0 Mb/s MCS 7 40 MHz short GI RX-STBC3 WEP Encrypted Data IV:  5 Pad 20 KeyID 0
+7268us tsft 2462 MHz 11g -51dB signal antenna 1 150.0 Mb/s MCS 7 40 MHz short GI RX-STBC1 Protected Data IV: 11 Pad 20 KeyID 0
+119738173us tsft 2462 MHz 11g -46dB signal antenna 1 135.0 Mb/s MCS 7 40 MHz lon GI RX-STBC2 Protected Data IV:  1 Pad 20 KeyID 0
+470382336us tsft 2462 MHz 11g -45dB signal antenna 1 150.0 Mb/s MCS 7 40 MHz short GI RX-STBC3 Protected Data IV:  5 Pad 20 KeyID 0