Commit Graph

1225 Commits

Author SHA1 Message Date
Guy Harris 8195bdd340 Rename a bunch of things with "conversation".
A conversation in Wireshark might have two endpoints or might have no
endpoints; few if any have one endpoint.  Distinguish between
conversations and endpoints.
2022-08-25 20:02:20 -07:00
Guy Harris 2aeaf71fa5 Change names to reflect that it's an endpoint table.
More {host, hostlist} -> endpoint.
2022-08-23 22:15:45 -07:00
Guy Harris 4b53f31d2d Fix comments to reflect reality.
It's an endpoint table, not a table of hosts.
2022-08-23 19:07:25 -07:00
Guy Harris d9e662bc54 Rename some functions and types for endpoint tables.
The "conversation table" mechanism supports two types of tables, one for
the "Conversations" menu item under "Statistics" and one for the
"Endpoints" menu item under "Statistics".  The first of them shows
statistics for conversations at various layers of the networking stack;
the second of them shows statistics for endpoints at various layers of
the networking stack.

The latter is *not* a table of hosts; an endpoint might be a host,
identified by an address at some network level (MAC, IP, etc.), or it
might be a port on a host, identified by an address/port pair.

Some data types, function names, etc. use "host" or "hostlist" or other
terms that imply that an endpoint is a host; change them to speak of
endpoints rather than hosts, using names similar to the corresponding
functions for conversations.

Provide wrapper functions and typedefs for backwards source and binary
compatibility; mark them as deprecated in favor of the new names.

Clean up some comment errors found in the process.
2022-08-23 09:55:14 +00:00
Chien Wong 5c216de8cc ieee80211: Improve A-MSDU dissecting
Fix subframe length issue.
Add padding.

Signed-off-by: Chien Wong <m@xv97.com>
2022-08-20 16:43:32 +00:00
Chien Wong 3b7c611be1 ieee80211: Add Transition Disable KDE dissecting
Signed-off-by: Chien Wong <m@xv97.com>
2022-08-20 06:14:29 +00:00
Adrian Granados 9a560060ad ieee80211: Add dissector for Arista (Mojo) vendor specific IE
Dissector only supports type 6: AP Name.
2022-08-16 14:08:15 +00:00
Dieter Dobbelaere 321465db07 Corrected description of `wlan.fc.type_subtype`. 2022-08-16 12:19:48 +00:00
Martin Mathieson 1337db5a18 check_typed_item_calls.py: check for consecutive calls to same item 2022-08-12 16:20:35 +00:00
Roi Berkovich 4702e3bfad WLAN: fix IEEE802.11 dissection bug
When parsing wlan header above capwap, first two bytes are swapped (fcf
and flag). the offset was handled incorrectly, causing wireshark to
display incorrect fcf data in the tree summery and completely wrong
flags information (in the case of swap, the flags point to the same
byte as the fcf)
2022-07-22 05:49:01 +00:00
Adrian Granados 3c29458a46 ieee80211: Update VHT channel width interpretation as in IEEE Std 802.11-2020 2022-07-12 16:42:23 +00:00
Adrian Granados a664d29978 ieee80211: Update reason codes as in IEEE Std 802.11-2020 and 802.11ax-2021 2022-06-15 07:06:35 +00:00
Roland Knall 0640b711ea tap: Mark filtered packets instead of dropping them
Allows packets to be filtered but marked and not removed from the
tap listing. Additionally a total is calculated for all rx/tx frames
and bytes
2022-06-10 09:17:52 +02:00
Roland Knall 2cf938cfa8 tap: Adding flags for tap_packet
This allows flags to be passed by the registering listener
to the collection of information
2022-06-10 05:46:15 +00:00
Martin Mathieson 7fbfea9d68 IEEE80211: Fix a couple of filters 2022-04-30 21:56:21 +00:00
Alexis La Goutte 19dc602fe3 802.11: fix TWT Setup dissection
Duplicate Dialog Token field

Fix #18050
2022-04-24 20:48:04 +00:00
Alexis La Goutte 26be00e320 ieee80211: Fix clang analyzer warning (Dead.Store)
also indent
2022-04-20 07:25:17 +00:00
Richard Sharpe 8889d8c78b ieee80211: Implement more KDEs from ieee802.11-2016 and on.
I have picked up more KDEs from ieee802.11-2016 and Draft P802.11REVmd_D5.0
and Draft P802.11be_D1.4.
2022-04-17 23:59:26 +00:00
Richard Sharpe 34f8420d1e ieee80211: Correct the dissection of the 802.11ax Capabilities device class.
The numbers were reversed.

Closes #18030
2022-04-06 18:31:50 -07:00
Richard Sharpe 454552c149 ieee80211: Conform to ieee802.11-2016 for the Capability Info field.
The format and meaning of the bits in the Capability information field
has been different than what was implemented since at least 802.11-2016.

Defined in 9.4.1.4 Capability Information field.
2022-04-05 13:24:58 +00:00
Richard Sharpe f0e4a9960c ieee80211: Handle the case where a Vendor Specific response is not DPP! 2022-03-27 07:22:52 +00:00
Richard Sharpe 7680335a5b ieee80211: Handle fragmented DPP Configuration in GAS Comebacks.
These were not being handled properly.
2022-03-26 11:42:01 -07:00
Joerg Mayer ad48c4050d IEEE 802.11: Additional countrycode environment values 2022-03-09 07:30:42 +01:00
John Thacker dd7fff4bce ieee80211: Handle UTF-8 SSIDs and unspecified charsets
IEEE 802.11 SSID fields are officially unspecified encoding but
probably UTF-8 (and likely ASCII, with which UTF-8 is backwards
compatible), unless the Extended Capabilities bit indicating that
it's *definitely* UTF-8 is set.

Get the SSID bytes as a raw byte string without any encoding
validation for sending to Dot11Decrypt, and add it to the tree
as a FT_BYTES with BASE_SHOW_UTF_8_PRINTABLE, which does the
right thing most of the time, and more often than now. In practice
this does most of #16208.

To really finish the job, the Extended Capabilities bit needs to
be checked, but not only does that bit come in a later tagged element
than the SSID, it's not necessarily sent, and for Responses we'd have
to track if the bit was set in a corresponding Request in the same
conversation. However, it's not clear that any drivers actually do
set the bit. (In all the captures I've seen with UTF-8 or even non
ASCII/non UTF-8 SSIDs, the bit was unset.)
2022-02-26 12:28:59 +00:00
Alexis La Goutte 3a620f6f87 ieee802211: Add Model and Serial Fortinet Specific Vendor 2022-02-17 14:56:52 +00:00
João Valverde 8efad466c4 Tools: Fix fix-encoding-args.pl ASCII string validation
Do not require a useless ENC_NA parameter for string encodings.
FT_STRING and FT_STRINGZ types don't have any ndianness.

Follow-up to 6ec429622c.
2022-02-15 11:38:16 +00:00
Alexis La Goutte 84569f3ab8 ieee80211: add support of Fortinet Vendor Specific
Only support type 10 (SYSTEM ?) with subtype 1 (AP-NAME)

See https://www.nickjvturner.com/ap-name-broadcast-support for pcap
2022-02-09 18:23:26 +00:00
Dario Lombardo ac164db3ac ieee80211: initialize local buffers.
Fix valgrind errors for jumps on non-initialized memory.

Fix: #17894.
2022-01-26 13:05:25 +00:00
Alexis La Goutte af40152a0d ieee80211: fix typo (verision => version) 2022-01-25 10:35:19 +00:00
Moshe Kaplan 69d54d6f8e Corrects repeated words throughout the code.
Repeated words were found with:
egrep "(\b[a-zA-Z]+) +\1\b" . -Ir
and then manually reviewed.
Non-displayed strings (e.g., in comments)
were also corrected, to ease future review.
2021-12-22 11:01:11 +00:00
João Valverde 22ee2764a7 Replace g_snprintf() with snprintf() (dissectors)
Use macros from inttypes.h with format strings.
2021-12-19 20:25:11 +00:00
John Thacker 2df6ab0906 ieee80211: BASE_HEX and BASE_CUSTOM are mutually exclusive 2021-12-12 17:09:34 -05:00
John Thacker 9a054d7837 IEEE80211: Remove ENC_NA from string encoding
With the recent commit changing the pre commit check, need
this to make a different change.
2021-12-12 21:41:35 +00:00
John Thacker 91bf99405a ieee80211: Pass association_sanity_check to dissect_mgt_action
Once again pass the association_sanity_check_t for MGT_ACTION
frames the way it was before commit fb2a0b4a71
introduced a new function. Fixes #17767.
2021-12-07 20:23:55 -05:00
Martin Mathieson e11cdf2f46 Fix some spelling errors 2021-11-29 17:46:16 +00:00
Richard Sharpe 09f020b3f3 ieee802.11: Start adding support for 802.11be.
This is the extra high throughput spec.
2021-11-07 20:30:15 +00:00
Alexis La Goutte 62de74f6a8 ieee80211: Fix warnings found by Clang Analyzer
packet-ieee80211.c:17420:9: warning: Value stored to 'offset' is never read [deadcode.DeadStores]
2021-10-23 12:46:55 +00:00
Alexis La Goutte 8da8d46de7 ieee80211: Fix warnings found by Clang Analyzer
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]
2021-10-20 21:51:40 +00:00
Sangeetha Jain 2e65045db6 MeshConnex (MCX): MCX packet decode logic
Dissect MCX IE present in 802.11 packets like Beacon, Assoc Req, Assoc Res ...
2021-10-19 19:11:05 +00:00
Martin Mathieson a5df18e51e Fix some spelling errors 2021-10-11 04:44:49 +00:00
Martin Mathieson d8b28f8040 Fix some field mask widths. 2021-10-07 21:33:49 +00:00
Evan Huus e578c6caee to_str: pull scope arg up into tvb_ether_to_str
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.
2021-10-04 17:10:17 +00:00
Adrian Granados 4975dbc867 ieee80211: Add dissector for Ruckus vendor specific IE
Dissector supports only type 3: AP Name.
2021-09-30 05:38:13 +00:00
Tomasz Moń 7b82110092 USB HID: Parse bit fields with correct bit order
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 #4478
Fix #17014
2021-09-26 18:16:28 +02:00
Guy Harris 76b08ea083 Fix spelling errors.
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).
2021-09-11 10:01:27 +00:00
Tomas Kukosa bf1039a529 Vector BLF: WLAN frame supported 2021-09-03 05:03:48 +00:00
Evan Huus cdfab0d6e9 tvbuff: convert helper methods to pinfo->pool
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.
2021-09-01 03:54:52 +00:00
Adrian Granados 5f3278c8d5 ieee80211: Add dissector for the Non-Inheritance IE Extension
Implements dissector for Element ID Extension 56 (Non-Inheritance).
See 9.4.2.240 Non-Inheritance element in IEEE 802.11-2020.
2021-08-12 00:21:35 -04:00
Martin Mathieson 3b28d5219f Fix some copy-paste filter names.
Detected with tools/check_typed_item_calls.py --consecutive
2021-07-30 18:02:30 +01:00
Martin Mathieson d34d1a1e13 More fussing with masks.
Mostly longer masks with odd numbers of digits.
2021-07-29 10:15:58 +00:00