Some of the item length changes in !9655 needed to be done with
the ASN.1 templates so that they don't get lost on ASN.1 regeneration.
Fixup ed8ee831fd
As requested [here][1] by @eapache, help with removing calls to
`wmem_packet_scope()` in favour of references to `pinfo->pool`.
* Plugins chosen semi-randomly.
* When a calling function already has a `pinfo` argument, use that.
* Remove `_U_` from its signature if it was there.
* If a function seems narrowly focused on getting and (possibly)
returning memory, change the function signature to take a
`wmem_allocator_t *`.
* If it seems more focused on packet-based operations, pass in a
`packet_info *` instead and use `pinfo->pool` within.
* If there are several functions defined with the same call
signature, add `pinfo _U_` to the argument list of similar
functions in order to maintain clarity/symmetry.
[1]: https://www.wireshark.org/lists/wireshark-dev/202107/msg00052.html
The Qt formattedDataSize() locale aware function only handles
sizes in bytes, not other units. Revert to using our format_size()
function from wsutil for the bits per second display string in
the Conversation window.
Fix#18211
The PTP analysis code did not support very long traces, in which the PTP
seqid wrapped around (~2.27 hours with 125ms intervals). This is fixed
by ensuring that PTP messages are only matched, if less than 60s apart.
Fixes: #18872
Display the date with the absolute time if a conversation in the
conversation table is over 24 hours long. Parse user entered filter
strings for date times as both date times and dates.
Fix#16092
We need to convert between the column selected for filtering
by the user (which is based on what is currently displayed in the
tab) and the column in the model.
The default mapToSource requires a QModelIndex and needs a row,
and thus doesn't work when all rows are filtered out by the current
filter (that is being replaced.) However, since our filterAcceptsColumn
does not depend on the row, we can determine the mapping just based
on the column number.
We want to convert the filter column to the column used in the model
when it is first selected, so that hiding columns later doesn't
accidentally change what column is used for filtering.
Improved fix#18738
The tests in `packet-tls-utils.c` for GREASE values aren't strictly
correct, in that they would falsely ignore a value such as 0x1a2a.
Create a macro to replace this test, which also serves to document the
intent of the test to future developers.
Also create a macro for the reserved values of QUIC transport parameters
which serve a similar function as GREASE.
- Added topic name (tq) suffix in the column information.
- Added topic query kind field dissection
- Added filter for last and intermediate DATA_SESSION submessages
Remove the separate copy of the conversation column type
enum in ConversationDialog. It doesn't correspond to the
enum in ATapDataModel, because it doesn't include the
Conversation ID and Total columns.
Delegates set to the Traffic Tree (a QTreeView) apply to
the displayed column number, not the what is displayed
in the column. That is, when columns are hidden (filtered),
the delegates stay with the old column number and end up
being displayed on new content. That's not what we want;
we want to always have the timeline graph on the Start and
Duration columns. Moving around the Delegate depending on
which columns are filtered is complicated; just set the
TimeLine delegate to the entire TrafficTree, and use the
default paint if we're on any column other than Start or
Duration. This does mean that we don't need to store a
map of Delegates.
Use a slightly different way to get TimelineDelegate to
paint the rect with no text using the current style, so
we can use the default paint with text for other columns.
The timeline graph needs to get the value of the Start and
Duration columns as filtered by the proxy column, so have
the model pass in indices so that they can be mapped to
the current displayed column.
Have the timeline graph apply to just the Start or just the
Duration column if only one is visible.
Together these compute the proper pixel values to apply
the timeline graph to the Start and Duration columns regardless
of which columns are displayed and which are filtered, in any
tab, regardless of what optional columns appear in that tab.
Fix#18860
It's not in the response message, it's taken from the request message,
so display it with a zero offset and length, so it doesn't match any
bytes in the packet.
It's a 32-bit field, so make it an FT_UINT32.
I leave it to those more familiar with the protocol to explain this
better or in more detail and, if possible, to come up with a better way
of doing this.
a9a7dcec21 broke the build by using std::as_const (new in C++17, we require
C++11). 189d93b4b8 switched to using a for loop with indices, but that
still fails on Qt5, because Qt5 uses int instead of qsizetype.
Switch back to the foreach-style loop, but using C++11 range-for instead of
Qt's foreach (which is semi-deprecated). Also, use qAsConst, which works in
C++11, instead of std::as_const.
Some classes, most notably Mass Storage, use STALL (instead of ZLP) to
prematurely end transfer. Finish reassembly when dissecting STALL. For
IN transfers ending reassembly is pretty straightforward and resembles
ZLP packet. For OUT transfers the reassembled URB is opposite direction
than the STALL handshake itself and last data packet may not be part of
reassembled URB. The last OUT data packet is part of reassembled URB
only if packet was acknowledged with NYET before endpoint was STALLed.