Changes several calls of `create_dissector_handle()` to instead call
`register_dissector()` with a name for the dissector.
This should handle all dissectors in `epan/` from `packet-j*` to
`packet-o*`.
This change allows affected dissectors to be findable by calls to
`find_dissector()`. In turn, this opens up more command-line use for
these protocols, including fuzzshark and rawshark, as well as lua use
via `Dissector.get()`.
Where needed, move the call from the protocol handoff function to the
protocol register function, save the result in a static variable,
and use that variable in the handoff function.
There were some calls to `create_dissector_handle()` or
`register_dissector()` which passed `-1` as the protocol argument. When
I saw those I corrected them to pass the actual `proto_foo` identifier
instead.
Partially addresses #5612
If the server requested GSS-API or SSPI authentication, send
the client response to the GSS-API dissector (or NTLMSSP, if
it looks like that.)
Fix#19151
Instead of skipping over libraries prefixed with @rpath and handling
them manually, scan our executables for valid prefixes and use those to
discover library paths.
Modernize our code in other places.
Free the old validated color filter list instead of just setting
it to null. Prevents leaks when changing the color filters multiple
times when a file is open.
Freeze the packet list early when changing profile and when closing
the preferences dialog to avoid updating column data before doing a
full redissection.
The packet list will be thawed when redissection is done.
Related to #19079.
Add the fragment fields when the F bit is set, which should
only be on an unreliable transport. No defragmentation is done
yet.
Update a few comments, and the blurb for the length fields (since
the lengths are in units of 4 octets, which is unusual.)
Remove the "copyright-excludes-files-in-native-package". It was added
in Lintian 2.57.0 and annoyingly removed without any sort of backward
compatibility in 2.106.0. Ubuntu 22.04 / Jammy ships with Lintian
2.114.0.
Cherry-picked from 08460a7f43
Conflicts:
.gitlab-ci.yml
The diagramClicked change was made redundant by 1bf1a1ea7c and we didn't
notice before merging !3253. The mouseMoved change was incorrect; I missed
that drawDiagram was calling mouseMoved(NULL) explicitly, and my change
introduced a crash.
This reverts commit 0f71aa256c
snprintf(), sensibly, takes a size_t argument specifying the size of the
buffer. g_snprintf(), bogusly, takes a gulong argument specifying the
size of the buffer, so we had to do casts to avoid narrowing complaints,
but we're just using snprintf() now (as we require C11 or later), and
don't need the casts any more.
snprintf(), sensibly, takes a size_t argument specifying the size of the
buffer. g_snprintf(), bogusly, takes a gulong argument specifying the
size of the buffer, so we had to do casts to avoid narrowing complaints,
but we're just using snprintf() now (as we require C11 or later), and
don't need the casts any more.
Add a check for reserved bytes in the header.
This minimizes the probability for a false-positive dissector selection.
There are even more options for filtering, but each additional filter
minimizes the possibilities for debugging on a malformed packet.
Closes#19075
In reassemble_octet_string, fragment_add_seq_next is called
repeatedly until it halts, which means that it is only called
inside the single frame. It is also called recursively, with
the result of reassemblies at a different recursion level being
used at a higher level.
The dst_ref ID is only 16 bits; the nest_level is limited to 500.
Combine them and use that as an ID for the sequences, to avoid
having multiple reassemblies in the same frame with the same key.
Such reassemblies tend to leak, particularly when they consist
of only one fragment (so there is no tvb created for the new
fragment head.)
Add a recent.gui_follow_show preference to save the most
recently used value of "Show data as" in Follow Stream
for a profile, as requested. It can be a bit time consuming
to wait for ASCII to load if that's not the format a user
commonly requests.
Fix#15963
The blf code assumes that the last parameter of the LIN-Message format
is mandatory, which it is not. If present, blf stops opening the file.
Fixes: #19147
On long lines without whitespace, FollowStreamText (and its
QPlainTextEdit) spends most of its time when adding text looking
for word boundaries to wrap at.
For the C Array, Hex Dump, and YAML options, we insert line
endings after fixed widths, so the default wrap behavior is fine.
In other case, we don't control whether there's line breaks or white
space (and with Raw, we ensure that there *isn't* white space or
line breaks in the middle of long lines), so it's not worth an
O(N^2) performance hit looking for word boundaries. Text with words
separated by whitespace in very long lines will word wrap worse now,
but that's acceptable in exchange for the dramatic performance
improvement.
Fix#17313.
Related to #15963 ("There should be a preference for the initial
selection, so you can default to Raw, etc. instead of always having
to wait for ASCII to finish") and #15211 ("We should probably replace
FollowStreamText's QTextEdit with our own widget.")
Base "do we add the address string, wrapped in parentheses?" on "is the
address string non-empty?" That handles both AT_NONE and various string
types when the string in question is empty.
If the rsolved name string is empty, don't just skip adding parentheses
around the address string, compute the space needed differently.
This patch adds the tracking of where EGFX frames are started, ended and acked. It adds
corresponding link fields to easily navigate between frame and its ack.
Instal development headers with MSYS2 native packaging, so
it can be used to develop Wireshark plugins on Windows.
Since we don't have an official Windows SDK this will make the
MSYS2 package more useful (more than it already is), rather than
just an alternative method to install Wireshark on Windows for people
using MSYS2.