Commit Graph

86808 Commits

Author SHA1 Message Date
Gulshan Singh 84dbc999f1 btlmp: Fix order of name offset and length fields
According to the Bluetooth Core Specification v5.3, Volume 2, Part C,
Section 5.1, the Name_Offset parameter of the LMP_NAME_RES PDU should be at
offset 2 in the payload and Name_Length should be at offset 3.
2023-02-19 13:58:44 +00:00
Jaap Keuter 455b9a470f sshdump: add capability to use doas on remote host 2023-02-19 13:41:24 +00:00
John Thacker f6e6853dc4 Qt: Plug leaks in Conversations/Endpoints windows
Set some models to have the Traffic Tab or Traffic Type List
that creates them as parent, so that they will be deleted
properly. Setting a model does not cause it to be deleted
unless it is parented, because models can be shared among
multiple views. Since these models are only used by the
one view, parenting them is fine.
2023-02-19 12:10:44 +00:00
Zach Chadwick 5c0af364f1 Sharkd: Add column header labels to the "status" output 2023-02-19 01:55:21 +00:00
John Thacker a9a7dcec21 Qt: Ensure that add frame comments trigger recoloring, count updates
Add functions to PacketListRecord to invalidate a single record's
colorization and column strings, used for a record is modified in a
way that needs to trigger redrawing, but we don't need to redraw
all packets.

Move the functionality for adding, deleting, and setting frame comments
into PacketListModel, operating on QModelIndexes (or on all physical
rows in the case of deleting all comments from a file.) Trigger
recolorization of any record with an updated comment.

Only set a block as modified when deleting comments if we actually
deleted comments. This avoids marking a file as modified if we
delete all comments from all frames, or all comments from selected
frames, when those comments do not actually have frames.

If cf_set_modified_block is used to modify a block that is already
modified, it can't update the comment count. In that case, return
false and have the callers update the comment count. (It already
has a return value, which is always true.) This avoids having the
GUI warning about saving into a format that doesn't support comments
when comments have been added and then removed.

Note that, unlike with time references and time shifts, there
are no fields (and hence no columns nor color filters) that depend
on whether other fields have comments. If for some reason some
were added, then the model data for all frames would have to be
updated instead. Since there aren't, we don't need to
redrawVisiblePackets, but we do need to drawCurrentPacket to ensure
the packet details are redissected.

Fix #12519
2023-02-17 20:49:11 -05:00
Alexis La Goutte 144de50d41 profinet: fix conflict 2023-02-17 19:06:18 +00:00
John Thacker 6cdd4ca71a doc: Remove stray word in statistics chapter 2023-02-16 18:42:01 +00:00
Martin Mathieson 36665d6dcb ORAN FH CUS: support section extension type 13 2023-02-16 17:38:42 +00:00
Daniël van Eeden c866cf4606 MySQL: LOCAL INFILE 2023-02-16 14:31:50 +00:00
John Thacker 01172f5a1d tshark: Support multiple -j and -J options, including mixed
Store the field filter strings in a wmem_map pointing to the
field flags for each string. This allows specifying multiple
filter options (-j or -J) on the command line, including some
of both.

Fix #17470
2023-02-16 12:46:44 +00:00
Laurent Fasnacht de2a2c5ddb packet-netlink-net_dm: try to guess the payload type
The kernel unfortunately doesn't indicate which payload type
it is. In particular, it might be an Ethernet packet or an IP one,
depending on how the SKB has been generated.

We work around this issue by guessing if the packet contains the
EtherType at the right offset to be an Ethernet packet, and decode
accordingly the payload.
2023-02-16 07:42:03 +00:00
Laurent Fasnacht 45cf6d9d6e packet-netlink-net_dm: add support for NET_DM_ATTR_REASON 2023-02-16 07:42:03 +00:00
Martin Mathieson 265a8a4984 ORAN FH CUS: Fix filter from previous commit. 2023-02-15 22:34:16 +00:00
Eugène Adell 618009c9b6 JDWP: Update dissector up to Java 19 2023-02-15 20:38:21 +00:00
Martin Mathieson 5ce29956e4 ORAN FH CUS: Handle section extension 19 2023-02-15 14:36:52 +00:00
John Thacker a49c022773 Qt: Fix scrollbar vanishing when adding columns
Don't call resize in applyRecentColumnWidths(). It doesn't seem
to be necessary in Qt5 or Qt6 to stretch the packet list last column
when the main window is wider than the total columns, and it doesn't
seem to be necessary to get the horizontal scroll bar to appear if
the columns are wider than the window frame either.
(When adding and removing columns, resizing the main window, etc.,
the columns all behave as expected, including if the wide Info
column is removed).

Resizing the packet list makes the scrollbar (and minimap) disappear.
It reappears when selecting another packet, but since it's not
necessary to resize, don't.

Fix #13597
2023-02-15 13:22:42 +00:00
John Thacker bdc8c0c21a TCP: Don't clear REASSEMBLE_ENTIRE_SEGMENT if we didn't complete
If MSP_FLAGS_REASSEMBLE_ENTIRE_SEGMENT is set (because the dissector
asked for one more segment) but the new segment didn't result in
a completed reassembly (because it overlapped and didn't add new
data), don't clear the REASSEMBLE_ENTIRE_SEGMENT flag.

Related to #18411
2023-02-15 07:42:07 -05:00
ismaelrti ca82297c3c RTPS: Reove dead code if structure
The condition of the if condition is mever met. i will never be lower
than long_number.
2023-02-15 12:06:44 +00:00
John Thacker 3ff02fa638 SIP: Ignore probable keep alives
If we have payload on TCP with a single octet that is not printable ASCII,
just reject it rather than waiting for the next CRLF line end (and
marking it as Continuation Data then). It is more likely to be a TCP Keep
Alive at the beginning of a capture file or connection.

At best, this change means that a correct SIP request or response is
interpreted rather than marking as Continuation Data. At worst,
Continuation Data has one less non printable octet at the beginning.

Fix #18411.
2023-02-14 21:50:27 -05:00
John Thacker 423b5ba4ce TCP: Do not adjust tcp seq analyze data if analyze seq is off
Check if tcp_analyze_seq is enabled before trying to get its
members. Prevents a null pointer dereference with the preference off.
2023-02-14 19:29:09 -05:00
Gerald Combs 75651c75ee Resources: Fix some Freedesktop metainfo URLs
Fix some URLs changed in 53b2994b43.
Ping #18801.
2023-02-14 09:15:27 -08:00
Martin Mathieson 0777b2c845 ORAN FH CUS: Add section ext types 7,8,9,14,15 2023-02-14 11:20:48 +00:00
Zach Chadwick 583c8492e5 Zero-pad any RGB color used for a bg or fg
The `color_t_to_rgb` method returns an unsigned int, taking a 32-bit
color code and reducing it to an integer. Sharkd displays these as hex
colors.

However, if this color is missing a Red or Green component, the hex
output is missing the zero-padding for those parts of the color,
resulting in the wrong or invalid hex code.

This patch simply pads the output with zeros.
2023-02-13 19:49:16 +00:00
Biswapriyo Nath bd24f450f8 CMake: Allow arm64 architecure in Windows
This also sets arm64 as processor architecture in exe manifest files.
2023-02-13 18:25:18 +00:00
Gian Lorenzo Meocci 6fab8ee395 Fix typo for the TEBUR field in the description 2023-02-13 17:30:25 +01:00
Mathis MARION eb684b8750 Update RPL dissector with path control subfields 2023-02-13 09:33:49 +00:00
Rubin Gerritsen bf7b3ee353 Bluetooth: Dissect features defined in 5.4
Dissect the feature set and the new control procedure defined
in Bluetooth 5.4.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2023-02-13 08:36:07 +00:00
João Valverde 9cb759b38e Enable rpathification and working relocation on Linux (take 3)
Dumpcap depends on wsutil.so. The path to the shared library
is encoded in the RPATH (or RUNPATH) property of ELF binaries.
This is currently an absolute path on most Unixy systems.

Dumpcap could not be made to work with a relative RPATH because it
uses elevated privileges and some loaders will ignore relative
RPATHs and non-standard paths under those circumstances, because of
(justified) security concerns.

To enable relocation of the program we link dumpcap statically
with wsutil instead.

This provides a fully working relocatable installation on Linux
and other platforms that support relative RPATHs.
2023-02-13 00:24:21 +00:00
Biswapriyo Nath 81996c5d79 CMake: Check sse4.2 compiler option for x86 only
This prevents checking sse4.2 compiler flag in non-x86 architectures.
Also set COMPILE_CAN_HANDLE_SSE4_2 and SSE4_2_FLAG variables to false
and empty values respectively to skip subsequent checks.
2023-02-12 21:40:49 +00:00
Martin Mathieson b8bf46459f Try to check that all items in bitmask set have same width 2023-02-12 21:37:10 +00:00
João Valverde ce6c3da727 Revert "Enable rpathification and working relocation on Linux (take 2)"
This reverts commit 8dfe8737c5
2023-02-12 20:30:38 +00:00
Tomasz Moń 58a80312cb
USBLL: Do not reassemble across STALL handshake
When device responds with STALL, the host will clear the halt using
ClearFeature(ENDPOINT_HALT) request. The request always results in data
toggle being reinitialized to DATA0. Because USBLL dissector does not
track all control transfers, it is unaware of the expected data toggle
change and thus would treat next DATA0 packet as retransmission if the
last data packet before STALL was DATA0.

USB transfer never spans across STALL, i.e. data packet after STALL
cannot be retransmission nor continuation of any earlier transfer.

Avoid continuing reassembly after a STALL by clearing active transfer
information from endpoint info on every STALL handshake.
2023-02-12 20:48:08 +01:00
João Valverde 8dfe8737c5 Enable rpathification and working relocation on Linux (take 2)
Dumpcap depends on wsutil.so. The path to the shared library
is encoded in the RPATH (or RUNPATH) property of ELF binaries.
This is currently an absolute path on most Unixy systems.

Dumpcap could not be made to work with a relative RPATH because it
uses elevated privileges and some loaders will ignore relative
RPATHs and non-standard paths under those circumstances, because of
(justified) security concerns.

To enable relocation of the program we link dumpcap statically
with wsutil instead.

This provides a fully working relocatable installation on Linux
and other platforms that support relative RPATHs.
2023-02-12 19:20:18 +00:00
Gerald Combs 877498ad0b [Automatic update for 2023-02-12]
Update manuf, services enterprise numbers, translations, and other items.
2023-02-12 16:46:06 +00:00
João Valverde 6d401f2eba CMake: Add a comment about dissector headers 2023-02-12 14:50:00 +00:00
João Valverde bb426c7a85 CMake: Remove unnecessary wmem object library
The cmake wmem sub-library code is superfluous and adds complexity
if trying to build parallel different configurations of wsutil.
2023-02-12 13:25:44 +00:00
Martin Mathieson 643fd70229 RTPS: Make a function static 2023-02-11 23:23:28 +00:00
Gerald Combs 53b2994b43 Docbook: Reorganize our guide directories
Move the top-level user-guide.adoc and developer-guide.adoc to their
respective source directores. This is in preparation for a future
toolchain revamp.

Move the wsug_graphics directory to wsug_src/images and wsdg_graphics
directory to wsdg_src/images. Copy common_graphics/* to the each images
directory and remove common_graphics. We only have five admonition
graphics; duplicating them lets us remove some build config overhead.

Rename wsluarm.adoc to wsdg_src/wsdg_lua_support.adoc.

Remove a dummy file.

Tested visually and by enabling `--failure-level=WARN`.
2023-02-11 21:09:46 +00:00
ismaelrti dedad3403a RTPS: Show topic name in info column of ACKNACK, GAP and other submessages
Added the topic name if known to columns of packets that contains
ACKNACK (and fragments), GAP, HEARTBEAT...
2023-02-11 19:57:27 +00:00
John Thacker 994669e5b3 UAT: Have a combobox for Dissectors
Add a drop-down combobox for UATs, including User DLTs, that
have a choice of dissectors. Make the combobox editable, which
will provide suggestions, and pass things through to the existing
UAT validation for dissectors. (It's a very long list, especially
with 1717 entries, including 530 just from various BT GATT UUIDs,
so being able to still type it in seems useful.)

Dissectors are not protocols. Rename the UAT field from PROTO to
DISSECTOR where used. Update the column names and long descriptions
to use dissector instead of protocol in dissectors that used this.
There may at some point be UATs that want protocols instead of
dissectors, but that's not what the current behavior does and
none of the current dissectors that use the existing types want.

Update the documentation to use "dissector" instead of "protocol."
Put the names of the actual current three Ethernet dissectors.
Clarify that the "ip" dissector actually tries IPv4 and IPv6,
instead of just IPv4.

UAT entries are backwards and forwards compatible with versions
without this change.

Fix #18836.
2023-02-11 16:40:13 +00:00
John Thacker 0c79fecac3 wscbor: Ensure skip if errors advances the offset
wscbor_skip_next_item should not return to the beginning offset
if there are errors, because this makes wscbor_skip_if_errors
do the opposite of what it claims. In the case where the errors
involve having far too many items in a list, this can cause
memory exhaustion or infinite loops.

Fix #18782. Fix #18840.
2023-02-11 13:08:48 +00:00
Tomasz Moń 2031c3278b
USB MSC BOT: Workaround USBLL reassembly limitations
Mass Storage Bulk Only Transport prohibits ending data transfers with
zero length packet. This is generally not problematic when capturing at
OS URB level, but it does raise issues when capturing at USB Link Layer.

USBLL dissector has no idea where the transfer ends. It will concatenate
SCSI Data IN with CSW and SCSI Data OUT with next CBW whenever SCSI Data
length is multiple of bulk endpoint max packet size (virtually all Read
and Write commands because most common sector sizes are 512 and 4096).

CBW and CSW always end transfer reassembly because they must start at
packet boundary and their size is not equal to bulk max packet size.

Merging Data IN with CSW poses no problems at all. The only end user
visible difference is that Data IN and CSW appear in single packet (the
packet where reassembly ends).

Merging Data OUT with next CBW is ok for practical purposes, because
host periodically issues TEST UNIT READY (which does not have data
transfer and thus is not subject to the issue). While the CSW (and thus
SCSI status) will appear before Data OUT (and next CBW), the packets
will be correctly linked.

Workaround USBLL reassembly limitation by anticipating that SCSI Data
can be concatenated with Bulk Only Transport wrappers. Proper solution
would involve implementing a framework to allow USB class dissectors to
signal expected transfer length on Bulk IN or Bulk OUT endpoint whenever
CBW is encountered.
2023-02-10 22:04:46 +01:00
Tomasz Moń cd14ebf2df
USB MSC BOT: Move CBW and CSW dissection to functions
Move CBW and CSW dissection to separate functions to make it possible to
reuse the CBW/CSW dissecting code later. No functional changes.
2023-02-10 22:04:42 +01:00
João Valverde 9fca1acb40 CMake: Remove dumpcap dependency on ui 2023-02-10 20:59:22 +00:00
João Valverde 7fd4e2e542 Move ui/filter_files.[ch] to wsutil 2023-02-10 20:59:22 +00:00
João Valverde cf8107eb2a Move ui/clopts_common.[ch] to wsutil 2023-02-10 20:59:22 +00:00
João Valverde 0cea64a632 Move ui/cmdarg_err.[ch] to wsutil 2023-02-10 20:59:22 +00:00
Daniël van Eeden d117e47673 MySQL: decode cloning packets
Some info about this can be found on https://dev.mysql.com/doc/refman/8.0/en/clone-plugin.html
however I didn't find much protocol documentation.
2023-02-10 20:33:01 +00:00
Gtker 6deec49b4c woww: Fix missing BASE_VAL64_STRING for 64 bit type 2023-02-10 19:45:14 +00:00
Gtker e5a35c2125 woww: Fix `index` variable shadowing global C function 2023-02-10 19:45:14 +00:00