]> The Tcpdump Group git mirrors - libpcap/commit
Replace gen_check_802_11_data_frame() with gen_mcmp().
authorDenis Ovsienko <[email protected]>
Sun, 16 Mar 2025 10:10:42 +0000 (10:10 +0000)
committerDenis Ovsienko <[email protected]>
Sun, 16 Mar 2025 12:30:15 +0000 (12:30 +0000)
commitc103057483c1ea724f27cdf94bc27bc1125700bb
tree489fe538ed8b1c937b1a9aad10e96e2f7a72fa27
parent1325e8dd0280dc632bd8266a2685455e968c1018
Replace gen_check_802_11_data_frame() with gen_mcmp().

In the FC0 byte of the IEEE 802.11 header instead of testing separately
one bit for being set and another bit for being unset test one value
using a 2-bit bitmask.  For each of the five DLTs that used the function
this change trades two instructions for two other instructions, also for
DLT_IEEE802_11 and DLT_PRISM_HEADER it eliminates duplicate loads.
Another effect is that for the five DLTs "llc" and "wlan type data" now
generate exactly the same filter program.  Update the accept tests to
reflect that; the new filter programs have the same effect as before, so
the apply tests do not change.
gencode.c
testprogs/TESTrun