Commit Graph

7023 Commits

Author SHA1 Message Date
Stig Bjørlykke 533d859499 Qt: Register import_hexdump.json as a profile file
Profile files which is only used in Qt is not automatically registered
during startup and must be explicit registered.

Add profile_register_persconffile() to handle this registration.
2021-09-21 18:20:34 +00:00
João Valverde d09651e637 CMake: 'libui' depends on wiretap 2021-09-21 14:52:32 +00:00
João Valverde dfd241cef5 CMake: 'version_info' depends on wsutil 2021-09-21 14:52:32 +00:00
Developer Alexander 7866f43d82 IO Graph: Add checkbox to prevent automatic rescans
Adds a checkbox 'Automatic Update' to the IO Graph to enable or disable
rescans and recalculation of graph data temporarily. This is useful when
you want to modify settings of multiple graphs without triggering a rescan
with every change of a single setting. This becomes useful for large trace
files in particular.

Rescan or recalculation events are queued while 'Automatic Update' is not
active. Checking 'Automatic Update' triggers the queued updates.

The setting for 'Automatic Update' is stored in a preference.

A german translation for 'Automatic Update' is included.
2021-09-21 12:58:55 +00:00
João Valverde 3164d4a646 MinGW-w64: Use clock_gettime()
Mingw-w64 has this function. We may have to define some extra symbols
for API visibility but on my system the config check is working out
of the box.

POSIX systems come in many flavours, remove the "save time" if()
condition in this case.

Fix code to check if we have clock_gettime() on Windows as well.
2021-09-21 05:56:34 +00:00
João Valverde 5f79503d67 Fix config.h include order
The header "config.h" needs to be the first header included in the
source file, no exceptions.
2021-09-20 20:16:52 +01:00
Roland Knall 977c73d5b4 Qt: Pad time values for loading times
Pad the loading time values with leading zeros each
Fixes: #17601
2021-09-20 13:06:40 +02:00
João Valverde debd6bffae version info: Reduce locale display.
The locale information can be excessively verbose. Cut down the
number of categories displayed to one, arguably the most relevant
for troubleshooting purposes.
2021-09-19 17:13:29 +00:00
Gerald Combs 2cb684c92d [Automatic update for 2021-09-19]
Update manuf, services enterprise numbers, translations, and other items.
2021-09-19 16:52:44 +00:00
Stig Bjørlykke 36977acfbf Qt: Store Import Hex Dump settings
Store all user specified values from the "Import from Hex Dump"
dialog in a profile import_hexdump.json file.

Set default ExportPDU dissector to "data".
Fixed a minor typo in a help text.
2021-09-18 18:20:57 +00:00
João Valverde 8df2a73594 Use the musl in-tree getopt_long() everywhere
Besides the obvious limitation of being unavailable on Windows,
the standard is vague about getopt() and getopt_long() has many
non-portable pitfalls and buggy implementations, that increase
the maintainance cost a lot. Also the GNU libc code currently
in the tree is not suited for embedding and is unmaintainable.

Own maintainership for getopt_long() and use the musl implementation
everywhere. This way we don't need to worry if optreset is available,
or if the $OPERATING_SYSTEM version behaves in subtly different ways.

The API is under the Wireshark namespace to avoid conflicts with
system headers.

Side-note, the Mingw-w64 9.0 getopt_long() implementation is buggy
with opterr and known to crash. In my experience it's a headache to
use the embedded getopt implementation if the system provides one.
2021-09-17 00:43:54 +01:00
Roland Knall 19f3a82ff8 Qt: ByteView make hover configurable
Allow the hover selection to be either configured via context menu
or by pressing the Ctrl key while moving the mouse. The configuration
is stored via profile
2021-09-13 15:33:46 +00:00
Nardi Ivan 3cb302f05b HTTP2, QUIC: fix "Follow Stream"
"Follow Stream" functionality assumes that all data in a single packet
belongs to the same stream. That is not true for HTTP2 and QUIC, where
we end up having data from unrelated streams.

Filter out the unwanted data directly in the protocol dissector code with
a custom `tap_handler` (as TCP already does).

Close #16093
2021-09-13 15:13:10 +00:00
Joakim Karlsson a7a7849259 Qt: Enable Edit Name Resolution for EXPORTED_PDU 2021-09-13 14:22:16 +00:00
Darius Davis fe9123b541 Qt: Restructure related-packet indicator drawing.
The related-packet drawing code currently intermingles the selection and the
drawing of the conversation "trace" lines and the indicators.  Separating them
out -- so we make the decisions upfront and then do the drawing -- will help
with any future work in this area.
2021-09-13 20:59:52 +10:00
Gerald Combs 4fe297767b [Automatic update for 2021-09-12]
Update manuf, services enterprise numbers, translations, and other items.
2021-09-12 09:28:32 +00:00
Stig Bjørlykke 147aadea44 Qt: Add Decode as Hex Digits in Show Packet Bytes
Non-hex character in the data are skipped, enabling the decoding
to continue converting all hex digits found.
2021-09-11 14:41:15 +02:00
Guy Harris 76b08ea083 Fix spelling errors.
The Ubuntu build commented on some spelling errors in executable code
files.  Fix the errors that don't come from external files containing
the spelling errors (USB product and vendor IDs, PCI IDs, ASN.1
specifications), and fix some errors that don't show up in the
executable code files (e.g., in comments and variable names).
2021-09-11 10:01:27 +00:00
David Perry 389a603fdb Allow adding comments to all selected packets
Allow the user to select multiple packets, and

* add the same comment to all selected packets
* remove all comments from selected packets

A new comment is added to each packet, now that we support multiple
comments per packet.

This is one potential way to address #8713.
2021-09-10 20:47:12 +00:00
David Perry 84a0141683 [#12331] Persist cmd-line prefs on reloading Lua
Save a list of all user options that were specified on the Wireshark
command line using the `-o` option. Reapply those preferences after
reloading Lua plugins. Fixes the behaviour given in #12331 wherein such
prefs were reset to the defaults, not the command-line values, when
reloading Lua plugins.

When the user changes a preference in the Wireshark UI, remove that
preference from the stored command line options, so it doesn't get reset
when Lua plugins are reloaded again.
2021-09-09 12:58:38 +00:00
Uli Heilmeier 4e7d10eea1 Credentials Tap: Fix wmem scope for init call
When calling credentials_init() for a tshark live capture we're in the
epan wmem scope.

Fixes: wireshark/wireshark#17576
2021-09-08 20:07:01 +00:00
Roland Knall 48cf9d5497 Qt: IOGraph - correctly add new graphs
If a graph is added it should be a single operation, not multiple setData operations
leading to a myriad of dataChanged signals to be fired, which in turn can hinder redissection.
2021-09-08 19:32:39 +00:00
Alexis La Goutte 1bf1a1ea7c sequence_dialog(Qt): Fix Called C++ object is null 2021-09-07 06:00:28 +00:00
Ramin Moussavi 03a07e4f1b fix two display issues with remote interfaces window 2021-09-05 07:47:52 +00:00
Moshe Kaplan 8ef6f04f5a Qt: Debounce Preferences -> Advanced menu : Avoid leaking memory
Free the QTimer in the PreferencesDialog's destructor to
avoid leaking memory.
2021-09-04 07:47:34 +00:00
David Perry d3d4e4b135 Show error for `-X lua_script` if no Lua support
Wireshark/tshark may be built without Lua support. This patch adds an
error message if the user specifies the `-X lua_script` command-line
argument to a program built without Lua support, so the user is not left
wondering why their script isn't working.
2021-08-30 08:01:05 -04:00
Guy Harris 3cb6403a4c wiretap: always allocate a block for a record.
Without that, you could add a comment to a record in a file format the
reading code for which doesn't allocate blocks, but the comment doesn't
get saved, as there's no block in which to save the comment option.

This simplifies some code paths, as we're either using the record's
modified block or we're using the block as read from the file, there's
no third possibility.

If we attempt to read a record, and we get an error, and a block was
allocated for the record, unreference it, so the individual file readers
don't have to worry about it.
2021-08-29 19:12:13 -07:00
Gerald Combs dc122d1404 [Automatic update for 2021-08-29]
Update manuf, services enterprise numbers, translations, and other items.
2021-08-29 11:54:22 +00:00
Tomasz Moń c2edb44a9a Qt: fix memory leaks found by Visual Leak Detector
Set PacketDiagram as parent of QGraphicsScene so the scene is destroyed
together with PacketDiagram.

Dynamically allocate WiresharkApplication and explicitly call its
destructor when no longer needed. This results in deletion of
FunnelAction objects created in register_menu_cb() and QAction objects
created in TapParameterDialog::registerDialog(). For some reason, when
breakpoint was set inside WiresharkApplication destructor it would not
get triggered on exit, and so the child objects would get reported as
memory leaks.

Delete main window and application only after epan_cleanup(). This makes
lua plugins actually call ops during cleanup (e.g. destroy_text_window)
and makes it possible to free the memory allocated in FunnelStatistics
constructor.
2021-08-29 08:50:57 +00:00
Tomasz Moń e9533a3f5d Qt: stop capture syntax worker thread on exit
Instead of creating endless loop and synchronizing using QWaitCondition,
execute the syntax worker check in its thread by emitting signal. The
syntax worker thread affinity is set to worker thread so the slots
handling takes place within the worker thread context.
2021-08-29 08:16:32 +00:00
Alexis La Goutte 2ee06d3fef Qt: Add Turkey translation
Thanks to Serkan ÖNDER
2021-08-25 14:06:50 +00:00
Dr. Lars Völker 8e2cd4f652 UI: Import profiles from ZIP supporting bigger files (Bugfix)
This patch allows the profile importer to recover from a file too large
to import as well as adjusts the maximum allowed config file size.

Closes: #17504
2021-08-25 13:40:12 +00:00
Jirka Novak dd161ade12 RTP Player: Fix of resampling for visual waveform
When capture was longer (e.g. 800s), audio was decoded correctly, but
visual waveform was shown incorrectly. Reason was exceeding range of
guint32 during calculation. Calculation is now made in guint64 and then
put back to guint32.
2021-08-21 07:20:33 +00:00
Guy Harris c6717dc6b3 text_import.c: get EXP_PDU_TAG_PROTO_NAME from the header.
Don't hardcode 12, use EXP_PDU_TAG_PROTO_NAME from
wsutil/exported_pdu_tlvs.h.
2021-08-20 14:58:44 -07:00
Jirka Novak af059913b3 RTP Analysis: CSV export has header line
Export to CSV from RTP Analysis has header now. Header is on top of the
export so for export of multiple tabs it is just once in the export.
2021-08-18 19:27:10 +00:00
Gerald Combs 2fadbe7c28 [Automatic update for 2021-08-15]
Update manuf, services enterprise numbers, translations, and other items.
2021-08-15 09:29:16 +00:00
David Perry 6e12643f19 [#17478] free blocks in more places
Bug 17478 was caused by `wtap_rec.block` being allocated for each
packet, but not freed when it was done being used -- typically at the
end of a loop.

Rather than requiring each caller of `wtap_read()` to know to free a
member of `rec`, I added a new function `wtap_rec_reset()` for a
slightly cleaner API. Added calls to it everywhere that seemed to make
sense.

Fixes #17478
2021-08-10 00:08:15 +00:00
Gerald Combs 410cfdd7da [Automatic update for 2021-08-09]
Update manuf, services enterprise numbers, translations, and other items.
2021-08-09 00:41:29 +00:00
Martin Mathieson aaf79b62d7 F1AP stats 2021-08-06 09:31:15 +00:00
Gerald Combs ef7fc86f53 [Automatic update for 2021-08-01]
Update manuf, services enterprise numbers, translations, and other items.
2021-08-01 16:15:11 +00:00
Alexis La Goutte d886837df9 pref_models(Qt/model): Fix Dead Store (Found by Clang Analyzer)
Although the value stored to 'pref' is used in the enclosing expression, the value is never actually read from 'pref'
2021-07-30 20:43:56 +00:00
Orgad Shaneh fa1f76a83f rtpdump: Fix usec value in header
usec is nsec / 1000.
2021-07-28 06:51:36 +00:00
João Valverde 133b0c583f Move epan/wmem/wmem_scopes.h to epan/
This header was installed incorrectly to epan/wmem_scopes.h.

Instead of creating additional installation rules for a single
header in a subfolder (kept for backward compatibility) just
rename the standard "epan/wmem/wmem.h" include to
"epan/wmem_scopes.h" and fix the documentation.

Now the header is installed *correctly* to epan/wmem_scopes.h.
2021-07-26 14:56:11 +00:00
Gerald Combs 120b4c7e78 [Automatic update for 2021-07-25]
Update manuf, services enterprise numbers, translations, and other items.
2021-07-25 09:29:17 +00:00
Peter Wu 67d37da79a CMake: fix macOS build when both Qt5 and Qt6 are installed again
See v3.5.0rc0-1614-g785657d9b8 for the earlier fix and context.

Fixes: v3.5.0rc0-2496-g9b78a42855 ("CMake: Fixup qtui's includes.")
2021-07-22 13:25:02 +02:00
Guy Harris e8a8fab18c text_import: create a wtap_block_t before calling wtap_block_add_...option.
Those routines can't add an option if there's no block to add it to;
this meant that neither the direction nor the sequence number would be
set when importing a packet.
2021-07-21 00:03:47 -07:00
Evan Huus d6d7dd1e56 First pass pinfo->pool conversion
Automated find/replace of wmem_packet_scope() with pinfo->pool in all
files where it didn't cause a build failure.

I also tweaked a few of the docs which got caught up.
2021-07-21 05:38:29 +00:00
Guy Harris ef542759d0 text_import: only add the packet flags if we have them.
If we don't know the packet direction, don't bother adding the packet
flags option.

While we're at it, don't bother casting a guint64 to guint64.
2021-07-20 14:45:52 -07:00
David Perry dc7089e831 Carry drop count/packet ID/queue ID as options on packet block 2021-07-19 21:25:40 +00:00
Gerald Combs 96c29704c8 [Automatic update for 2021-07-18]
Update manuf, services enterprise numbers, translations, and other items.
2021-07-18 09:29:30 +00:00