Commit Graph

83653 Commits

Author SHA1 Message Date
John Thacker 939972800e Strip Headers: Add separate menu dialog, tshark help
Add a separate menu for Strip Headers (similar to Export PDU, but exporting
to an encapsulation other than WIRESHARK_UPPER_PDU everything for
that encapsulation). Add to the usage output of tshark for the "-U"
option which encapsulation a export tap will produce.
2022-02-25 20:29:16 -05:00
John Thacker cbf76ea22f Export PDU: Allow native encapsulations / strip headers
Allow export PDU taps to be registered with a wiretap encapsulation
instead of always using WTAP_ENCAP_WIRESHARK_UPPER_PDU. This allows
creating normal capture files that aren't tied to wireshark without
having to do a "editcap -C -L -T", as well as creating files in
formats other than pcapng and pcap with tshark.

Provide a couple sample implementations in Ethernet (WTAP_ENCAP_ETHERNET)
and IP (v4 and v6, WTAP_ENCAP_RAW_IP) that are the most common use cases.
(I can imagine a few others; WTAP_ENCAP_MPEG_2_TS could probably be
useful, for example.) Fixes #15141
2022-02-25 20:29:16 -05:00
Martin Mathieson f457caae01 EIGRP: Fix some item lengths 2022-02-25 22:52:18 +00:00
Martin Mathieson 462d755d8c IPv6: Calipso Domain of Interpretation is 4 bytes 2022-02-25 22:34:14 +00:00
Moshe Kaplan 4fdf7eee6f amqp: Fix spelling of Queueing (issue #17943)
Correct spelling of from Queueing to Queueing.
This fixes issue #17943.

Note that other instances of "Queueing" are
kept because it's technically a correct spelling,
but here it's the name of the protocol.
2022-02-25 19:24:05 +00:00
Pau Espin a059280b5d CSN.1: Fix compiler warning showing wrong copy
Let's do what's done for u8, which looks far more sane.

Fixes following gcc 11.2.0 warning:
"""
epan/dissectors/packet-csn1.c:913:17: warning: ‘ui16’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  913 |                 memcpy(pui16, &ui16, 2);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~
"""
2022-02-25 17:23:07 +00:00
Trond Norbye f5277d0186 Couchbase: Simplify PDU length detection
1. The fixed size of a Couchbase header is 24 bytes (not 12)
2. The "overflow detection" won't work as the test would wrap.
   In addition to that the (current) version of the server will
   drop a connection if it encounters a frame bigger than 30MB
   and the biggest "legal" packets are currently less than 21MB.
2022-02-25 11:12:29 +01:00
Uli Heilmeier 33f5b9e145 Proto: Return NULL for 0 or lower -1 length items
Return NULL when an item with length zero or lower -1 is added to
the tree.

With this the calling dissector doesn't have to check the length and
there is no Dissector bug reported.

Related to #17890
2022-02-25 09:53:14 +00:00
Trond Norbye 4f0354b95f Couchbase: Whitelist some commands from key decode
Some commands use raw strings in the key field shouldn't
be decoded as collection encoded strings.
2022-02-25 09:39:42 +00:00
Developer Alexander 864c8cc857 SOMEIP: Fix length resolution for wiretype 4
Fixes wrong determination of length of length field for wiretype 4 in
combination of typerefs due to usage of wrong reference.
2022-02-25 09:29:08 +00:00
Trond Norbye fa0cd7d2f4 Couchbase: Refactor packet dissector
A packet in the Couchbase protocol looks like:

    Byte/     0       |       1       |       2       |       3       |
       /              |               |               |               |
      |0 1 2 3 4 5 6 7|0 1 2 3 4 5 6 7|0 1 2 3 4 5 6 7|0 1 2 3 4 5 6 7|
      +---------------+---------------+---------------+---------------+
     0| HEADER                                                        |
      |                                                               |
      |                                                               |
      |                                                               |
      +---------------+---------------+---------------+---------------+
    24| Frame specific extras (only set if magic and length in the    |
      | header say so)                                                |
      +---------------+---------------+---------------+---------------+
     x| Ccommand specific extras                                      |
      |  (note length in the extras length header field)              |
      +---------------+---------------+---------------+---------------+
     y| Key (as needed)                                               |
      |  (note length in key length header field)                     |
      +---------------+---------------+---------------+---------------+
     z| Value (as needed)                                             |
      |  (note length is total body length header field, minus        |
      |   sum of the other sections above)                            |
      +---------------+---------------+---------------+---------------+

This patch change the dissector to call a separate function to
print each section (instead of a single function).

The motivation for the patch is to make the code more readable
as each of these fields may have multiple formats (depending on
the value in the magic field). Currently only the client initiated
packets are implemented in the dissector, but in certain cases
the server may push messages to the client with a different magic
which use another namespace for the opcodes and would be a lot
easier to implement with this refactor)
2022-02-25 09:17:27 +00:00
Uli Heilmeier 743ac32dca TVB composite: allow to append/prepend a NULL tvb
When the tvb which should be appended/prepended is a NULL we just leave
the tvb_composite  as it is.

Related to #17890
2022-02-25 08:55:54 +00:00
Zoran Bošnjak 85cf859995 asterix: Sync with asterix-specs #4df694c69c
Windows build warning fix.
2022-02-25 08:30:46 +00:00
Zoran Bošnjak 86c14aed44 asterix: long items fix
Do not use FT_UNIT for very long items.

Sync with asterix-specs #e603aaae8a
2022-02-25 08:30:46 +00:00
Trond Norbye 68edbaece1 Couchbase: Add missing hello features
In addition the hf_hello_features should be registered as
FT_NONE and not FT_STRING as it isn't a string (and would
cause the "expert info" to print a warning with "trailing
stray characters")
2022-02-25 07:13:12 +00:00
Chuck Craft 13d7cd1f6f Expert info: "Ok" is not valid severity level
Added in d4499eb9 Changed to "1" in 507d07eda
Setting to "Ok" in UAT expert_severity (Edit->Preferences->Expert)
causes the associated protocol level to not be displayed in the
Packet Details protocol tree.
Example: ip.ttl.too_small set to "Ok" drops "ip" from the tree
2022-02-25 02:35:17 +00:00
Michał Łabędzki d1e5ae8385 Bluetooth: make dissect_bluetooth_common() public API
It creates bluetooth_data_t what is The Center of the Bluetooth World in Wireshark,
most important is that bluetooth_data_t must provide shared trees (resources) to enable
dissection for non trivial relations in Bluetooth, for example mapping BDADDR to name.

Issue: 17570
Change-Id: Ice17b804ab6d4dcf0f77f1b2356a6712ce7e64b1
2022-02-25 02:13:18 +00:00
João Valverde 49566a5b0c dfilter: Add more tests
Add more tests and fix a copy paste error with the test name.
2022-02-24 21:41:32 +00:00
João Valverde 90c0862a93 Reword plugin info in About Wireshark dialog 2022-02-24 21:30:04 +00:00
João Valverde 8cd49b2da0 dumpcap: Fix a TODO for Npcap test 2022-02-24 21:15:51 +00:00
João Valverde ac6cbbcda3 Windows: Fix build
For some reason this was not caught by the CI.
2022-02-24 20:29:04 +00:00
David Perry e2fab18853 wsutil: New API to gather compile/runtime info 2022-02-24 13:27:08 +00:00
Stefan Metzmacher 80cb8fbb12 LDAP: try harder to detect SASL with kerberos signing only
The payload is still plaintext so we can dissect them as LDAP payload...

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2022-02-24 10:38:21 +00:00
Dario Lombardo ec6a47f663 github: fix ubuntu action when building dpkg. 2022-02-24 09:15:05 +00:00
Stefan Metzmacher af6d86d4a7 NTLMSSP: fix dissecting the spnego mechListMIC payload
dissect_ntlmssp() is also called from dissect_spnego_T_mechListMIC(),
we should detect a 16 byte structure starting with 0x01
and use dissect_ntlmssp_verf().

All other messages in dissect_ntlmssp() start with the
magic string "NTLMSSP", so they never match the 0x01.

It fixes another problem seen in the example captures
of https://gitlab.com/wireshark/wireshark/-/issues/17958

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2022-02-24 08:53:17 +00:00
Stefan Metzmacher b9fcfd4f10 NTLMSSP: fix AUTHENTICATE_MESSAGE without NTLMSSP_NEGOTIATE_VERSION
If we have data remaining before the start of the variable data,
we should assume the space for the version field even without
the NTLMSSP_NEGOTIATE_VERSION flag. In that case we should
mark the 8 bytes as zero bytes.

This fixes https://gitlab.com/wireshark/wireshark/-/issues/17958

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2022-02-24 08:53:17 +00:00
João Valverde ef31431aeb dfilter: Add a true/false boolean representation
Minor code cleanup.
2022-02-23 23:37:47 +00:00
João Valverde 70d516368b Fix EditorConfig settings 2022-02-23 23:37:47 +00:00
João Valverde 9cc3e7e1bb dfilter: Add support for binary literal constants
Example: 0b1001, 0B111000, etc.
2022-02-23 22:27:59 +00:00
João Valverde 1aef88df4b dfilter: Fix node debug representation 2022-02-23 22:27:59 +00:00
Gerald Combs fec12018f3 CMake: Remove redundant code. 2022-02-23 09:57:17 -08:00
Roland Knall 21f57f04b1 Lua: Forward display filter text info
Fix issues caused with previous commits

Fixes: #17188
2022-02-23 16:31:35 +00:00
David Perry dd2fd30ba3 Tooltips for menu items that open browser windows 2022-02-23 15:36:42 +00:00
John Thacker 1d84a092cf doc: Update text2pcap and Import from Hexdump doc
Update the text2pcap man page and the Import from Hexdump WSUG
page to clarify how to use it, for grammar, and to remove a few
things that are no longer relevant. (E.g., it's no longer the case that
files without an EOL don't work.)
Fix #15563, #15564.
2022-02-23 02:58:31 +00:00
Gerald Combs 0e427ac837 Packaging: Update our macOS notarization check.
It looks like altool changed its "info" argument from --eval-info to
--notarization-info at some point.
2022-02-22 18:36:35 -08:00
Gerald Combs 2ebefa4cc1 GitLab CI: Try to fix macOS Arm builds.
Don't specify CMAKE_OSX_SYSROOT, for now at least.
2022-02-22 15:52:33 -08:00
Gerald Combs 91f588ea6f GitLab CI: Remove `arch` commands.
GitLab Runner 14.8 added a native Arm binary for macOS. It's been
installed on our build machine, so the `arch` calls in the "macOS Arm
Package" job are no longer needed.
2022-02-22 14:10:30 -08:00
John Thacker 1799627b14 DVB-S2-BB: Get correct ACM byte for L.4
The L.4 adaptation header does not include a sync byte. Use the
current offset to get the ACM byte instead of hardcoding in the
value that is correct for L.2 and L.3.
2022-02-22 05:56:37 -05:00
John Thacker a98aca3838 DVB-S2-BB: Add pref to try all Adaptation layer headers (or only one)
There are four supported types of DVB Base Band Frame Adaptation Layer
headers, and they all can have false positives. Add a preference that
so that a user can either look for all four possible types, or can
only look for a packets that match the preferred type.

Fix #17950.
2022-02-22 10:28:55 +00:00
Developer Alexander 3eec649ddc SIGNAL PDU: Dissect payload by default
Dissection of payload is enabled by default. If it is disabled the user gets a
hint.

Corrected some typos.
2022-02-22 10:05:49 +00:00
Trond Norbye e5783d8549 Couchbase: Shorten prefixes
Replace the log PROTOCOL_BINARY_RESPONSE_ prefix to STATUS_ and
PROTOCOL_BINARY_CMD_ prefix to CLIENT_OPCODE_.

Couchbase do not support the memcached textual protocol so we'll
_always_ be using the binary protocol framing. In the couchbase
source code all of the PROTOCOL_BINARY_* constants was refactored
to enum classes and these two are called Status and ClientOpcode.
"Unfortuantely" this file is still in C so we can't reuse the
C++ enum classes directly so we'll need a prefix.
2022-02-22 09:55:17 +00:00
Zoran Bošnjak ced9e51c20 asterix: Sync with asterix-specs #808fb7b68c 2022-02-22 09:30:19 +00:00
Zoran Bošnjak 8993d69335 asterix: python to generated C string fix
Some characters (in particular double quotation mark) require escaping
during automatic dissector generation.

Fixes problem from merge request 6256.
2022-02-22 09:30:19 +00:00
Chuck Craft 2990d624f9 Qt: Show Packet Bytes - first byte is 0 so end byte is length-1
Closes  #17804
2022-02-21 16:57:31 +00:00
Anders Broman 4a1dc2e9f3 NAS-5GS: Update decoding of Route selection descriptor component (CR) 2022-02-21 13:43:11 +01:00
Martin Mathieson 55d3a9db9e tools/check_*.py: allow multiple --file entries 2022-02-20 23:12:10 +00:00
Roman Volkov 581f3142bb mpeg descriptor: add TVA ID Descriptor (0x75) 2022-02-20 20:06:21 +00:00
David Perry 70d432c357 Remove editor modelines and .editorconfig exceptions from root files 2022-02-20 19:39:37 +00:00
Gerald Combs 695ce22b0d [Automatic update for 2022-02-20]
Update manuf, services enterprise numbers, translations, and other items.

[ Reverted packet-asterix.c by hand. ]
2022-02-20 18:58:53 +00:00
Guy Harris c7f84156c0 pcap/pcapng: byte-swap the CAN ID field in CAN pseudo-headers for SLL2.
As for LINUX_SLL, so for LINUX_SLL2.
2022-02-20 10:38:55 -08:00