If a time shift has been applied to frames, save the time-shifted
value to the newly written file.
If we're doing Save/Save As, so that the newly written file replaces
the currently open file, make sure to clear the shift offset from
the frame data, for the same reason that we mark the file as no longer
being modified. If we're Exporting packets and not changing the
currently open capture file, leave the shift offset the same.
If there's color rules based on the frame protocol, recolorize.
We also really should reapply the current filter, if any, if it
depends on something in the frame protocol.
Fix#14306
Copying to the macOS application bundle breaks code signing on that
platform:
Wireshark.app/Contents/MacOS/Wireshark: code object is not signed at all
In subcomponent: /path/to/wireshark/wireshark/build/run/Wireshark.app/Contents/MacOS/translations/wireshark_zh_CN.qm
Deploy Qt DLLs when cross compiling using MinGW and Fedora Linux.
Currently the DLLs are read from a text file because windeployqt
in not available when cross-compiling from Linux.
The windeployqt-to-nsis.py script is modified to accept a text file
static mapping instead of invoking windeployqt.
We need to manually copy the Qt translation files, a task that
is also usually performed by windeployqt.
Fix some missing MinGW DLL dependencies (opus, winpthread).
Always start with a new mono_font_ when setting the default font in
setMonospaceFont(), both when font_string is not given and when the
font name does not exist.
On macOS this will avoid getting .AppleSystemUIFont, which is not
a monospace font and not what we want.
Qt deployment does not work because windeployqt cannot be run
when cross compiling (unless Wine is used). Skip this step until
other solutions are investigated and this is fixed. This means
that the target system must have the Qt Windows SDK installed with
MinGW binaries.
Also skip crreating an installer. Has somewhat complicated requirements
for signing that currently don't work when cross-compiling.
This allows building a usable NSIS Windows installer from Fedora,
with the limitations mentioned above.
Ping #19108
Use FindPython3.cmake instead of the deprecated FindPythonInterp.cmake,
to make sure we actually find Python3.
Don't use the module with MSYS2 because it is buggy and exhibits broken
behaviour.
Run it earlier in the configuration, just as a precaution, so other
indirect calls to find python don't happen earlier.
This reverts commit d6380e7ae4.
Turns out we were unwittingly still using FindPythonInterp
instead of FindPython3.cmake, via LocatePythonModule.cmake,
nd this commit actually enabled FindPython3.cmake. Also turns
out FindPython3.cmake is far too clever and very buggy with MSYS2.
It will usually not find the correct python binary and fail in many
suprising ways, depending on which combination of Python Windows
installations is present.
Make it possible to use Decode As to set the current dissector
for an entry in a dissector table to NULL even if there is a
default dissector registered for that entry. (none) means (none)
This is different than disabling the dissector entirely, because
a dissector might be registered as default for multiple entries/ports,
and a user might want only to disable it for one entry, not in general.
Or, a dissector might have multiple registered dissectors and a
heuristic dissector, and a user might want to disable one dissector
registered value while still having the heuristic dissector enabled.
This is different than setting the dissector for the entry to Data,
because it still allows heuristic dissectors to get a chance.
This is different than setting a "Try heuristic sub-dissectors first"
preference, because it only affects the single entry in the tables,
instead of trying heuristic sub-dissectors first for all entries in
the table (and it works for all tables, even those that lack such a
preference.)
Move the default dissector to the top of the combobox so it is
still easy to reset to the default.
Fix#12098
The DecodeAsItem determines the default dissector programmatically
when the table or value is changed. Other classes don't need to update it.
There's a value for the default dissector for a table and value written to
the decode_as_entries configuration file, but that has never affected
anything, because the actual default dissector is used. It is only
useful for information when inspecting or viewing the file.
When selecting a value for Decode As, values that appear in the
current packet are added as a combobox. Currently it only adds
the values from the last layer that contains a protocol. Add
the values from all the layers where the protocol appears to the
combobox instead.
Packet fields like tcp.time_relative, smb2.time, and SRT tables depend
on file-scoped data from other frames often computed in the first pass.
Thus redissection is necessary after applying a time shift.
Fix#18999
An attempt at implementing request in issue #18615. Adding octal view
while at it, in case anybody happens to prefer that or compare with
reference data in octal.
Both decimal and octal view have three byte wide columns, which is
visually distinctive from hex view. Decimal uses leading spaces, which
makes it clearly different from octal view.
Some ternary operators previously done based on BYTES_HEX are now using
BYTES_BITS. This change is done as the new BYTES_DEC and BYTES_OCT have
more in common with BYTES_HEX and are either equivalent in context or
closer linked to BYTES_HEX (e.g. for calculating column widths).
While translations should be updated, I am unsure if this is automated.
Also, if attempted, lupdate picks up changes from unrelated commits.
Call the base constructor so that the AudioRoutingFilter is
parented, and make the comment in rtp_audio_stream.cpp regarding
temp_file_ being released by audio_output_ true.
Have AudioSilenceGenerator inherit the QIODevice constructor that
takes a parent, and pass the parent into the constructor when
creating it in RtpPlayerDialog. This ensures that it is deleted
appropriately when marker_stream_ is deleted.
When changing a Decode As row item's table or selector, update
the default dissector string to refer to the default for the
new value.
Make access to the table names and selectors in a DecodeAsItem
through getters and setters, keeping the elements private, so
that we can ensure this happens whenever the table or selector
is changed.
We want to default to the last Decode As table with an entry in
the packet. Since the list of layers is a doubly-linked list,
start with the tail and go backwards for simpler and faster logic.
Move the logic for how to create a DecodeAsItem from a decode_as_t
into the constructors.
On the Expert Info dialog, connect the signal from the filter
checkbox being toggled manully, after setting the initial state
in the constructor. This prevents triggering an extra retap
during the constructor when the filter is initially set.
Free the data associated with the tap scanning for RTP streams after
the ids have been verified and it's no longer needed.
Free the actual rtpstream_id_t memory after they've been copied by
the RtpAnalysisDialog. As noted, rtpstream_id_free frees the
dynamically allocated data (the addresses), but not the object
itself.
Add the progress bar for a currently loading/tapping file to
the button boxes for the RTP Streams and VOIP Calls dialogs.
Use delayedRetapPackets in the RTP Streams dialog so that the
window appears and fills in (with the progress bar) while loading
a large file, instead of waiting until tapping finishes before
appearing.
Similar to 5bc94bc02a. Don't use
the automatic connection set up by Qt uic but manually connect
the display filter checkbox signal to its slot. This allows us
to initialize the checkbox and filter status without calling the
slot and retapping the packets in the middle of constructor.
There's always an tap triggered at the end of the constructor,
so we don't want to do a second one before the dialog appears if
the main display filter is set.
Finish removing RIPEMD160 support, which was started in 2a285b75a1. As
noted in that commit, FIPS 140-2 will abort if it's enabled. It's been
deprecated by OpenSSL as well.
Remove the debounce timer from the Appearance settings pane. The default
setting should be good enough for most people and the setting is still
available in the "Advanced" section if not.
Add comments to main_window_preferences_frame.ui noting that the
Language setting should be the last item, as in "if Wireshark is in a
language you can't read, go to this physical location in the UI."
Don't use the automatic connections set up by Qt but manually
connect the display filter checkbox signal to the slot.
This enables us to initialize the checkbox and filter without
calling the slot and retapping the packets.
There is always a delayed retap triggered in the Conversations
or Endpoints dialog constructor. We don't want to do an extra
retap of the packets before the dialog appears if the main
display filter is set.
Related to #18292
Fixup !10488. The tap listeners are removed when a file is closed,
but the dialogs still need the data until the dialogs are closed.
So only reset the data when the dialogs are destroyed (or the taps
are reset.)
Migrate some built in columns that correspond exactly to only two or
three fields to custom columns. The last time column customification
was done, multifield custom columns didn't exist. This simplifies
the GUI for most users, and also means that when these columns do
exist, "Apply as Filter" will work as expected.
COL_8021Q_VLAN_ID, COL_VSAN, COL_DCE_CALL, COL_TEI
Related to #13941
Free the data associated with the conversation table when
destroying the ATapDataModel.
The example file in #18292 leaks over 25 MB each time the
Conversations window is opened and closed and 7.5 MB each
time the Endpoints dialog is opened and closed.
Move the deprecated column check functions from the prefs
file to the (Wireshark internal use) column files. Make
them public so that the recent file checking can use them.
This keeps column handling in one place.
Make the recent file column width checking able to convert
a deprecated column to a custom column the same as the main
prefs file.
Commit 1d6cf2f513 changed prefs
with syntax error to call report_warning instead of printing
a log warning, which produces a GUI pop-up in Wireshark.
However, that means that the report message handling routines need
to be init'ed earlier, before the recent or recent_common files
are read, or else a syntax error in one of the recent configuration
files causes a segfault from deferencing a null pointer.