packet-ieee80211.c:17423:9: warning: Value stored to 'offset' is never read [deadcode.DeadStores]
packet-ieee80211.c:17424:9: warning: Value stored to 'tag_len' is never read [deadcode.DeadStores]
packet-ieee80211.c:17430:10: warning: Value stored to 'offset' is never read [deadcode.DeadStores]
packet-ieee80211.c:17431:10: warning: Value stored to 'tag_len' is never read [deadcode.DeadStores]
packet-ieee80211.c:17437:10: warning: Value stored to 'offset' is never read [deadcode.DeadStores]
packet-ieee80211.c:17438:10: warning: Value stored to 'tag_len' is never read [deadcode.DeadStores]
There are a bunch of near-identical macros here, but I'm gonna change
one at a time or else the builder times out at the number of files
changed in one merge.
Implement little endian support for tvb_get_bits family of functions.
The big/little endian refers to bit numbering within an octet. In big
endian, the most significant bit is considered bit 0, while in little
endian the least significant bit is considered bit 0.
Add encoding parameters to proto tree bits format family functions.
Specify ENC_BIG_ENDIAN in all dissectors using these functions except in
USB HID that requires ENC_LITTLE_ENDIAN to work correctly.
When formatting bits values, always display most significant bit on the
leftmost position regardless of the encoding. This results in no gaps
between octets and makes the displayed value comprehensible.
Close#4478Fix#17014
The Ubuntu build commented on some spelling errors in executable code
files. Fix the errors that don't come from external files containing
the spelling errors (USB product and vendor IDs, PCI IDs, ASN.1
specifications), and fix some errors that don't show up in the
executable code files (e.g., in comments and variable names).
A few of them just needed scratch memory, so allocate and free it
manually after doing any exception-raising checks.
A few others were returning memory, and needed conversion to accept a
wmem scope argument.
The IEEE Std 802.11ax-2021 amendment relaxes the requirements for
elements included in the Nontransmitted BSSID Profile subelement:
"Any element specific to the BSS or with content that is different
from the transmitted BSSID" can be included as a sublement.
However, it also enumerates elements that should not be included in the
Nontransmitted BSSID Profile subelement, including some extended element
IDs.
Thus, I've changed the add_tagged_field function to be more comprehensive, so that:
a) it can use the list of elements IDs to check for valid OR invalid element IDs
b) it defines necessary arguments for also checking valid OR invalid extended element IDs
The original function declaration is kept as it is, and the implementation calls the
new function, add_tagged_field_with_validation.
An alternative implementation of this change would be to have
the Multiple BSSID dissector implementation skip the check for invalid
element IDs in the Nontransmitted BSSID Profile subelement,
hence not requiring any changes to the add_tagged_field function.
However, for completeness, the add_tagged_field function should check for
valid extended element IDs in the same way it can check for valid element IDs,
and this commit provides it.
Add macros to round to multiples of 2, 4, 8, 16, and 32.
Use them instead of independently defined macros.
(We don't define a general "round to a power of 2" macro to avoid the
risk of somebody passing something other than a power of 2 to it.)
Fixes field names and sets field values to be consistent
with equivalent HT and VHT capabilities fields as indicated
in the IEEE Std 802.11ax-2021 amendment.
Fixes mask for reserved field, and adds support for ver. number 3.x.
Also, renames "Release Number" to "Version Number" to match
latest WFA Passpoint specification document (ver 3.2).
Put the PV0 dissection into its own routine.
Add a small routine for unknown protocol versions.
Have the top-level dissector just call the PV0, PV1, or unknown version
routines.
Have the PV1 routine create an 802.11-protocol top-level tree item,
rather than putting the header fields at the top level.
dissect_ieee80211_ranging_trigger_variant(), when passed a subtype
other than 0 through 3, will return 0, causing
add_he_trigger_user_info() to loop infinitely on a TRIGGER_TYPE_RANGING
frame.
This change checks for a return value of 0 and terminates the loop.
This probably needs a better fix that reports an error (and maybe
requires dissect_ieee80211_ranging_trigger_variant() to handle subtype
4; I don't have the latest 11ax draft to check).
Fixes#17418.
The most recent drafts of IEEE80211ax D7.0 change the format of trigger
frames in the User Info field quite a bit over the earlier drafts. This
also feeds into the fields in IEEE80211az draft 3.0 and beyond.
Change-Id: I5b80d3a3ccc9d0c16d0885bf284253b095ee0116
Most of the time, the return value tells us nothing useful, as we've
already decided that we're perfectly willing to live with string
truncation. Hopefully this keeps Coverity from whining that those
routines could return an error code (NARRATOR: They don't) and thus that
we're ignoring the possibility of failure (as indicated, we've already
decided that we can live with string truncation, so truncation is *NOT*
a failure).
To save space, the value of Partial TSF is stored shifted to the right
by 10. When displaying to the user, shift it back to the left by 10 and
display as microseconds.
The SS Allocation field is listed in the spec as two separate fields. The
Starting Spatial Stream number and the Number of Spatial Streams. While
the spec treasts this as one 6-bit field it is more useful to display it as
two 3-bit fields so users can search on each separately.
Change-Id: I7a510a66f4500ac9fe065845ade9f5c3aaaf2184
The poll and report subvariants of the User Info field for the Ranging
Trigger frame have many of the same fields as in the Basic Trigger
frame. This commit copies the existing custom dissector functions which
provides more useful information to the end user.
The User Info field was appearing when it shouldn't and the Ranging Common
Info was at the wrong level.
Change-Id: Id75222b3048f9ad735fa78d07d5778f08e4c8474
RNR can have multiple TBTTs; this is indicated by the TBTT Information
Count subfield, according to IEEE 802.11ai-2016 standard.
"The TBTT Information Count subfield is 4 bits in length and contains
the number of TBTT Information fields that are included in the Neighbor
AP Information field, minus one"
This commit adds parsing of all included TBTT subelements.
This change allows users to search the ISTA Availability bits with a
string like 'wlan.ranging.ista.availability_bits contains "11011"'.
Change-Id: I8bc0fbe1d6ffb61c749d8b48d773c3b86510c7f4
This adds the the ISTA Availability Window elemen, the RSTA Availability
Window element and the Secure LTF Parameters element, as well as the
TB Specific Subelement.
Change-Id: Iaa6517c6dcd4fafc7d588cb69d71ad4b968f1b5a
This conforms more to D3 of 802.11az and I cleaned up the handling of
authentication frames. I also reworked the handling of PASN parameters
since they were not quite right.
Change-Id: I5356561da0fec223090f4c2e9f32de7b920693cb
The GTK key provided in FT BSS Transition IE is encrypted. Update
dot11decrypt engine to return the decrypted key for dissection.
Change-Id: Id31a8cf77e12568f2e449470822a64792895673c
Support decrypting captures with Fast BSS Transition roaming present
by now also scanning (re)association frames for relevant information
elements and feeding it into the dot11decrypt engine.
Both (re)association request and response frames are scanned to allow
for potentially missing one frame and still be able to derive PTKs
needed for successful decryption.
Closes#17145
Change-Id: I08436582e4f83695dc606ddb92ff442d6258ef9b
Use tvb_captured_length() instead of returning integer offset.
Otherwise, the packet is marked as malformed and the rest of the
packet is not processed.