Commit Graph

79923 Commits

Author SHA1 Message Date
Guy Harris b8b3531883 wiretap: register most built-in file types from its module.
Remove most of the built-in file types from the table in
wiretap/file_access.c and, instead, have the file types register
themselves, using wtap_register_file_type_subtypes().

This reduces the source code changes needed to add a new file type from
three (add the handler, add the file type to the table in file_access.c,
add a #define for the file type in wiretap/wtap.h) to one (add the
handler).  (It also requires adding the handler's source file to
wiretap/CMakeLists.txt, but that's required in both cases.)

A few remain because the WTAP_FILE_TYPE_SUBTYPE_ #define is used
elsewhere; that needs to be fixed.

Fix the wiretap/CMakefile.txt file to scan k12text.l, as that now
contains a registration routine.  In the process, avoid scanning files
that don't implement a file type and won't ever have a registration
routine.

Add a Lua routine to fetch the total number of file types; we use that
in some code to construct the wtap_filetypes table, which we need to do
in order to continue to have all the values that used to come from the
WTAP_FILE_TYPE_SUBTYPE_ types.

While we're at it, add modelines to a file that lacked them.
2021-02-14 00:58:46 -08:00
Guy Harris 5b3c3d0682 WSDG: deprecate wtap_filetypes.
Recommend the use of wtap_name_to_file_type_subtype() to get filetype
values, unless you need to run on older versions of Wireshark that don't
have it.

Don't even *mention* wtap_filetypes in the documentation for the new
wtap_ routines, as, if you have those routines, you have
wtap_name_to_file_type_subtype(), because it's one of those routines.

Fix references to "nul" while we're at it - it's "nil" in Lua.

(That part of the WSDG - the Lua reference - is generated, so this
involves changing the source code implementing the Lua routines.)
2021-02-13 22:12:23 -08:00
Guy Harris 8ec5906fd6 iseries: report Unicode files as Unicode rather than ASCII.
While we're at it, that's "Unicode", not "UNICODE" - it's not an
initialism, and isn't all-caps.
2021-02-13 20:23:08 -08:00
Alexis La Goutte 63d802099a ieee80211: Update Reference 2021-02-13 19:48:30 +00:00
Guy Harris 8bba6ebe5c wiretap: remove spaces from file format names.
File format names are used on the command line, so don't require them to
be quoted - replace the space in "systemd journal" with an underscore.
2021-02-13 10:35:58 -08:00
ferst 8037be0ef6 Modbus/TCP: Add TLS dissector
In 2018 Modbus Organization published a document named
"Modbus/TCP Security"[1] that specifies the use of Modbus/TCP over TLS.
This commit register a new dissector, "mbtls", reusing "mbtcp" proto. A
new option is added to define the Modbus/TLS port to be use in
`classify_mbtcp_packet`.

[1] https://modbus.org/docs/MB-TCP-Security-v21_2018-07-24.pdf
2021-02-13 17:44:12 +00:00
Nardi Ivan afeb15d4d8 QUIC: add support for more QUIC versions
See: https://github.com/quicwg/base-drafts/wiki/QUIC-Versions
2021-02-13 16:24:54 +00:00
Harald Welte 5d38347128 bssgp: Set in_error_pkt
Whenever we receive a BSSGP message indicating an error, set
in_error_pkt accordingly.  This will prevent higher layer dissectors
from clearing COL_INFO.
2021-02-13 15:46:32 +00:00
Harald Welte 318d86852d gprs-ns: Mark NS-STATUS as in_error_pkt
Like many transport protocols, NS has the ability to include
the "erroneous message" when reporting errors to its peer in
NS-STATUS PDUs.

The current UX however is super annoying:  The BSSGP dissector
clears COL_INFO and hence if you look at the packet list in wireshark,
it looks like a valid higher-layer message is transmitted over NS,
and there is no mention that this is an error (NS-STATUS).

By simply setting in_error_pkt, the behavior changes: The erroneous
message is still dissected in the protocol details, but COL_INFO
remains what the NS decoder has to say: NS-STATUS with a decoded
cause information.
2021-02-13 15:46:32 +00:00
David Fort 5260be8ab6 rdp: add Restricted authentication mode flags dissection
Dissect the Restricted authentication mode flags in RDP_NEG_RSP packets according to
MS-RDPBCGR 2.2.1.2.1
2021-02-13 14:51:32 +00:00
Guy Harris 24acef0885 wiretap: file types have a name and a description.
The "short name" is really just the name, used to look it up.  The
"name" is really a description intended solely for human consumption.
Rename the fields, and the functions that access them, to match.

The "description" maintained by Lua for file type handlers is used
*only* for one debugging message; we should probably just eliminate it.
Call it an "internal description" for now.
2021-02-13 01:25:39 -08:00
Guy Harris 28dbff322b WSDG: add UN*X targets for building packages. 2021-02-12 22:25:31 -08:00
Guy Harris f0ebc50762 wslua: expose some libwiretap APIs in Lua.
Provide Lua version of wtap_file_type_subtype_string(),
wtap_file_type_subtype_short_string(), and
wtap_short_string_to_file_type_subtype().

This will be backported to the 3.2 and 3.4 branches, to allow scripts
not run on the bleeding-edge version to use them.
2021-02-12 21:25:29 -08:00
Guy Harris b67494e32a WSDG: give more details on setting up a UNIX build environment.
List the minimum set of tools required.

We have scripts to do the setup work on a number of platforms.  Let the
user know about them.

Give instructions on using CMake; we're not using the traditional
autoconf stuff any more.

Give instructions on building the Developer's and User's Guides in the
UNIX section, and, in both that section *and* the equivalent Windows
section, give the name of the build target for building all guides.
2021-02-12 15:00:07 -08:00
Jaap Keuter b9bdc803bb ASTERIX: fix dissection of I010_041 and I010_042 fields
Fixes #17226
2021-02-12 14:20:53 +01:00
Pascal Quantin af119730e6 ISKAMP: fix a REPORT_DISSECTOR_BUG printf 2021-02-12 12:06:35 +01:00
Constantine Gavrilov 4c328749ac NVME RDMA dissector: add decoding of RDMA payload for connect command. 2021-02-12 10:57:27 +02:00
Constantine Gavrilov 7246677d42 NVME RDMA dissector: store RDMA transfers and link them to commands.
Details:
* At this point works for single RDMA transfer per command
* Commands are linked to RDMA requests
* RDMA requests are linked to commands (read and only first write)
* RDMA read requests are linked to read responses (only first response)
* RDMA read responses are linked to requests (only first response)
* RDMA read responses are linked to commands (only first response)
2021-02-12 10:57:27 +02:00
Constantine Gavrilov aea7f6fad2 NVME RDMA dissector: decode Property Get/Set structures. 2021-02-12 10:56:03 +02:00
Constantine Gavrilov bfa2ae5964 Revert "NVME RDMA dissector: store RDMA transfers and link them to commands."
This reverts commit 05d5506324.
Due to a wrong order of merge requests, and squashing the history,
I would like to split the commit into two independent changes.
2021-02-12 10:52:12 +02:00
Alex Nik c361d31843 added the description about the 29West stat menu 2021-02-12 07:48:51 +00:00
Constantine Gavrilov 5160fc895e NVME dissector: fix parsing of NVME Identify command. 2021-02-12 05:06:20 +00:00
Alex Nik 54abb56b1d added description for F5
added SME suggestions

minor fix
2021-02-12 04:49:24 +00:00
Alexis La Goutte aa0081327c wccp: fix unused variable ‘length_remaining’ [-Werror=unused-variable] 2021-02-11 21:56:37 +00:00
Alexis La Goutte 7d8d209c9f wccp: fix Dead Store found by Clang Analyzer
packet-wccp.c:2423:11: warning: Although the value stored to 'length_remaining' is used in the enclosing expression, the value is never actually read from 'length_remaining'
2021-02-11 21:56:37 +00:00
Alexis La Goutte 9d91ebd616 VNC: Fix dead store found by Clang
acket-vnc.c:1550:3: warning: Value stored to 'offset' is never read [deadcode.DeadStores]
2021-02-11 21:56:37 +00:00
Alexis La Goutte a4bcc8bd13 snort: fix dead Store found by Clang Analyzer
packet-snort.c:515:15: warning: Although the value stored to 'line' is used in the enclosing expression, the value is never actually read from 'line'
2021-02-11 21:56:37 +00:00
Alexis La Goutte 3cf55c314e ieee80211: Fix Dead Store found by Clang Analyzer
packet-ieee80211.c:23771:5: warning: Value stored to 'offset' is never read [deadcode.DeadStores]
packet-ieee80211.c:23905:9: warning: Value stored to 'offset' is never read [deadcode.DeadStores
packet-ieee80211.c:23994:9: warning: Value stored to 'offset' is never read [deadcode.DeadStores]
packet-ieee80211.c:24083:9: warning: Value stored to 'offset' is never read [deadcode.DeadStores]
packet-ieee80211.c:24146:9: warning: Value stored to 'offset' is never read [deadcode.DeadStores]
packet-ieee80211.c:26495:7: warning: Value stored to 'offset' is never read [deadcode.DeadStores]
2021-02-11 21:56:37 +00:00
Alexis La Goutte 2aab84350d someip-sd: Fix Dead Store found by Clang Analyzer
packet-someip-sd.c:531:9: warning: Value stored to 'offset' is never read [deadcode.DeadStores]
2021-02-11 21:56:37 +00:00
Alexis La Goutte 6fc94ac462 extcap: Fix Dead Store found by Clang Analyzer
extcap.c:876:26: warning: Although the value stored to 'pref' is used in the enclosing expression, the value is never actually read from 'pref'
2021-02-11 21:56:37 +00:00
Alexis La Goutte f2888ecf38 btle: Fix Dead Store found by Clang Analyzer
packet-btle.c:1417:13: warning: Value stored to 'item' is never read [deadcode.DeadStores]
2021-02-11 21:56:37 +00:00
Alexis La Goutte a22ef5cca5 btatt: Fix Dead Store found by Clang Analyzer
packet-btatt.c:4754:17: warning: Value stored to 'tvb' is never read [deadcode.DeadStores]
2021-02-11 21:56:37 +00:00
Alex Nik a3bb5f2da3 Added the description for the SMPP operations 2021-02-11 21:40:57 +00:00
Constantine Gavrilov 05d5506324 NVME RDMA dissector: store RDMA transfers and link them to commands.
Details:
* At this point works for single RDMA transfer per command
* Commands are linked to RDMA requests
* RDMA requests are linked to commands (read and only first write)
* RDMA read requests are linked to read responses (only first response)
* RDMA read responses are linked to requests (only first response)
* RDMA read responses are linked to commands (only first response)
2021-02-11 21:38:15 +00:00
Dr. Lars Völker 7b9e8f3080 SOME/IP: Fix crash after loading a faulty uat config (BUGFIX)
When you load a correct wireshark config for SOME/IP responding
hashtable entries are created. If you load afterwards a new config
(empty or not) the old entries are updated.

However, Wireshark does not call the uat's post update callback,
when there was a bug in the config. This leads to an inconsistent
state, which may result in a crash on dissecting SOME/IP messages.

This patch adds code to the SOME/IP dissector to avoid inconsistent
state.

Fixes: #17227
2021-02-11 14:50:17 +00:00
Martin Mathieson f5b8c1b686 ESP: validate keys in UAT. 2021-02-11 14:29:20 +00:00
Gerald Combs c7f66cf934 TShark: Load extcap preferences only when needed.
In our first pass through our options, look for ones that might require
extcap. Call extcap_register_preferences() only when that's the case.

Warn about missing extcap preferences only when we've loaded them.
2021-02-11 13:36:22 +00:00
Constantine Gavrilov 28937e9022 Fix dissection of transport connect payload for NVMEoF with RDMA. 2021-02-11 08:03:06 +00:00
Uli Heilmeier 156bc6ca91 DNS: Support for ZONEMD RR (RFC8976)
Adding support for RFC 8976 Message Digest for DNS Zones (ZONEMD RR)
2021-02-11 06:21:38 +00:00
Guy Harris 2c6b9e83f1 RTP player: squelch a narrowing warning. 2021-02-10 18:22:46 -08:00
Guy Harris f355bfadcc SCSI: use BASE_DEC_HEX for counts/lengths/etc..
Show values that are sequence numbers, counts, lengths, and the like in
decimal, with the hex value after it in parentheses for the benefit of
those who count to 16 rather than 10.
2021-02-10 16:57:16 -08:00
Constantine Gavrilov 976f3da9aa Infiniband dissector: print RDMA addresses, sizes and keys in HEX. 2021-02-11 01:14:45 +02:00
Guy Harris 9e2e260fa8 Infiniband, iSCSI, NVMA: use BASE_DEC_HEX for counts/lengths/etc..
Show values that are sequence numbers, counts, lengths, and the like in
decimal, with the hex value after it in parentheses for the benefit of
those who count to 16 rather than 10.
2021-02-10 14:20:13 -08:00
Joey Salazar a8e2197d99 git: Parse delim-pkt and response_end-pkt
Git Protocol version 2[1] defines 0x0001 as a delimiter packet that
separates the sections of a message, as well as 0x0002 as a response_end
packet that indicates the end of a response for stateless connections.

Add parsing and checking of the delim-pkt and response_end-pkt lines,
adding them as items to the tree for ease of reading and filtering while
handling pre-existing "malformed" errors. For additional consistency,
the terminator 0x0000 is now referred to as Flush packet.

[1] https://www.kernel.org/pub/software/scm/git/docs/technical/protocol-v2.html

Part of #17093
2021-02-10 20:50:15 +00:00
Michal Ruprich c8246c9973 Moving glib.h out of extern C 2021-02-10 17:49:09 +00:00
Dr. Lars Völker 1eeb2c1a10 SOME/IP: Bugfix copy and paste in method name check
When the method name was not found it needs to be set to null. By
accident the service name was set to null instead.
This is wrong and fixed by this patch.

Fixes #17204
2021-02-10 16:43:06 +00:00
Pascal Quantin 46c44e0785 NR RRC: add preference to put NAS in the root tree 2021-02-10 14:46:27 +00:00
Pascal Quantin 12ab24019f RRC: add preference to put NAS in the root tree 2021-02-10 13:29:33 +00:00
Nicolás Alvarez ebfbf958f6 Add ENC_TIME_NSECS timestamp encoding
Add a new timestamp encoding format ENC_TIME_NSECS, like ENC_TIME_SEC but
for nanosecond values. Needed for my work-in-progress dissector for Apple
push notifications.
2021-02-10 12:45:54 +00:00
Stig Bjørlykke 9dd74b2788 p1: Rewrite do_address for extension attributes
Rewrite do_address handling to use proto_data instead of
pinfo->private_table.

Related to #17156
2021-02-10 12:29:42 +00:00