Commit Graph

34640 Commits

Author SHA1 Message Date
Grzegorz Niemirowski 69ca16bdf0 ZVT: Dissect list of permitted ZVT commands 2021-02-22 21:28:55 +00:00
Thomas Dreibholz 3a25ebbc42 Updated broken URL in headers. 2021-02-22 18:18:45 +00:00
Anders Broman 614df91e23 RTCP detect non zero padding and dont dissect zero length 2021-02-22 17:03:03 +00:00
Anders Broman d5d26679fc ZVT: Use g_ascii_strtoll instead of atol. 2021-02-22 17:03:31 +01:00
Thomas Dreibholz 2e7f2ffb7a
Added "Follow DCCP stream" feature.
This pull request includes:
* The "Follow DCCP stream" feature.
* Updated docbook documentation for the "Follow DCCP stream" feature.
* Test for the feature.
* Corresponding packet trace for the test.
2021-02-22 12:48:46 +01:00
Grzegorz Niemirowski a57a32c04e ZVT: Addedd dissection of amount, terminal ID, date and time. Registration fix. 2021-02-22 10:39:54 +01:00
Thomas Dreibholz 297246093b Small FGP dissector improvement 2021-02-22 06:38:44 +00:00
Gerald Combs b9bdce8484 NetPerfMeter: Fix compilation on Windows.
Use guint64 instead of u_int64_t. GLib might make it easier to use
standard types at some point[1] but they haven't yet. Make our offsets
unsigned.

[1]https://gitlab.gnome.org/GNOME/glib/-/issues/1484
2021-02-21 12:57:15 -08:00
Thomas Dreibholz 2fe740c00d
Removed unnecessary check for transport protocol. 2021-02-21 16:45:11 +01:00
Thomas Dreibholz cdbbf5d384 Decode time stamp field to the actual UTC time. 2021-02-21 13:57:04 +00:00
Thomas Dreibholz 115472aaf8 Now using heuristic dissector for transport over TCP, UDP and DCCP instead of port number range. 2021-02-21 13:57:04 +00:00
Thomas Dreibholz 6f6537dfba Fixed typo. 2021-02-21 13:57:04 +00:00
Thomas Dreibholz 77343db1fe Improved NetPerfMeterProtocol dissector with detection of protocol for TCP, UDP and DCCP by payload inspection. 2021-02-21 13:57:04 +00:00
Gerald Combs daf4e3cafe [Automatic update for 2021-02-21]
Update manuf, services enterprise numbers, translations, and other items.
2021-02-21 11:42:59 +00:00
Martin Kaiser 3ee6eb0be3 dvb-ci: afs resource: dissect file req / ack
The file request and file acknowledge APDUs of the auxiliary file system
resource are exactly the same as in the application mmi resource.

We already have a function that dissects file acknowledge. Move the
dissection of file request into a separate function as well.

Call the two functions for both ami and afs resources.
2021-02-21 10:35:41 +00:00
Martin Mathieson cd77e5aa5f Some more spelling fixes.
Also add more words to dictionary file.
2021-02-21 09:59:04 +00:00
Martin Mathieson f3bc71c44f Make some more vars and functions static. 2021-02-20 16:34:24 +00:00
Guy Harris 1f595c435c BER: get rid of WTAP_FILE_TYPE_SUBTYPE_BER.
Save a copy of the pathname used to open a file in the wtap structure.
This allows the BER file reader to put a pointer to it in the
pseudo-header; it also would allow file readers to attempt to read
"associated" files that have the same name as the file, but with a
different extension.

Instead of having cf_open() special-case BER files, and calling a
routine in the BER dissector to specify the file name to the dissector,
have separate dissectors for "dissect packet payload as BER" and
"dissect a file as BER", and have the latter get the pathname of the
file from the pseudo-header and determine the ASN.1 syntax from that.

(Side-effect - this means that you can now dissect a BER file, and have
the syntax be determined by the file extension, in TShark as well; the
above cf_open() special-casing was *not* done in TShark, so it didn't
work before.  Now the application code doesn't need to do any of that,
so it works in TShark as well as Wireshark.)
2021-02-20 01:36:26 -08:00
Guy Harris c80c16759b wiretap: eliminate two WTAP_FILE_TYPE_SUBTYPE_ values.
Eliminate WTAP_FILE_TYPE_SUBTYPE_ERF and
WTAP_FILE_TYPE_SUBTYPE_SYSTEMD_JOURNAL - instead, fetch the values by
name, using wtap_name_to_file_type_subtype().

This requires that wtap_init() be called before epan_init(); that's
currently the case, but put in comments to indicate why it must continue
to be the case.
2021-02-19 23:20:24 +00:00
Gerald Combs b620a5e535 VJC: Fixup some proto_tree_add_expert calls.
Make sure we add expert items to a valid tree. Fixes

** (process:11088): WARNING **: 17:45:42.159: Dissector bug, protocol VJC, in packet 12: "Text item" - "text" tfi->tree_type: -1 invalid (../epan/proto.c:5885)
2021-02-19 10:11:24 -08:00
David Perry 72c9b4b1e8 Add bounds checks to VJ compression [#17243]
When handling uncompressed packets:

* Add bounds checks before allocating or reading memory.
* Limit amount of memory allocated to the size of the IP header plus the
  maximum needed size of the TCP header, not entire packet contents.
* Check for IPv4 before processing.
* Use more constant macros for easier reading and review.

When handling compressed packets:

* Add bounds checks when calculating size of compression header.

General:

* Add extra comments.
* Use reported length instead of captured length for calculating
  syn+ack values (since that's what the sender would use).
2021-02-19 17:51:35 +00:00
Thomas Dreibholz b82d08ab18 Added IANA-assigned DCCP Service Codes.
Changes:
* Added list of IANA-assigned DCCP Service Codes.
* Added decoding of DCCP Service Codes into DCCP dissector.
2021-02-19 13:50:35 +01:00
Timmy Brolin 06a65f121f mPacket dissection improvements
* Added support for dissecting mPackets with arbitrary preamble length,
  in accordance with IEEE 802.3br-2016
  Changed fpp.preamble type from FT_UINT64 to FT_BYTES

* Allowed for capture device to signal non-integer preamble length by padding with zero.
  Added fpp.preamble.pad to indicate any alignment padding bits

* Added missing printouts of SMD types
  i.e. SMD-E, SMD-V, SMD-R, SMD-S0, ...

* Added missing printouts of decoded fragment numbers
  i.e. 0, 1, 2, 3
2021-02-19 09:53:08 +00:00
Joey Salazar a443d60b1c git: Factor out dissect_pkt_line helper
Add dissect_pkt_line helper that dissects a single pkt-line and
simplifies the pre-existing dissect_git_pdu().

A later patch will make use of this same helper for HTTP support.

Part of #17093
2021-02-19 08:46:29 +00:00
Adam Mitz 61d53b74c9 RTPS: update dissection of discovery PID 0x77 to match spec 2021-02-18 13:36:22 +00:00
Anders Broman 32d4af0ed9 NAS-5GS: Dissect Extended rejected NSSAI IE 2021-02-18 12:02:11 +01:00
Darius Davis a814a95007 arinc615a: Avoid calling g_str_has_suffix(NULL, ...).
Testing with tftpConversationError.pcapng attached to issue 10305 revealed this
warning on the console:

   GLib-CRITICAL **: 16:47:08.092: g_str_has_suffix: assertion 'str != NULL' failed

The cause is that the filename retrieved from the tftpinfo struct could
potentially be NULL when dissect_a615a_heur is called, for instance if the TFTP
RRQ/WRQ was not captured or not associated with the same conversation as the
DATA packet.

It's interesting that this condition arises from this capture
file... Perhaps the conversation tracking is amiss?  To be investigated.

Without knowing the filename, there appears to be no way to meaningfully
dissect the protocol beyond just dissecting just the file length and the
protocol version; For simplicity, I opted to maintain the present behavior and
have the heuristic test fail if the filename is not known.
2021-02-18 18:43:24 +10:00
Darius Davis c9423a9a13 Fix some spelling errors and update word list.
Celcius -> Celsius.

ammendment, framenun and untunelled (with one 'n') are in wireshark_words.txt
but do not seem to be present in our codebase anymore (and are not
correctly-spelled words), so AFAIK they can be removed from the list.

Added a handful of words which don't seem to be in the dictionary on my host
but are real words and are in the codebase.

Removed two contractions which are now handled within tools/check_spelling.py .
2021-02-18 07:01:23 +00:00
Gerald Combs 4fd5224ecf CMake: Use target_include_directores more.
The include_directories documentation at
https://cmake.org/cmake/help/latest/command/include_directories.html
says:

"Note: Prefer the target_include_directories() command to add include
 directories to individual targets and optionally propagate/export them
 to dependents."

Switch from include_directories to target_include_directories in a bunch
of places.

Add "SYSTEM" to the remaining external include_directories calls in
order to minimize our compiler warning blast radius.
2021-02-18 06:34:46 +00:00
Martin Kaiser 6bffbc9896 dvb-ci: pass ami payload to mime-encap dissector
Using the application mmi (ami) resource, a file of any type may be sent
from the module to the host.

The host receives both the file name and the binary payload. At the moment,
we parse the name and hand the payload to the png dissector if it ends with
.png

Instead of this manual approach, we should make use of all file types that
wireshark can dissect, i.e. all file types registered in the wtap_file
dissector table. The mime-encap dissector does just that, so we pass our
payload to this dissector.
2021-02-18 06:16:48 +00:00
Martin Kaiser 43ffb5436c btbnep: use the define for ethernet address length
Use FT_ETHER_LEN instead of the numeric value when we parse FT_ETHER items.
2021-02-18 04:57:40 +00:00
Martin Kaiser e106fa9e74 dvb-ci: lsc resource: dissect ip config request and reply
Dissect the ip config request and reply APDUs that were added in the DVB-CI+
v1.4 specification.

Re-use the existing value string for "connected/disconnected". (If the field
was a single bit, we could use a tfs...).

Yet again, this is based on work by Jens Rosenboom.
2021-02-18 04:41:25 +00:00
Guy Harris 881f1048eb frame: get rid of an unnecessary initialization.
We initialize a variable and, *immediately* after that, assign it a value.
2021-02-18 02:01:34 +00:00
Gerald Combs dc73b731ca IEEE 802.11: Handle invalid SGDSN serial number lengths.
Fixes #17239.
2021-02-18 00:58:41 +00:00
Martin Kaiser 2ff9f3eb78 dvb-ci: add the host control apdus from CI+ 1.4
The CI+ v1.4 specification added more APDUs to the host control resource.
Extend our APDU list to recognize the new APDUs.
2021-02-17 20:52:13 +00:00
Eugene Adell 4e3ec2d01a TCP: last out-of-order packet is marked as a retransmission
In some circumstances when dealing with a series of out-of-order
packets, the last packet of this series is marked as a
retransmission instead of an out-of-order. Closes #17214.
2021-02-17 20:31:16 +00:00
Emanuele Bovisio b3f356efa2 RADIUS: add accounting request authenticator validation
validate authenticator field for Accounting-Request packets

implement RFC 2866, Request Authenticator page 7
2021-02-17 20:10:20 +00:00
David Perry 1965109ec7 Fix null dereference in packet-vj-comp.c
I missed testing that `conv` wasn't null before passing it to
`conversation_get_proto_data()`. This fixes that.

Fixes #17238.
2021-02-17 07:42:19 -05:00
Caleb Chiu 6581899a84 NCSI: Squash commits of NCSI and PCI-IDS
NCSI: Extends NCSI dissection based on DSP0222 Version: 1.2.0_2b

Add pci-ids.c and pci-ids.h for mapping PCI IDs(VID,DID,SID,SVID) to string.
Extends NCSI dissection to support DSP0222 Version: 1.2.0_2b.
Extends NCSI dissection to support Mellanox OEM commands.

NCSI: Use TFS for boolean mapped string and added AEN dissectors

1. Use the tfs defined in tfs.c
2. Refine the boolean mapped strings to be TFS style
3. Added dissectors for AEN

NSCI: Fixed erros with gcc 7.5.0

1. Fix compiling errors with gcc 7.5.0 under Ubuntu 18.04
2. Sloved complaints of git pre-commit hook

NCSI: Add "0x" prefix for displaying HEX values

There are codes display HEX values without prefix, added "0x" to fix that.

PCI-IDS: Added PCI ID file and python script to convert it to C codes

1. Added the PCI ID file pci.ids from https://pci-ids.ucw.cz/
2. Added pci-ids-convert.py to convert to epan/dissectors/pci-ids.c

PCI-IDS: Updated the PCI ID list to be Version 2021.01.11

NCSI: Remove trailing spaces and unused href entries

PCI-IDS: Use a fresh copy of pci.ids to generate pci-ids.c

1. Renamed pci-ids-convert.py to make-pci-ids.py
2. make-pci-ids.py uses a fresh copy of pic.ids to generate pci-ids.c

PCI-IDS: Move internal structure to C file

1. Move pci_id_t and pci_vid_index_t from header file to C file.
2. Refined the comments of pci-ids.c
3. Renamed local variable index (shadow variable) to idx

PCI-IDS: Refined binary search codes

PCI-IDS: Moved pci-ids.[ch] to epan/

Moved pci-ids.[ch] to epan/ as they ought to be
2021-02-17 07:10:31 +00:00
David Perry 23a5f6a177 Support Van Jacobson PPP compression (#12138)
A complete dissector for Van Jacobson PPP header compression:
<ftp://ftp.rfc-editor.org/in-notes/rfc1144.pdf>

This dissector was created solely by reading the description of the
protocol in section 3.2 of RFC 1144. In particular, I did *not* read the
sample implementation of the RFC in its Appendix A, due to the
questionable legality of using code with "All rights reserved" in
Wireshark. See #12138 for details.

Closes #12138.
2021-02-16 08:44:41 +00:00
John Thacker 20ab1ba46b HNBAP: Break out MCC and MNC from PLMNidentity 2021-02-15 19:39:06 -05:00
Gerald Combs e29c934d72 NVMe Fabrics RDMA: Initialize a variable.
Make sure q_ctx is fully initialized. Fixes #17233.
2021-02-15 10:28:57 -08:00
Alexis La Goutte ef03a3b4ea ieee80211: Fix dissection of NonTransmitted BSSID Capability when include on nonTransmitted BSSID IE
There is only Capability Information
2021-02-15 15:47:50 +00:00
Martin Mathieson 11e919898c Set a few more dissector vars/funs to static.
These are the last of the easy ones to fix/set.
2021-02-15 09:20:58 +00:00
Martin Kaiser 909bb0a012 dvb-ci: initial support for auxiliary file system resource
The Auxiliary File System Resource was added by the DVB-CI+ specification
v1.4. As a first step, this patch adds the framework for supporting the afs
resource and dissects two simple APDUs.

This is based on work by Jens Rosenboom.
2021-02-15 09:04:52 +00:00
Gerald Combs 270c8ed746 CMake: Make sure system headers are treated as such.
Use target_include_directories instead of include_directories in a few
places as recommended at

https://cmake.org/cmake/help/latest/command/include_directories.html

Doing so lets us mark a bunch of dependency includes SYSTEM PRIVATE, in
particular LIBXML2_INCLUDE_DIRS. On macOS this keeps us from triggering
the nullability warnings described at

https://www.wireshark.org/lists/wireshark-dev/202004/msg00056.html

(This might also keep the Visual Studio code analyzer from complaining
about various Qt headers, but I haven't tested this.)
2021-02-15 08:31:08 +00:00
Chuck Craft dde65b96cd ip: ip_ttl _ws.expert fields not set if no tree
See 'if (tree) ...' comment
Closes #17228
2021-02-15 07:33:39 +00:00
Martin Mathieson 7f2ad0b7d1 IEEE8022.11: Fix some spellings. 2021-02-15 06:29:01 +00:00
Martin Mathieson 0cf834f909 Make some more variables and functions static. 2021-02-14 19:42:01 +00:00
Martin Mathieson e727d6f838 PDCP: set key error strings with g_strdup_print) 2021-02-14 15:00:19 +00:00