Commit Graph

80304 Commits

Author SHA1 Message Date
Tomasz Moń 525006f97b protobuf: free memory used by scanner after parsing
Closes #17305
2021-03-26 15:47:28 +01:00
Tomasz Moń 98cf147b19 glib-compat: Fix build on Windows
Include string.h to make the memcpy() function available.
2021-03-26 09:52:56 +01:00
Daniel Dulaney 62af671bf3 Lua: add DissectorTable.try_heuristics() function
Add DissectorTable.try_heuristics(name, tvb, pinfo, tree). Previously,
there was no way for a Lua plugin to run an existing heuristic
dissector.

Based on Gerrit change 18718. Closes #17220.
2021-03-26 07:15:16 +00:00
Paul Weiß 537c5f2955 Regex text imoprt: MSVC compiling and updated timestamps
replaced [min ... max] = val initiallizers with a macro expansion
removed __attibute__
updated timestamps to march
2021-03-26 06:44:25 +00:00
Paul Weiß b0289c5aaf Regex text import: fixed ui deviations
disabled RichText in regex text input, to prevent invisible
formatting from getting passed to the regex engine
fixed a issue where fields matched by duplicate groups would
not be parsed
2021-03-26 06:44:25 +00:00
Paul Weiß afd1bb0381 Regex based import: documentation and release notes
Added documentation on the Regular Expression import mode
Added documentation for the associated ui-fields
Updated the screenshot for the import-from-hexdump dialog
Added a screenshot of the Regular expression mode tab
Updated the documentation for the updated Timestamp format
Added an entry in the release notes about this new/updated feature
2021-03-26 06:44:25 +00:00
Paul Weiß 8c1b29a597 Regex based textfile import
Modularized the parser backend slightly to have the needed hooks
Modified the timestamp format slightly to enable arbitrary postion for
second fractions
Added a regex based seeking parser for textfiles as frontend alternative
to text_import_scanner.l
Regex is using the GLib implementation
Supported frame-data formats are bin, hex, oct and base64
Regex based importing UI
Fixed Meory-leak in ImportTextDialog::exec()
A new tab was added to the text_import ui to accomodate the new fields
Hints are available and styled accordingly
2021-03-26 06:44:25 +00:00
Joakim Andersson 880edd9009 nordic_ble: Update display name of nordic_ble dissectors
Update display name of the nordic_ble dissector to the release used
by nordic semiconductor for the development tool on the homepage.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-03-25 22:10:11 +00:00
Joerg Mayer 72a6e814bb isis: Support for proprietary Avaya/Extremenetworks Fabric TLVs/NLIPD
- TLV 129 NLPID decoding cleanup with multiple NLPIDs
- NLPID 0x8f added (Avaya proprietary)
- TLV 147 decoding added (Avaya proprietary)
- TLV 184 Avaya prorietary IPVPN decoding added
- TLV Types 185-186 Avaya proprietary IPVPN MC added without decoding
2021-03-25 17:17:25 +01:00
Dario Lombardo f96886ebef
tools: add g_memdup to prohibited APIs. 2021-03-25 15:53:27 +01:00
Eugene Adell 2484ad2f72 TCP: SEQ analysis precedence preference
Introduce a new TCP preference to allow the user to choose the
precedence between Fast Retransmission or Out-Of-Order. When
performing the SEQ analysis, ambiguous packets will be considered
with the chosen priority, helping in the final interpretation.
Closes #15987
2021-03-25 13:29:38 +01:00
Dr. Lars Völker df46a52174 NEW: Dissector for signal PDUs
This patch adds a dissector for PDUs based on signals. On CAN,
FlexRay, etc. data is transported in PDUs that are based on
signals. These signals are typically an arbitrary number of bits.

This dissector allows:
- Parsing configured signals (shortened datatypes too)
- Scaling and moving signals values (compu scale)
- Naming signal values (compu consts)
- Filtering on the scaled and raw value

The dissector supports:
- Signal PDUs over CAN
- Signal PDUs over FlexRay
- Signal PDUs over SOME/IP
- Signal PDUs over PDU-Transport
2021-03-25 10:53:57 +00:00
Martin Mathieson 93e96885c5 GSVP: fix a typo
"interleaving"
2021-03-25 10:26:36 +00:00
Dario Lombardo ea929d6401 wsutils: add local implementation of g_memdup2.
g_memdup() was deprecated and replaced with g_memdup2() in GLib 2.68,
we provide our own copy of g_memdup2() for older GLib versions.
2021-03-25 09:38:10 +00:00
Dario Lombardo e6df130762 test: add missing raw string regex identifier. 2021-03-25 08:16:10 +00:00
Guy Harris d18e1f19e9 Add dumpcap options to set the name and description for a capture source.
Add --ifname and --ifdescr to allow the name and description for an
interface or pipe to be set; this overrides the specified name or
reported description for an interface, and overrides the pipe path name
and provides a description for a pipe.

Provide those arguments when capturing from an extcap program.

This is mainly for extcaps, so you have something more meaningful than
some random path name as the interface name and something descriptive
for the description.
2021-03-25 07:34:37 +00:00
Roman-Koshelev ecad065809 Add FIND dissector 2021-03-25 07:00:32 +00:00
Stefan Battmer bedd1a8aee gvsp, u3v: GenDC endianess fixes and new pixel formats
- gvsp: Fixed some GenDC container header related endianess bugs
        (flipped bits in dissector)
- gvsp: Added support for GenDC meta-data decoding
- gvsp, u3v: Added support for all newly defined pixel formats
- its: Removed redundant code (possible search and replace error)
2021-03-25 06:45:20 +00:00
Roman-Koshelev 815024346a TFTP: dissect_tftp fix
Now we ignore random packets and also correctly recognize server
responses in cases where the client uses the same port numbers as
the server for its TFTP or other conversations
2021-03-25 06:28:29 +00:00
Roman-Koshelev 0304d5ec27 TFTP: strengthen heuristic for RRQ/WRQ 2021-03-25 06:28:29 +00:00
Roman-Koshelev 5e2080131d TFTP: heuristic fix for RRQ/WRQ
Before that, it worked incorrectly for all valid RRQ/WRQ
2021-03-25 06:28:29 +00:00
João Valverde 291a8b8bc1 Replace g_assert(FALSE) with g_assert_not_reached() 2021-03-24 22:24:37 +00:00
Ranjeet Kumar Singh ebf670692a Protobuf: Allow all protobuf fields to have a plugin dissector 2021-03-24 21:39:01 +00:00
ranjetsih 11f933b446 Protobuf: Provide an option to add plugin subdissectore for fields of all types
As of now a plugin subdissector can register itself for byte or string type only.
This change adds an option to allow a plugin to register a subdissector for any protbuf field.
this subdissector will be able to dissect a protobuf field on top of the existing dissector for that field.
2021-03-24 21:39:01 +00:00
ranjetsih 387ebc955f Protobuf: Provide an option to add plugin subdissectore for fields of all types
As of now a plugin subdissector can register itself for byte or string type only.
This change adds an option to allow a plugin to register a subdissector for any protbuf field.
this subdissector will be able to dissect a protobuf field on top of the existing dissector for that field.
2021-03-24 21:39:01 +00:00
Jirka Novak f10ebb959d VoIP UI: Added shortcuts for dialog buttons
VoIP/SIP Calls, Sequence, RTP Streams, RTP Player and RTP Analysis
dialogs have shortcuts assigned. Shortcuts are same over all dialogs.
2021-03-24 20:02:41 +00:00
Caleb Chiu 4b1dad3f2e USB HID: Removed codes of repeated dissection
For class-specified HID request with data fragment, the original codes perform repeated dissection.
For example, the SET REPORT REQUEST 21 09 02 02 03 00 02 00 02 00 would be dissected as:
Setup Data
    bmRequestType: 0x21
        0... .... = Direction: Host-to-device
        .01. .... = Type: Class (0x1)
        ...0 0001 = Recipient: Interface (0x01)
    bRequest: SET_REPORT (0x09)
    wValue: 0x0202
        ReportID: 2
        ReportType: Output (2)
    wIndex: 3
    wLength: 2
    bRequest: 9
    wValue: 0x0202
    wIndex: 3 (0x0003)
    wLength: 2
    Data Fragment: 0200

And dissected as below after the codes removed:
Setup Data
    bmRequestType: 0x21
        0... .... = Direction: Host-to-device
        .01. .... = Type: Class (0x1)
        ...0 0001 = Recipient: Interface (0x01)
    bRequest: SET_REPORT (0x09)
    wValue: 0x0202
        ReportID: 2
        ReportType: Output (2)
    wIndex: 3
    wLength: 2
    Data Fragment: 0200
2021-03-24 18:46:45 +00:00
Jirka Novak 2a4859bd14 RTP Player: UI improvements
Changes:
- all waveforms has common scale therefore louder/quiter signal is visible
- when stream/streams are deleted from view, Y axis is rescaled and
  waveforms are rearranged to reuse empty space
2021-03-24 09:23:52 +00:00
Uli Heilmeier 2e6d3b571b LDAP: SASL Buffer doesn't include Length field
SASL Buffer starts after the SASL Buffer Length field. Therefore
we should only mark the bytes without the Length field.

Sample capture can be found in wireshark/wireshark#15128
2021-03-24 08:28:20 +00:00
Uli Heilmeier 337bdf8eb3 DNS: Fix pointer for is_multiple_responses
As discussed in wireshark/wireshark!2497 there is no need
for a pointer to a pointer.
2021-03-23 12:32:42 +01:00
Martin Mathieson 4981b10d0b Add a commit-msg that may be installed to verify commit msg line length. 2021-03-23 09:09:19 +00:00
ranjetsih 5177437f30 "GTP: add option to decode T-PDU Data with a plugin dissector"
As of now GTP dissector provides option to decode T-PDU data ether, async, and with some heuristics.

But there is no option present to decode a new protocol with a plugin.

This change adds an option to decode T-PDU data with a plugin, to help develop and test new protocols that are
encapsulated as GTP T-PDU data.
2021-03-23 08:02:43 +00:00
Nardi Ivan e677a909e1 SMB2: fix two memory leaks
* Since c3342930 we don't free anymore the entries in the files hashtables.
The cleanest solution is probably to convert these hashtables into two
wmem_map_t structures and let the wmem core handling any cleanup.

* b0f5b2c174 added supported for chained compression; the uncompressed
tvb must be freed
2021-03-23 07:32:23 +00:00
Joerg Mayer 2af7f913b8 packet-isis-snp.c: Add source-id-circuit to dissection 2021-03-23 08:06:26 +01:00
Guy Harris 3f556a6e76 Do the LFS checks before processing any subdirectories.
That's necessary in order to make sure that the required -D flags show
up when building code from all subdirectories.
2021-03-22 19:13:34 -07:00
Guy Harris a7082e33ff psample: fix formatting of 64-bit integers.
guint64 is *not* guaranteed to be an unsigned long int; on an ILP32
platform, it *can't* be a long, as that's only 32 bits.  Use
G_GUINT64_FORMAT to format guint64 values.
2021-03-22 12:59:55 -07:00
Amit Cohen 146578889e packet-netlink-psample: Add dissector for psample netlink packets
The Linux kernel includes a module called psample which sends sampled
packets to user-space over generic netlink.

This patch adds a dissector for these netlink packets.
The dissector is expected to be invoked by the generic netlink dissector and
during its hand off routine it adds an entry in the 'genl.family' dissector
table.

The various netlink attributes are dissected by calling
dissect_netlink_attributes(), in a similar fashion to the rtnetlink and
net_dm dissectors. The sampled packet itself is encoded in the netlink
attribute 'PSAMPLE_ATTR_DATA' and dissected by invoking a dissector from the
'sll.ltype' dissector table based on the packet's protocol which is
encoded in the 'PSAMPLE_ATTR_PROTO' attribute.

Signed-off-by: Amit Cohen <amcohen@nvidia.com>
2021-03-22 13:39:36 +00:00
Jirka Novak 030fbc7740 RTP Player: Fixed incorrect handling of legend in graph
Legend and it's elements were shown only when first waveform requires it.
Patch fixes it and all legend elements are shown when required by any
waveform.
2021-03-22 12:33:43 +00:00
Guy Harris 0cc59d38ab Replace the Large File Support CMake stuff.
The existing stuff doesn't appear to work (I tried it on 32-bit Ubuntu
18.04, and it did *not* add any flags to the compilation, as it appeared
not to conclude that they were necessary, even though they were).

Pull in the stuff from libpcap, which *does* appear to work.  (it does
so in my 32-bit Ubuntu testing).

This should fix #17301.

While we're at it, fix cppcheck.sh so that it doesn't attempt to run
cppcheck on files that have been deleted.
2021-03-22 12:11:26 +00:00
Jirka Novak 3693dd52cc rtp: addedd extended sequence number and timestamp
Extended sequence number added to info structures.
Extended timestamp (from 32 to 64 bit) calculation added and added to
info structures.
Both values simpifies calculations in rest of the code - we don't have
to care about wraparound. Code will be adapted later.
2021-03-22 11:21:15 +01:00
Tomasz Moń 9a3bb60266 IPPUSB: Do not assume every USB traffic is IPPUSB
It is invalid to assume that every unknown and/or vendor specific
traffic is IPPUSB. If a vendor specific class is indeed IPPUSB then
the dissector should be selected based on VID/PID.

The way IPPUSB was registering caused packets from devices without
corresponding dissector in Wireshark (majority of the devices in the
wild) being dissected as IPPUSB and shown as Malformed Packets. For
example the Silicon Labs CP210x UART Bridge was dissected as IPPUSB.
2021-03-22 08:39:19 +00:00
Jirka Novak a123578fd5 RTP Player: Visual waveform shows what is really played
Visual waveform is derived from decoded audio. When audio is decoded
incorrectly, waveform now shows it.
E.g. on issue 14401 is now audio play aligned with waveform, but it
exhibits that decoded audio is incorrect - about two times longer than
pcap!

Changes:
- samplefile_ renamed to sample_file_
- tempfile_ is renamed to temp_file_
- decode() is separated to decodeAudio and decodeVisual
- Frame info stores frame len and frame_num for every frame. We must hold
it per frame as it may change in time. Info is stored in separate temp file
as waveform samples.
2021-03-22 04:43:30 +00:00
Guy Harris fdbe68e3f0 ftypes: an fvalue_t can no longer have a GRegex.
Now that FT_PCRE is gone, a GRegex is not a valid value for a field.  (A
field can be a *string* field whose value is supposed to be a PCRE, but
that's just FT_STRING/FT_STRINGZ/FT_STRINGZPAD/FT_STRINGZTRUNC, and the
value is the string text.)
2021-03-21 20:53:34 +00:00
Pascal Quantin 09707973a9 NR RRC: use _ instead of - in filter names
Like what asn2wrs.py does
2021-03-21 19:31:53 +00:00
Pascal Quantin c5c6a5a9cc LTE RRC: use _ instead of - in filter names
Like what asn2wrs.py does
2021-03-21 18:46:53 +00:00
Pascal Quantin f6b0ff72e7 XnAP: use _ instead of - in filter names
Like what asn2wrs.py does
2021-03-21 17:52:50 +00:00
Pascal Quantin 9df7492627 S1AP: have a single filter for ENB-UE-S1AP-ID or MME-UE-S1AP-ID fields 2021-03-21 17:28:31 +00:00
Gerald Combs 7c0ca88170 [Automatic update for 2021-03-21]
Update manuf, services enterprise numbers, translations, and other items.
2021-03-21 17:13:10 +00:00
Eugene Adell 439ecf98b6 TCP: Obvious Spurious Retransmissions are not always detected
In rare circumstances Spurious Retransmissions are not detected
and the SEQ analysis would instead conclude with a Fast Retransmit
or an Out-Of-Order. As Spurious Retransmissions are more certain
than the latter ones, their respective precedences are changed.
The documentation is updated accordingly. Closes #13863.
2021-03-21 16:56:43 +00:00
Pascal Quantin 51cf733fc6 NGAP: have a single filter for RAN-UE-NGAP-ID or AMF-UE-NGAP-ID fields
Closes #17304

While in the area, replace - by _ in the other renamed filters as this
is what asn2wrs.py does.
2021-03-21 16:39:49 +00:00