Commit Graph

4310 Commits

Author SHA1 Message Date
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
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
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
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
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
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
Guy Harris 0a9ef601d2 Clean up handling of --capture-comment.
Don't store the comments in a capture_options structure, because that's
available only if we're being built with capture support, and
--capture-comment can be used in TShark when reading a capture file and
writing another capture file, with no live capture taking place.

This means we don't handle that option in capture_opts_add_opt(); handle
it in the programs that support it.

Support writing multiple comments in dumpcap when capturing.

These changes also fix builds without pcap, and makes --capture-comment
work in Wireshark when a capture is started from the command line with
-k.

Update the help messages to indicate that --capture-comment adds a
capture comment, it doesn't change any comment (much less "the" comment,
as there isn't necessarily a single comment).

Update the man pages:

- not to presume that only pcapng files support file comments (even if
that's true now, it might not be true in the future);
- to note that multiple instances of --capture-comment are supported,
and that multiple comments will be written, whether capturing or reading
one file and writing another;
- clarify that Wireshark doesn't *discard* SHB comments other than the
first one, even though it only displays the first one;
2021-07-15 05:43:36 +00:00
Gerald Combs 9b78a42855 CMake: Fixup qtui's includes.
Add ${MINIZIP_INCLUDE_DIRS} to qtui's includes instead of every
target's. Make more includes SYSTEM PRIVATE.
2021-07-14 17:33:18 -07:00
David Perry 0c6d1216fe Rework how comments show in edit menu
Addresses [this issue][1] reported with the revised comment editing UI,
wherein comments with embedded newlines may not appear properly in the
menu.

[1]: https://gitlab.com/wireshark/wireshark/-/merge_requests/2859#note_621024711
2021-07-14 04:55:06 +00:00
Developer Alexander 69fb2a17e4 lua: dialog with prefilled values
new_dialog() lua api gets extended to enable that dialog fields can be
prefilled by lua scripts instead of always starting empty.
2021-07-13 06:52:55 +00:00
Gerald Combs 4e5c892402 [Automatic update for 2021-07-11]
Update manuf, services enterprise numbers, translations, and other items.
2021-07-12 22:06:44 +00:00
Guy Harris dd5907d2a3 Consistently refer to blocks that have been modified as "modified".
"User" sounds as if the blocks belong to the user; at most, the current
user might have modified them directly, but they might also have, for
example, run a Lua script that, unknown to them, modified comments.
Also, a file might have "user comments" added by a previous user, who
them wrote the file and and provided it to the current user.

"Modified" seems a bit clearer than "changed".
2021-07-08 00:05:35 -07:00
David Perry 73087d6fb4 Use wtap_blocks for packet comments
Mostly functioning proof of concept for #14329. This work is intended to
allow Wireshark to support multiple packet comments per packet.

Uses and expands upon the `wtap_block` API in `wiretap/wtap_opttypes.h`.
It attaches a `wtap_block` structure to `wtap_rec` in place of its
current `opt_comment` and `packet_verdict` members to hold OPT_COMMENT
and OPT_PKT_VERDICT option values.
2021-07-07 18:40:24 +00:00
Nardi Ivan c2d77d910d QUIC: improve "Follow QUIC Stream" support
This functionality has been added in d2a660d8, where its limitations
are described.
Improvements:
* the Substream index menu now properly filters for available stream numbers;
* Follow Stream selects the first stream in the current packet

Known issue (which is still there):  if a packet contains multiple QUIC
streams, then we will show data also from streams other than the selected
one (see #16093)

Note that there is no way to follow a QUIC connection.

Close #17453
2021-07-07 13:08:19 +00:00
Gerald Combs d170dff7eb [Automatic update for 2021-07-04]
Update manuf, services enterprise numbers, translations, and other items.
2021-07-04 15:55:26 +00:00
João Valverde 100876337a Move version_info.[ch] to ui/
Version info is an aspect of UI implementation so move it to
a more appropriate place, such as ui/. This also helps declutter
the top-level.

A static library is appropriate to encapsulate the dependencies
as private and it is better supported by CMake than object libraries.

Also version_info.h should not be installed as a public header.
2021-07-04 10:37:49 +00:00
Guy Harris ad3e6b1be6 wireless timeline: add a destructor to free the hash table.
Destroy the hash table if we're destroying the timeline widget, so that
it doesn't leak.
2021-06-28 14:18:41 -07:00
Nardi Ivan 32d97e2757 Qt: Follow: fix two memory leaks 2021-06-28 11:29:21 +00:00
Guy Harris 693a02e760 wireless_timeline: make sure the hash table is always allocated.
At least on my Mac, if I start up Wireshark, start a capture
(non-monitor-mode) on the Wi-Fi adapter, add a comment to the SHB and
the first packet while it's capturing, stop the capture, and try to save
it, it warns that the wireless timeline hash table pointer is null.

Allocate it in the constructor.
2021-06-28 09:36:54 +00:00
Gerald Combs 695b4c5bee [Automatic update for 2021-06-27]
Update manuf, services enterprise numbers, translations, and other items.
2021-06-27 17:12:48 +00:00
João Valverde c6a920686c wslog: Check environment initialization for errors
Initialiaze the cmdarg error stream earlier.

Dumpcap also needs to know earlier if it is running in capture
child mode.
2021-06-26 00:18:26 +01:00
João Valverde f34cc62a6c Set the proper log domain for Qt 2021-06-24 02:30:55 +01:00
Chuck Craft 701d0565c5 Qt: Undo MR 3422 (filter button separator hint)
See discussion attached to !3422
2021-06-23 05:12:08 +00:00
John Thacker c9f4bbc11c simple_dialog(Qt): Don't warn about zero duplicate messages
Only log a warning when at least one duplicate message was actually
suppressed. Prevents "0 duplicates of %s were suppressed" messages
to the console.
2021-06-23 04:03:01 +00:00
João Valverde 759bb234d0 wslog: Check if we are initialized and add missing inits
Instead of receiving the program name from GLib, pass it explicitly
to ws_log_init() instead  and use that to initialize the GLib program
name.

ws_log_parse_args() will now exit the program when it encounters an
argument error if exit_failure >= 0.
2021-06-21 16:03:29 +00:00
Chuck Craft a08a118d04 Qt: match Capture Options column header for snapshot length 2021-06-21 15:05:17 +00:00
Stig Bjørlykke 553e9e83d2 Lua: Add redissect_packets()
Add Lua function redissect_packets() to redissect packets in live
capture. The use case is to reload packets after a preference change.
2021-06-21 09:52:46 +02:00
Chuck Craft 79bdde7c82 Qt: Filter button label syntax for groups - add hint 2021-06-21 05:41:32 +00:00
João Valverde 8cf9791679 Replace some lingering references to g_log() 2021-06-19 02:34:36 +00:00
João Valverde 145ba2e071 Rename a variable that clashes with GLib 2021-06-19 02:34:36 +00:00
João Valverde 0e50979b3f Replace g_assert() with ws_assert() 2021-06-19 01:23:31 +00:00
João Valverde 051a74378d wslog: Use NULL for empty/default domain 2021-06-18 10:43:39 +01:00
João Valverde ff9acff6f2 Replace usage of GLogLevel flags everywhere
ws_log_domains.h needs to be included before wslog.h to be used
to define WS_LOG_DOMAIN. Also the definition for enum ws_log_level
needs to be exported for other APIs so move that to ws_log_domains.h
and rename the file to ws_log_defs.h to reflect the new scope.
2021-06-17 12:00:10 +01:00
João Valverde 05ed76d4c0 wslog: Use plain format with "message" level
Try out a simpler format with the default log level.

Don't display process and file/function information with "message"
level (experimental).
2021-06-17 12:00:09 +01:00
João Valverde e86ac706ca wslog: Parse cmd line options in one pass 2021-06-14 22:05:35 +00:00
João Valverde 5ddc007023 wslog: Include pid in format 2021-06-14 14:18:38 +01:00
João Valverde 5a662ba3fb wslog: Add support for domain filtering
A domain filter can be given in the environment variable
'WS_LOG_DOMAINS' or in a command-line options "--log-domains".

The filter is specified as a comma separated case insensitive list,
for example:

    ./tshark  --log-domains=main,capture

Domain data type switches from an enum to a string. There is no
constaint on adding new domains, neither in code or at runtime.
The string format is arbitrary, only positive matches will produce
output.
2021-06-14 13:13:12 +01:00
João Valverde dc7f0b88bb Refactor our logging and extend the wslog API
Experience has shown that:

  1. The current logging methods are not very reliable or practical.
A logging bitmask makes little sense as the user-facing interface (who
would want debug but not crtical messages for example?); it's
computer-friendly and user-unfriendly. More importantly the console
log level preference is initialized too late in the startup process
to be used for the logging subsystem and that fact raises a number
of annoying and hard-to-fix usability issues.

  2. Coding around G_MESSAGES_DEBUG to comply with our log level mask
and not clobber the user's settings or not create unexpected log misses
is unworkable and generally follows the principle of most surprise.
The fact that G_MESSAGES_DEBUG="all" can leak to other programs using
GLib is also annoying.

  3. The non-structured GLib logging API is very opinionated and lacks
configurability beyond replacing the log handler.

  4. Windows GUI has some special code to attach to a console,
but it would be nice to abstract away the rest under a single
interface.

  5. Using this logger seems to be noticeably faster.

Deprecate the console log level preference and extend our API to
implement a log handler in wsutil/wslog.h to provide easy-to-use,
flexible and dependable logging during all execution phases.

Log levels have a hierarchy, from most verbose to least verbose
(debug to error). When a given level is set everything above that
is also enabled.

The log level can be set with an environment variable or a command
line option (parsed as soon as possible but still later than the
environment). The default log level is "message".

Dissector logging is not included because it is not clear what log
domain they should use. An explosion to thousands of domains is
not desirable and putting everything in a single domain is probably
too coarse and noisy. For now I think it makes sense to let them do
their own thing using g_log_default_handler() and continue using the
G_MESSAGES_DEBUG mechanism with specific domains for each individual
dissector.

In the future a mechanism may be added to selectively enable these
domains at runtime while trying to avoid the problems introduced
by G_MESSAGES_DEBUG.
2021-06-11 09:40:28 +00:00
Chuck Craft 55511e61bb Qt: Protocol Hierarchy - protocol abbrev tooltip
Closes #16781
2021-06-09 04:52:29 +00:00
Chuck Craft bfd5e3f9aa Qt: Protocol Hierarchy - protocol abbrev tooltip
Partial solution for #16781
2021-06-09 04:52:29 +00:00
Stig Bjørlykke 44a615e854 Qt: Give a directory to wsApp->setLastOpenDir()
Use wsApp->setLastOpenDirFromFilename() to convert a filename
to a directory name before calling wsApp->setLastOpenDir().

This will ensure to always store a directory instead of a filename
in the recent gui.fileopen_remembered_dir.
2021-06-07 13:52:59 +00:00
Chuck Craft 8c79fa5e1b Qt: add display filter - invalid new filter syntax 2021-06-07 13:36:20 +00:00