Commit Graph

7682 Commits

Author SHA1 Message Date
Roland Knall 2cebafc613 Qt: Filter TrafficListTypes
Add a textbox to allow for filtering the traffic types
in the conversation and endpoint dialog. The current implementation
allows for an easier growth of the list entries. To ensure that
the user can find the entry he/she/they is looking for fast, add
a textbox for filtering
2022-07-01 11:30:57 +02:00
Roland Knall 54aed0aa10 Qt: Cleanup TrafficTypesList
Consolidate two methods which practically do the same thing, as well
as remove some residues from earlier implementations
2022-07-01 08:02:47 +00:00
John Thacker a40e5f715a Qt: Check custom column syntax in Preferences properly
Not all display filters are valid for custom columns (see #15990).
Use the validation function for custom columns instead of the
display filter validation when adding or editing a custom column
through Edit->Preferences, as the Edit Column in the packet list
header already does.

Revisit this if we ever do expand the list of possible custom
columns.
2022-06-30 20:31:19 -04:00
Roland Knall 4149d52f4e Qt: column edit default checkbox 2022-06-30 21:15:21 +02:00
John Thacker 09800da792 Qt: Add resolved button to Edit Columns
Add the ability to set custom columns as resolved/unresolved via
the Edit Column frame, if the column fields support it.

Related to #15394.
2022-06-30 08:28:54 -04:00
Roland Knall ac4b9e174d Qt: Cleanup PacketListHeader
Remove unnecessary for-loop and subroutine
2022-06-29 15:46:19 +02:00
Roland Knall 413b383224 Qt: Reduce PacketListHeader complexity
Propagating the capture_file was required for a single
function as was the cast for the model. Both are not
needed, as the functionality can be either moved to
PacketListModel or was already included in PacketList
2022-06-29 14:47:05 +02:00
Roland Knall 5fb2324692 Qt: Improve sort for packet list 2022-06-29 12:42:22 +02:00
Roland Knall 505226d1e2 Ui: Centralize PacketList helper prototypes
To implement loading a packet list, a lot of helper
methods are required. Those prototypes where split up
over two places and have been moved to packet_list_utils.h
to ensure a single place for lookup
2022-06-29 09:31:09 +00:00
Roland Knall 94c439f603 Ui: Use only one method for exit
Replace the redundant main_window_quit with the
more specialized exit_application and return 0
as a state
2022-06-29 09:00:33 +00:00
Alexis La Goutte a2272362ce conversation_dialog.h: Fix -Wdocumentation
conversation_dialog.h:24:15: warning: parameter 'cli_proto_id' not found in the function declaration [-Wdocumentation]
conversation_dialog.h:25:15: warning: parameter 'filter' not found in the function declaration [-Wdocumentation]
2022-06-28 21:37:32 +00:00
Roland Knall 1d6b547029 Qt: Fix FileClose not available and segfault
Fixes #18160
2022-06-28 20:24:27 +00:00
Roland Knall c3b2cec3f2 Ui: Cleanup row number and select packet
Remove unneeded row number in capture file. The packet list is
the only object that should know the correct number, propagating
it further only complicates things. At the same time, rework
cf_select_packet to select the packet based on frame_data not on
the row (which can be unreliable).
2022-06-28 14:56:06 +02:00
Roland Knall f210edeaf0 Ui: Further simplify ws_ui_util
Remove duplicate functionality for jumping to packet and
remove unused function to move to the end. Furthermore
move the code for redraws of visible packets directly
into the calling code
2022-06-28 14:39:27 +02:00
Roland Knall ef8ed9dff9 Ui: Remove time column reformat callback
The code can be placed directly to packet list model
and does not need to be a generic callback
2022-06-28 14:23:05 +02:00
Roland Knall 1d42fcdd76 Ui: Remove call to recoloring
No callback needed, we can call the model directly
2022-06-28 14:06:49 +02:00
Roland Knall 865141e61b Ui: Remove unused prototype declaration
The functions are nowhere implemented
2022-06-28 11:34:22 +02:00
Roland Knall b6226cb136 Qt: Better handle sort restriction
Setting sorting enabled/disabled resorts the list. If this happens
too often, sometimes it can lead to the physical view models
not present anymore and therefore crashing.

Ping #18159
2022-06-28 10:12:24 +02:00
John Thacker 4ed4678859 Qt: Make the Resolve Names buttons checkable again
The checkable property got lost at some point, rendering it impossible
to make columns resolved.
2022-06-27 20:26:08 -04:00
Roland Knall 7f951eda3e Qt: Increase animation speed for progress frame
The progress frame animation is so slow, that it might not show
up on certain setups. Reduce the initial speed and duration for
the animation, which also speeds up calculations as well as dissection
as less animation has to be rendered/calculated
2022-06-27 14:03:34 +00:00
Gerald Combs b5e1e63dd0 [Automatic update for 2022-06-26]
Update manuf, services enterprise numbers, translations, and other items.
2022-06-26 17:40:36 +00:00
Roland Knall 006d20db9e Qt: Only sort if there are actually lines to sort
Remove the sort for physical rows, if there are no rows to sort

Ping #18159
2022-06-26 15:59:41 +00:00
João Valverde 0dbd0a6903 Qt: Fix endianness for an IPv4 value
ws_in4_addr is in network byte order (big endian) so convert from
BE to host byte order, not the other way around.
2022-06-24 20:26:38 +00:00
Roland Knall 2e5b09f486 Qt: Fix compiler warning on macOS 2022-06-22 17:52:15 +02:00
Roland Knall 1424e28c7d Qt: Fix stream id display in context menu
It was displayed for every protocol, but should only be displayed
for TCP and UDP alone
2022-06-22 15:48:51 +02:00
Gerald Combs 9c19f47394 Qt: Fix a couple of slot names.
QComboBox emits currentTextChanged with a QString argument, not
currentIndexChanged.

Switch to new-style connections where we can.
2022-06-21 12:20:02 -07:00
j.novak@netsystem.cz b6ccc65a92 RTP Analysis dialog: Fix of clock drift freq drift calculation 2022-06-21 19:08:28 +00:00
Gerald Combs 24cab126fd Qt: Fix our filter edit line lengths.
Make sure our bookmark border lines extend to the full height of the
text entry box.
2022-06-21 10:55:16 -07:00
Gerald Combs 3d52693eaa Qt+docs: Capitalize JSON.
JSON is an abbreviation and should be displayed in all caps.
https://www.json.org/json-en.html
2022-06-21 17:24:27 +00:00
Gerald Combs 1eafee6566 Qt: Work around a background fill issue with Qt 6.
It looks like QLineEdit no longer paints its background when it's a
QComboBox editor under Qt 6. Add a workaround for this to SyntaxLineEdit.
2022-06-21 09:39:46 -07:00
Roland Knall 847795d381 Qt: Add stream number to conversations
Adding the stream id to UDP/TCP conversations and allowing
filtering on those values as well.

Fixes: #14184
2022-06-21 10:01:18 +02:00
João Valverde 0615ba6317 ftypes: Make accessor functions type safe 2022-06-20 17:29:57 +00:00
Roland Knall e046877ad1 Qt: Fix column hiding for traffic model
Instead of letting the model do the filtering and having
a bunch of exceptions in cases where columns are hidden
in between other columns, the model will present all columns
all the time, and it is the job of a top-level proxy to
filter out columns not required for current display
2022-06-20 10:21:37 +02:00
Gerald Combs 058fe0dd09 [Automatic update for 2022-06-19]
Update manuf, services enterprise numbers, translations, and other items.
2022-06-19 16:40:16 +00:00
Roland Knall 2b4878d452 Qt: Hide columns for traffic tree
Allow columns to be hidden for the traffic tree dialogs
Conversations and Endpoints and store the information profile
specific
2022-06-19 16:39:35 +02:00
Roland Knall f75f577579 Qt: Fix TrafficTree typo
And also fix some prototypes
2022-06-19 11:21:53 +02:00
Gerald Combs 79310ebbd2 Qt: Remove our idle dissection wait period.
Set our idle dissection single-shot timer to 0, i.e. whenever the Qt
event loop can fit us in. This fixes a performance issue here with
libsinsp and doesn't appear to cause any issues otherwise.
2022-06-17 10:18:19 -07:00
Gerald Combs 5db7ddb209 ui: Add Logwolf software updates.
Set Logwolf information in the Appcast URL template as needed.
2022-06-17 16:31:44 +00:00
Roland Knall b3fd206822 Qt: Sort tap list initially
By sorting the list of taps, the initial sorting is kept also
for the tab order
2022-06-17 13:06:21 +00:00
Roland Knall 83e420913d Qt: Implement sort model for traffic type list 2022-06-17 13:22:22 +02:00
Roland Knall 300befc12a epan: Numeric address type
Add a numeric address type analog to StringZ for
protocols who only use numeric values as addresses
with no further handling.

e.g. IAT protocols which only enumerate the devices
2022-06-17 08:56:05 +00:00
Roland Knall bd6808c4a0 Qt: Fix missing includes
On some compiler variations an error can occur due to missing
glib.h include
2022-06-16 08:12:29 +02:00
John Thacker 2efe338b2e Qt: Use a combobox for Decode As selectors if there are packet values
Don't require there to be at least two values in a packet for
a dissector table in order to have a combobox instead of a single
text box.

While perhaps having an editable combobox with only one drop down
option looks a bit funny, that is outweighed by the UI advantages
of being able to easily select the values that occur in the packet.

This makes it possible to change the dissector for the currently
selected packet's IP protocol or Ethertype when those are not the
last protocol layer without having to type it in manually, for
example.
2022-06-16 03:15:08 +00:00
João Valverde c5b47cb839 Qt: Remove some bogus entries from Authors list
Some lines in Acknowledgements are mistakenly matching the regular
expression to capture authors and email addresses, resulting in
bogus authors entries.

Stop matching authors after we reach the Acknowledgements section.
This matches the structure of the AUTHORS-SHORT file and fixes the
bogus entries.
2022-06-15 06:46:50 +01:00
Roland Knall 1272b62106 Docs: Update documentation for redesigned Traffic Tabs
Update the documentation to document the change of features
that happen during the redesign of the UI as well as fix some
wordings in the data model.
2022-06-14 21:33:26 +00:00
Roland Knall 4f283e9ef8 Qt: Fix Qt6 compile warnings for traffic tabs
Some conversions are warning, that qsizetype is implicitly
converted, this fixes that
2022-06-14 22:10:31 +02:00
Roland Knall a4f25e5115 Qt: Redesign TrafficTree Dialogs UI
The new UI should better group functionality and as well as better
showing which taps are available and can be used.
2022-06-14 09:36:30 +00:00
Roland Knall 1dc37de740 Qt: Fix sorting for ports
Ports where sorted as string and not numerical
2022-06-13 17:33:38 +02:00
Roland Knall be112bd44e Qt: Fix maxmind open map
Fix an issue, where the map button is not correctly activated
and therefore the map cannot be shown or opened
2022-06-13 14:39:14 +00:00
Roland Knall 0cfe7a0d56 Qt: Better sorting for traffic dialogs
Allow the traffic columns to automatically sort on secondary columns if
applicable. e.g. the address and port column for TCP and UDP, or the
secondary address for conversations
2022-06-13 13:50:50 +02:00
Gerald Combs b3a102eb46 [Automatic update for 2022-06-12]
Update manuf, services enterprise numbers, translations, and other items.
2022-06-12 17:03:28 +00:00
Roland Knall 212abb7efe Qt: Autoset limit to display filter for expert dialog
Autoset the "Limit to display filter" if a display filter
was present, when the dialog was opened
2022-06-12 15:30:12 +00:00
Roland Knall a807047b95 Qt: Adapt sorting for traffic tables
Improve sorting for the traffic tables
2022-06-12 14:53:23 +02:00
Roland Knall 51d5cb42b2 Qt: Implement total columns for traffic tables
Implement a column type, which will show total values
for traffic columns.

Implements #15071
2022-06-10 12:38:56 +02:00
Roland Knall 2cf938cfa8 tap: Adding flags for tap_packet
This allows flags to be passed by the registering listener
to the collection of information
2022-06-10 05:46:15 +00:00
Roland Knall c03bf18db1 Qt: Remove double registered signals 2022-06-08 17:48:41 +02:00
Roland Knall 3029a4a4d9 Qt: Remove unnecessary cli option
There was an option that was never used, in that you
could set your protocol tap as a first tab in the
Conversations and Endpoint dialogs.
2022-06-08 17:42:58 +02:00
Roland Knall 176ba718f0 Qt: Fix displayfilter always on
The "Limit to display filter" was always set to true, even if
no filter had been set.
2022-06-08 10:50:12 +02:00
Roland Knall 4b9d152767 Qt: Auto apply "Limit to display filter"
If a display filter had been applied during the opening
of the conversation or endpoint dialog, automatically check
the entry for "Limit to display filter" to ensure that
the filtered result is being shown, as expected by the user.
2022-06-07 14:38:58 +02:00
Jakub Jirutka 3187fbbd61 Qt: Fix segfault when some ICU codec is not available
$ gdb --args wireshark
    (gdb) run
    Starting program: /usr/bin/wireshark
    [New LWP 10363]
    [New LWP 10364]
     ** (wireshark:10356) 13:13:14.137941 [GUI WARNING] -- codecForName: ucnv_open failed ISO-8859-2 U_FILE_ACCESS_ERROR
    (gdb) bt
    Thread 1 "wireshark" received signal SIGSEGV, Segmentation fault.
    0x00005555557b1959 in MainWindow::findTextCodecs (this=0x7fffecdfd390) at wireshark-3.6.5/ui/qt/main_window.cpp:2029
    2029            QString key = codec->name().toUpper();
    (gdb) bt
    #0  0x00005555557b1959 in MainWindow::findTextCodecs (this=0x7fffecdfd390) at wireshark-3.6.5/ui/qt/main_window.cpp:2029
    #1  0x00005555557b4ce3 in MainWindow::MainWindow (this=this@entry=0x7fffecdfd390, parent=parent@entry=0x0) at wireshark-3.6.5/ui/qt/main_window.cpp:362
    #2  0x000055555564f0af in main (argc=<optimized out>, qt_argv=0x7fffffffe748) at wireshark-3.6.5/ui/qt/main.cpp:725

See https://gitlab.alpinelinux.org/alpine/aports/-/issues/13814 for more
information.

Conflicts (cherry-picked from 635286ce):
	ui/qt/main_window.cpp
2022-06-05 17:01:04 -07:00
Jaap Keuter fe4210029a Qt: Reword menu item Seconds Since Beginning of Capture 2022-06-05 23:55:59 +00:00
John Thacker 9d716d793c Follow Stream: Allow using spin boxes with no packets visible
It's only necessary to check that cap_file_.capFile()->edt is
not NULL if use_stream_index is FALSE.

This prevents failure and an inaccurate error message about the
capture file being invalid when using the spinbox to cycle through
a stream when all packets are filtered out.(E.g., Follow a stream,
append to the filter looking for something, no packets match, try to
go to the next stream.)
2022-06-05 22:19:39 +00:00
João Valverde 2939c6d0dc Version info: Do not show plugin count
Plugin count is dependant on initialization order and showing
zero plugins loaded can be misleading.
2022-06-05 21:31:36 +00:00
Gerald Combs 5cd591129f epan: Convert remaining conversation code to elements.
Convert the address+port conversation code to element lists. Make our
conversation keys element lists. Document more of the conversation API.

Update the Conversation Hash Table dialog to use the new API.

Describe an alternative key type and data structure at the top of
conversation.c.
2022-06-05 19:05:33 +00:00
Gerald Combs 729b4d3b69 [Automatic update for 2022-06-05]
Update manuf, services enterprise numbers, translations, and other items.
2022-06-05 16:40:02 +00:00
Roland Knall b06c1c451c Qt: Make TrafficTable detachable
Allow the endpoint and conversation dialogs to have detachable
tabs. At the same time move the tree functionality to a subclass
to better be able to handle the context menu when detached.

Right now, still a lot of tree stuff is in the tabwidget, but
could be moved to the tree for the future
2022-06-04 21:28:05 +02:00
Roland Knall 9edf06383a Qt: Move most Contextmenu stuff to TrafficTree
Create a new class, which handles the context menu stuff for
the traffic data, as well as remove unnecessary signals used
by the sub-dialogs.
2022-06-04 15:57:02 +02:00
Roland Knall 05759d3ec5 Qt: Better handle retapping for traffic tables
Retapping can have some side-effects and was done in
an overflowing way. Reducing the number of times retapping
is required and done, and also giving control for taps
reload to TrafficTab
2022-06-03 10:25:15 +02:00
Roland Knall fc505eed29 Qt: Fix coverity warnings for TrafficView 2022-06-02 16:50:31 +00:00
John Thacker ea2ddd40f5 Qt: Fix leak in CaptureFileDialog
Instead of instantiating CaptureFileDialog with a reference to
the filter (which means allocating a new empty QString when using
it for Save As and Export Packets, which don't use a filter), pass
the filter reference into the open and merge functions.

This plugs a memory leak that happened each time the Save As or
Export Packets dialog was created.
2022-06-02 12:31:01 +00:00
Roland Knall f725bbef5e Qt: Minor changes to TrafficTrees
Move the corner button to a QToolButton and put it in a widget
to better handle size constraints. Also fix some fallthroughs
and remove unneeded code
2022-06-02 12:30:41 +02:00
Stig Bjørlykke 335795ab16 Qt: Fix build withouth MaxMindDB 2022-06-02 08:56:22 +02:00
Roland Knall dd9e4fd3fa Qt: Fix warning for TrafficData 2022-06-01 20:21:53 +02:00
Roland Knall 7306d7681a Qt: Save Trafficdata as raw
Allow the option to save the data from the traffic dialogs
as raw data and enable it as the default option for 4.0. The
option to display the data with pretty formatting is still
available.
2022-06-01 11:51:39 +02:00
Roland Knall cb56345175 Qt: Move Traffic Tables to Model/View
The current model makes it very hard to extend the traffic tables
with new functionality. For instance, having a total view column
additionally to the normal columns when filtered.

This change removes the QTreeWidget and moves to a more generic
approach using QAbstractListModel elements.

It is implemented in thtree parts:
- ATapDataModel implements the basic collection and handling of
  the tap data information, as well as updating if new data is
  becoming available
- EndpointDataModel / ConversationDataModel handles the display
  and representation of the data
- Implementing TrafficTab as a TabWidget which will handle the
  adding/removing of new protocol tabs
2022-06-01 11:26:22 +02:00
Gerald Combs 48ff21b573 [Automatic update for 2022-05-29]
Update manuf, services enterprise numbers, translations, and other items.
2022-05-29 17:20:25 +00:00
João Valverde ee7094d34c CMake: Fix typo 2022-05-25 23:46:01 +01:00
Gerald Combs 34d74031a9 epan+Qt: Add element tables to the ConversationHashTablesDialog.
Add get_conversation_hashtables() and use it to populate the
conversation hash tables dialog.
2022-05-25 19:09:12 +00:00
John Thacker 485aedf4e1 tap-iostat: Make a bunch of ints unsigned
Almost all the ints in tap-iostat are loop counters, numbers of columns
or rows, durations, lengths, widths, or magnitudes, all things that are
inherently unsigned. Make them unsigned.

This has the incidental effect of fixing an odd alloc-size-larger-than
error with gcc 12.1, which is afraid that if borderlen is signed that
g_malloc will somehow be called with value -1 (18446744071562067969):

Fix #18089
2022-05-24 20:27:04 -04:00
John Thacker 75f31638f2 Apply 1 suggestion(s) to 1 file(s) 2022-05-23 16:27:18 +00:00
Gerald Combs 349787051e CMake+Qt: Fix our Resource Compiler arguments.
We pass "--format-version 1" to rcc. If it's compiled with Zstandard we
need to pass "-compress-algo zlib" as well.
Fixes #18100.
2022-05-23 16:27:18 +00:00
John Thacker e1a6913a2b qt: Ignore gcc 12.1 optimization bug with Qt
The Qt implicit casts from QByteArray to QString all use
size = -1, meaning to the end of the string.

This causes gcc 12.1 with -O2 to produce a very dubious stringop-overread
warning, by computing both sides of a branch even when it shouldn't:

/usr/include/qt5/QtCore/qstring.h:706:69: error: ‘size_t strlen(const char*)’ reading 1 or more bytes from a region of size 0 [-Werror=stringop-overread]
  706 |         return fromUtf8_helper(str, (str && size == -1) ? int(strlen(str)) : size);
      |                                                               ~~~~~~^~~~~

There's also a similar error with QByteArray.constData(), even though
isEmpty() should return True when the QByteArray is NULL.
(Adding isNull() prevents the warning but is redundant.)

Use DIAG_OFF and DIAG_ON to ignore the warning on GCC 12.1 and higher.
Fix #18090.
2022-05-23 12:14:03 +00:00
Gerald Combs c8fc8de3d4 [Automatic update for 2022-05-22]
Update manuf, services enterprise numbers, translations, and other items.

services failed.
2022-05-22 16:37:34 +00:00
Roland Knall 5a53e72c63 Qt: Row colors and resize
Set the row colors in the traffic dialogs to alternating for better
readibility and add a context menu option to resize the columns back
to content

Fixes #16189
2022-05-19 15:58:20 +02:00
Roland Knall 6913bff6cd Qt: Simplify traffic type selection
Remove unnecessary subclass and make the code easier to
manage in the future
2022-05-19 15:01:00 +02:00
Roland Knall 1cde1cc1f5 Qt: Move type selection to tab
Move the type selection to the tab selection bar, so that new
users may find it faster and easier
2022-05-19 09:31:17 +02:00
Roland Knall 3d4dfb829b Qt: Allow translation for traffic tables
Allow the headers of the conversations and endpoint statistic
dialog to be used with the Qt translation system
2022-05-18 22:46:53 +02:00
Roland Knall f5b5d2c3c9 Qt: Cleanup Traffic Table
Remote traffic_table_ui.? and move the JSON stuff into endpoint.

This is in preparation for larger work on both the conversation
table as well as the endpoint table, and to start using Qt code
in the UI where it should be used.
2022-05-18 19:50:14 +00:00
Roland Knall b4e041a619 Qt: Fix packet diagram cleanup
After selecting field values to be shown or not shown
residues of the former diagram may reside until the next
scroll event. This updates the viewport to trigger the
paintEvent earlier.

Fixes #17997
2022-05-17 11:37:33 +02:00
Roland Knall 9ba4847a13 Qt: Fix some pathSelection warnings 2022-05-16 19:53:27 +02:00
Roland Knall eca007e617 Qt: Speedup for Resolved Addresses Dlg
This is a small speedup for the ResolvedAddressesDialog. QString::arg
is a copy-by-call method as QString::append just extends the space
occupied by the string, leading to a major speed improvement.

Same goes for configuring the proxymodels first and then assigning the
data model as this will lead not to reorganization everytime
invalideFilter is being called
2022-05-16 15:07:47 +00:00
Roland Knall 28b917a72e extcap: Close pipe on windows properly
Windows implements so called CRT handlers, which will catch any
assertions happening inside so called crt routines and either
displays a debug dialog (Cancel, Retry, Ignore) or outright crashes
the application.

See
https://docs.microsoft.com/en-us/cpp/c-runtime-library/parameter-validation?view=msvc-170
for an explanation of the behaviour.

Now, in the current situation here, close will detect (correctly)
that the pipe it is supposed to be closing is already closed. This
happens (again correctly) because it had been closed by the extcap
application.

The change added, checks for a closed pipe first, and if so just
returns -1 (as it should) silently without calling the CRT routine,
therefore not crashing
2022-05-16 14:48:37 +02:00
Roland Knall acdda8eb6b Qt: Fix File Path editor in table
The current situation in UatDelegate as well as PathChooserDelegate leads to issues, where Wireshark crashes if the button is clicked. This is due to the UI not correctly positioning the button inside the cell.

This change implements a widget, which will serve as cell content, handling all relations with choosing the file, but also properly handling the size and geometry of said cell content, therefore no longer leading to crashes and cleaning up code at the same time, as duplicate methods are being removed.

Fixes #17789, #17819, #18088
2022-05-16 09:54:08 +00:00
Gerald Combs 76423db8e0 Qt: Fix clazy-incorrect-emit warnings.
QAbstractItemModel::beginResetModel and endResetModel aren't signals, so
don't emit them. dataChanged is, so do.

Fixes clazy-incorrect-emit:
https://github.com/KDE/clazy/blob/master/docs/checks/README-incorrect-emit.md
2022-05-12 17:29:06 +00:00
Gerald Combs 7b749f5e15 Qt: Fix a version check.
Qt::endl was introduced in 5.14.
2022-05-11 09:21:41 -07:00
Roland Knall ad28888d2f Qt: Fix display filter read/write
Display filters on Windows where broken in such a way that the file was generated with empty lines and the wrong file delimiters.

Likewise, loading the file lead to issues when the formatting was not 100% match by the plattform being used

Fixes #18082
2022-05-11 12:22:29 +00:00
Roland Knall 4977e20ab2 Qt: Prevent remote interfaces to show up
Remote interfaces should not be displayed with local interfaces
as well as in the list of pipe interfaces
2022-05-10 20:00:02 +02:00
Roland Knall ae9e80a34d Qt: Fix proper preselection for remote interfaces 2022-05-10 14:52:27 +00:00
Roland Knall 5b59a38c3b Qt: Clean up remote management interface
Clean up a previous fix, which left the remtoe management interface
unloadable.

Fixes #18060
2022-05-10 16:26:37 +02:00
Roland Knall e43501cf9e qcustomsplot: revert for fix Clang Warnings[core.UndefinedBinaryOperatorResult]
The commit prevents compilation for Qt 6.3.0

This reverts commit 3afa8264cb.
2022-05-03 15:46:03 +02:00
Gerald Combs 2f31c09045 [Automatic update for 2022-05-01]
Update manuf, services enterprise numbers, translations, and other items.
2022-05-01 17:26:48 +00:00
Guy Harris 69e956d792 conversations, endpoints: sort resolved addresses as text.
If name resolution is enabled in the conversations and endpoints
dialogs, sort address columns by the resolved names, not by the
addresses; sorting them by address will give *very* unexpected results,
and not make it easier to look for addresses by name.
2022-04-30 19:37:50 -07:00
Gerald Combs 70bd130379 Fix "generated by" comments in configuration files.
Add get_configuration_namespace() and use it in code that writes
"generated by" comments at the top of various configuration files.

Update our Logwolf colorfilters.
2022-04-29 18:00:21 +00:00
Gerald Combs cfcfbbdd60 [Automatic update for 2022-04-24]
Update manuf, services enterprise numbers, translations, and other items.
2022-04-24 16:39:41 +00:00
Roland Knall aca0c5d175 Qt: Remove unrequired setTab
setTab(0) should not be required, as this belongs in the constructor as being
part of the general setup of the dialog itself. Outside code should not setup
the correct startview of the dialog.

(the problem exists in the first place, as the wrong tab may be selected via
the .ui file after editing that)
2022-04-22 17:05:29 +00:00
Roland Knall b9b1494cd1 Qt: Disable sorting for if acticity on default
Make the sorting for interface activity disabled by default
and enable it for interfaceFrame.
2022-04-22 14:29:17 +02:00
Roland Knall 374c5997da Qt: Remove unnecessary signal/slot
getPoints never worked in the new system therefore it is removed. SparkLineDelegate uses the underlying model to ensure the correct data being transmitted
2022-04-22 09:37:10 +00:00
Gerald Combs 4bb16383a3 macOS: Require Sparkle 2.
Remove our Sparkle 1 code. Fixes #18035.
2022-04-21 17:54:27 +00:00
Roland Knall 1278af07c3 Qt: Improve UIX for sparklines
Sparklines should display to the user, which interfaces are active
and ready for capture. Additionally it should be easy to find active
interfaces, without filtering first.

This change reorders the interface list, in order to sort active
interfaces on top, as well as hide information if no packet has been
received on that interface, to ensure that the user can find active
interfaces faster, making it easier to capture on systems where
the interfaces have very generic names.

The interface context menu has been amended to allow interfaces to be
hidden/unhidden from the main interface list as well
2022-04-21 15:41:12 +00:00
John Thacker d6fb90ecab proto_hier_stats: Skip non-protocols and reduce recursive calls
Skip non protocols in process_tree before calling process_node(), and
in process_node() before calling itself recursively, instead of at
the beginning of process_node(), decreaing the number of recursive
calls.

This reduces possible stack overflows in cases arising from dissectors
that call proto_item_get_parent(), which can result in many top level
non protocol items due to items not properly being faked. (#8069)

Use proto_register_is_protocol for the test instead of testing for
a name, which has not been a useful test for some time.

Add some comments about possibly wanting to skip PINOs that have
field_type FT_BYTES if they end up being toplevel items, and about
possibly wanting to descend into the tree to pick up protocols not
at the top level.
2022-04-21 08:56:12 -04:00
John Thacker 13075b4ff0 Require Qt 5.9 or later
Increase the minimum required version of Qt from 5.6 to the next
LTS version, 5.9. The various Linux distributions that have not
released an update to 5.9 or later (SLES 12, Debian stretch) are
nearing end of support, and can be supported by the Wireshark 3.6 LTS
release.

Qt 5.9 requires macOS 10.0, so make that the minimum macOS version
as well.

Remove unneeded version checks (except from QCustomPlot).
2022-04-20 18:59:32 -04:00
Gerald Combs 87b0288b8d epan: Add the ability to add conversation filter protocols.
Convert our conversation protocols to a dynamic list and add
add_conversation_filter_protocol(). Use it in the Falco Bridge plugin to
add protocols with conversation filters.
2022-04-19 22:25:32 +00:00
Roland Knall 27f6fd6f9a iface_lists: fix resource leak
Fixes CID 1504178 resource leak for ip_str
2022-04-19 15:37:21 +00:00
John Thacker ea62d7d6fa hierarchy stats: Don't add text only fields to the hierarchy
Use proto_registrar_is_protocol instead of directly comparing
hfinfo->parent to -1 when determining if the field info is related
to a protocol or not.

This avoids adding the special case text only field, which does not
have a parent protocol id, to the protocol hierarchy. These fields are
merely strings on the GUI tree, not actual protocols.
2022-04-19 11:03:37 +00:00
Roland Knall 2d48d49524 Allow to filter interface types
Allow to only use interface types, that are allowed by the implementing applications.
2022-04-19 09:19:50 +00:00
Gerald Combs fea6591b0c macOS: Add support for Sparkle 2.
Sparkle 2 deprecated the sharedUpdater singleton, so create our own
which uses Sparkle 2's updated API. Ping #18035.

Update our CMake version check.
2022-04-18 18:57:43 +00:00
Gerald Combs bce8825df8 [Automatic update for 2022-04-17]
Update manuf, services enterprise numbers, translations, and other items.
2022-04-17 16:37:54 +00:00
John Thacker a372497a85 hierarchy stats: Include appendix length in byte counts
The byte counts in Protocol Hierarchy Stats should include
the appendix length. Fix #17913.
2022-04-14 12:26:04 +00:00
Gerald Combs bcc286f341 UI: Rename the qt_logwolf directory to logwolf.
We might want to split the Wireshark-specific UI code into ui/wireshark,
but that can be done at another time.
2022-04-12 19:37:30 +00:00
Gerald Combs ca04f4c8cb Qt: Update our dynamic menu groups.
Add log-specific statistics groups, and use them to limit the dynamic
menu items in Wireshark and Logwolf.
2022-04-12 12:14:03 -07:00
John Thacker 7a3c2252f5 hierarchy stats: Only increment the total packet count once per frame
The same hierarchy of protocols can appear multiple times in a frame,
for example if there are multiple PDUs for a protocol that begin in
that frame. Keep track of the last frame where we incremented our
stat node and use that to only increment it once per frame.

Add a "total number of PDUs with this hierarchy" statistic and
display it as a new final column in the GUI. Update the User Guide.

In the purpose of doing this, get rid of temporary variables and
increment the ph_stats_t members directly, since we pass that
into our functions already, and thus have access to the current
packet count.

Fix #17553. Fix #18034. Fix #12565.
2022-04-12 13:38:33 +00:00
Gerald Combs fb3bdffaba Logwolf: Remove a bunch of packet-specific menu items.
Remove the following statistics and utility menu items and dialogs:

- 29West / lbmr
- ANCP
- BACnet / BACapp
- Credentials
- DCCP
- DNS
- Firewall rules
- HART-IP
- HPFEEDS
- HTTP
- HTTP2
- QUIC
- RSerPool
- SOME/IP
- Sametime
- Service response time
- TCP
- UDP
- UDP Multicast
2022-04-11 19:10:01 +00:00
Gerald Combs 4b556d6bc6 Qt+epan: Get log conversation filters working.
In conversation_filter.h, add a separate log_conv_filter_list. Use it in
register_log_conversation_filter and add conversation_filter_from_log.
It looks like we no longer use find_conversation_filter externally, so
remove it from the API.
2022-04-11 17:26:50 +00:00
Gerald Combs 58e31a2e77 Qt: Try to fix missing translations.
After splitting MainWindow into WiresharkMainWindow and
LogwolfMainWindow, a bunch of translations were marked "vanished". Do
the following in an attempt to restore them:

$ grep -c vanished ui/qt/*.ts
ui/qt/wireshark_de.ts:534
ui/qt/wireshark_en.ts:7
ui/qt/wireshark_es.ts:407
ui/qt/wireshark_fr.ts:367
ui/qt/wireshark_it.ts:534
ui/qt/wireshark_ja_JP.ts:534
ui/qt/wireshark_pl.ts:414
ui/qt/wireshark_ru.ts:513
ui/qt/wireshark_sv.ts:526
ui/qt/wireshark_tr_TR.ts:534
ui/qt/wireshark_uk.ts:264
ui/qt/wireshark_zh_CN.ts:455

$ git checkout 1c9538624f^ -- ui/qt/*.ts

$ sed -i -e 's,<name>MainWindow</name>,<name>WiresharkMainWindow</name>,g' ui/qt/*.ts

[ comment out `tx pull -f` in tools/update-tx ]

$ ./tools/update-tx -n

$ grep -c vanished ui/qt/*.ts
ui/qt/wireshark_de.ts:7
ui/qt/wireshark_en.ts:7
ui/qt/wireshark_es.ts:0
ui/qt/wireshark_fr.ts:5
ui/qt/wireshark_it.ts:7
ui/qt/wireshark_ja_JP.ts:7
ui/qt/wireshark_pl.ts:6
ui/qt/wireshark_ru.ts:7
ui/qt/wireshark_sv.ts:7
ui/qt/wireshark_tr_TR.ts:7
ui/qt/wireshark_uk.ts:2
ui/qt/wireshark_zh_CN.ts:6

$ ./tools update-tx

[ uncomment `tx pull -f` in tools/update-tx ]
2022-04-11 17:01:17 +00:00
Gerald Combs 1c9538624f [Automatic update for 2022-04-10]
Update manuf, services enterprise numbers, translations, and other items.
2022-04-10 19:23:47 +00:00
Gerald Combs 73770c61b4 Qt: Add a null pointer check.
Don't assume the main window has an SCTP menu.
2022-04-08 19:57:13 +00:00
Chuck Craft 6e9b19dcb0 Qt: only Show/Export Packet Bytes when field is selected and has_packet_bytes
This will also exclude generated [] and Lua added fields.
2022-04-08 18:47:42 +00:00
Gerald Combs c5da4f661a Logwolf: Fix building on Windows.
Add a couple of missing resource files. Fix a couple of paths.
2022-04-07 23:28:54 +00:00
Jirka Novak 411b3c1d78 Fix: Fixed issue with deadlock when same RTP dialog opened twice
RTP dialogs can stay opened, therefore calls of its functions are
protected by locks. There was issue that same mutex was used during
construction of the dialog and calling functions. It created possible
deadlock.
Change separates lock used for dialog creation and lock for function calls.
When function call lock is locked, new calls are ignored and warning is
printed to STDERR. Showing a dialog with warning looks too intrusive to me.

Fixes #18025
2022-04-06 07:16:59 +00:00
Gerald Combs 5971fcb941 Qt: Remove some unused code. 2022-04-04 21:05:17 +00:00
Gerald Combs 9ec6b50027 Rename ui/qt_logshark to ui/qt_logwolf. 2022-04-04 09:39:27 -07:00
Gerald Combs b153f040fc Qt: Start renaming Logshark to Logwolf.
Rename LogsharkApplication to LogwolfApplication. Rename other Logshark
references in ui/qt_logshark to Logwolf. Update our CMake target and
variable names.
2022-04-04 09:39:27 -07:00
Gerald Combs 3086774fa6 wsutil: Add configuration namespaces.
Rename init_progfile_dir to configuration_init. Add an argument which
specifies our configuration namespace, which can be "Wireshark"
(default) or "Logwolf".
2022-04-04 09:39:27 -07:00
Gerald Combs 6d2ab6900f Qt: Dynamically set our "Welcome to" banner in WelcomePage. 2022-04-04 09:39:27 -07:00
Gerald Combs dceffb8e56 Qt: Remove telephony and wireless code from Logwolf.
Remove the Telephony menu and associated code and dependencies from
LogWolf. Remove the remaining wireless code as well.
2022-04-04 09:39:27 -07:00
Gerald Combs d8008cb89e Qt: Split MainWindow into WiresharkMainWindow and LogwolfMainWindow.
Rename the main_window class and UIC files to wireshark_main_window and
the MainWindow class to WiresharkMainWindow. Copy wireshark_main_window
/ WiresharkMainWindow to logwolf_main_window / LogwolfMainWindow.

Remove the Wireless menu from Logwolf.
2022-04-04 09:39:27 -07:00
Gerald Combs 80de95ca71 Qt: Split MainApplication out from WiresharkApplication.
Move WiresharkApplication.{cpp,h} to MainApplication.{cpp,h}. Add back
WiresharkApplication as a thin superclass of MainApplication, similar to
LogsharkApplication. Change all of our wsApp references to mainApp. We
will likely have to change many or most of them back, but that's a
commit for another time.
2022-04-04 09:39:27 -07:00
Gerald Combs 245f988e9e Logshark: Add initial UI.
Add a separate UI application named "Logshark". It's currently a very
thin superclass of Wireshark, but that will change over time. Based on
work by Loris Degioanni.
2022-04-04 09:39:26 -07:00
Gerald Combs 2fdf85c6eb Create Wireshark and Logshark info plists.
Rename Info.plist.in to WiresharkInfo.plist.in and copy it to
LogsharkInfo.plist.in.
2022-04-04 09:39:26 -07:00
Jiří Engelthaler 248f11dd1b Qt: Fix interface statistics update if some interfaces are hidden
Closes issue #18023
2022-04-02 16:43:15 +00:00
Jirka Novak 8b737033b0 RTP Analysis dialog: Update statistics when data are processed
Fixes #18018
2022-03-31 19:25:10 +00:00
Gerald Combs f54bad026f Qt: Fix another qsizetype warning.
Fix

ui/qt/models/filter_list_model.cpp:299:33: warning: implicit conversion loses integer precision: 'qsizetype' (aka 'long long') to 'int' [-Wshorten-64-to-32]
            storage.move(strow, storeTo);
                    ~~~~        ^~~~~~~

when building with Qt 5.
2022-03-28 09:05:24 -05:00
Gerald Combs c805c0c16e Qt: Fix an about box signal and use new-style connections.
Fix

 ** (wireshark:77415) 10:53:35.149736 [GUI WARNING] -- QObject::connect: No such signal QComboBox::currentIndexChanged(QString) in ui/qt/about_dialog.cpp:352
 ** (wireshark:77415) 10:53:35.149760 [GUI WARNING] -- QObject::connect:  (sender name:   'cmbType')

Use new-style connections everywhere in about_dialog.cpp.
2022-03-27 18:19:37 +00:00
Gerald Combs b05a149acd [Automatic update for 2022-03-27]
Update manuf, services enterprise numbers, translations, and other items.
2022-03-27 16:53:18 +00:00
Gerald Combs e9a7f8c9e0 Qt: Fix some QCustomPlot Qt 6 warnings. 2022-03-27 14:35:55 +00:00
Gerald Combs 067b3805b7 Qt: Add float suffixes.
Fix

ui\qt\packet_list.cpp(2101,33): warning C4305: 'argument': truncation from 'double' to 'float' [c:\Users\gerald\Development\wireshark\build\ui\qt\qtui.vcxproj]
    ui\qt\packet_list.cpp(2101,33): warning C4305:         tick_color.setAlphaF(0.3); [c:\Users\gerald\Development\wireshark\build\ui\qt\qtui.vcxproj]
    ui\qt\packet_list.cpp(2101,33): warning C4305:         ^ [c:\Users\gerald\Development\wireshark\build\ui\qt\qtui.vcxproj]
2022-03-25 13:36:07 -07:00
Gerald Combs bcd3d05a3e Qt: Fix more Qt6-related warnings. 2022-03-25 12:48:01 -07:00
Roland Knall f0e4cedd69 Qt: Fix most of Qt6 compile warnings and issues 2022-03-25 11:16:18 -07:00
Gerald Combs f8d3ebe0e2 Qt: Handle qsizetype.
Qt 5.10 added qsizetype, aka an ssize_t and Qt 6 makes extensive use of
it. Add a compatibility typedef and use it where we can. Cast it away
where we can't.
2022-03-25 16:51:55 +00:00
Gerald Combs de0db2ad0a Qt: QVariant::type() is deprecated in Qt6.
Fix

ui/qt/rtp_stream_dialog.cpp:708:26: error: 'type' is deprecated: Use typeId() or metaType(). [-Werror,-Wdeprecated-declarations]
            } else if (v.type() == QVariant::String) {
                         ^

and similar errors. Although the warnings recommend typeId() or
metaType(), userType() exists in both Qt 5 and 6 so use it instead.
2022-03-23 09:30:49 +00:00
Gerald Combs ea11891f21 Qt: QMouseEvent::globalPos() is deprecated in Qt6.
Fix

ui/qt/tcp_stream_dialog.cpp:1669:31: error: 'globalPos' is deprecated: Use globalPosition() [-Werror,-Wdeprecated-declarations]
        ctx_menu_.exec(event->globalPos());
                              ^

and similar warnings.
2022-03-23 09:16:00 +00:00
Roland Knall 9253762305 Qt: Fix startCapture legacy call 2022-03-21 10:06:28 +00:00
Roland Knall 5212a757a4 Qt: Remove sparkline for extcap 2022-03-21 09:49:13 +00:00
Gerald Combs 6a97b2095c [Automatic update for 2022-03-20]
Update manuf, services enterprise numbers, translations, and other items.
2022-03-20 16:41:14 +00:00
Roland Knall 5f6d7ada57 Qt: Fix pre Qt 5.11 builds 2022-03-18 15:50:53 +01:00
Roland Knall bf21921445 Qt: Allow capture from hidden interfaces
Hidden interfaces where not able to be captured from, if they where displayed on the front page. This fixes that.

Fixes #13354
2022-03-18 12:53:42 +00:00
Roland Knall 9d11321385 Qt: Disable Sorting for the packet List
Allows the sorting to be disabled to avoid painful recalculations if the
sorting has been clicked on by accident.

Fixes #16786
2022-03-17 16:52:53 +01:00
Jaap Keuter bdb460ef69 Bluetooth: have BT specific global names contain bluetooth 2022-03-14 20:02:10 +00:00
Guy Harris 109b92b5d7 wiretap: have wtap_dump_close() provide a "needs to be reloaded" indication.
This allows the "needs to be reloaded" indication to be set in the close
process, as is the case for ERF; having a routine that returns the value
of that indication is not useful if it gets seet in the close process,
as the handle for the wtap_dumper is no longer valid after
wtap_dump_close() finishes.

We also get rid of wtap_dump_get_needs_reload(), as callers should get
that information via the added argument to wtap_dump_close().

Fixes #17989.
2022-03-14 19:12:20 +00:00
Stig Bjørlykke 2c4165fe5a Qt: Set Packet List scrollbar page step only on macOS
Only set the Packet List scrollbar page step to be equal to the
height of the scrollbar when running on macOS. Qt on Linux and
Windows behaves different.
2022-03-10 15:08:14 +01:00
João Valverde e035fa3508 Qt: Add new operators to "display filter expression" dialog 2022-03-09 11:17:39 +00:00
Gerald Combs e482b375f2 Rename the "image" directory to "resources".
The "image" directory contains resource compiler assets and other
application resources, so name it "resources."
2022-03-09 02:07:51 +00:00
Roland Knall 33151dc928 Qt: Fix overlay scrollbar indicator
The indicator for selected packets is not reflecting the relative
size of that packet inside the map
2022-03-08 10:31:25 +00:00
Gerald Combs 1d2a8bff3c [Automatic update for 2022-03-06]
Update manuf, services enterprise numbers, translations, and other items.
2022-03-06 16:41:06 +00:00
Jaap Keuter 5ea49dbffb Drop old unused topic actions
Part of issue #17982
2022-03-06 15:10:19 +00:00
Gerald Combs b9651ba7b0 [Automatic update for 2022-02-27]
Update manuf, services enterprise numbers, translations, and other items.
2022-02-27 16:38:33 +00:00
John Thacker 939972800e Strip Headers: Add separate menu dialog, tshark help
Add a separate menu for Strip Headers (similar to Export PDU, but exporting
to an encapsulation other than WIRESHARK_UPPER_PDU everything for
that encapsulation). Add to the usage output of tshark for the "-U"
option which encapsulation a export tap will produce.
2022-02-25 20:29:16 -05:00
John Thacker cbf76ea22f Export PDU: Allow native encapsulations / strip headers
Allow export PDU taps to be registered with a wiretap encapsulation
instead of always using WTAP_ENCAP_WIRESHARK_UPPER_PDU. This allows
creating normal capture files that aren't tied to wireshark without
having to do a "editcap -C -L -T", as well as creating files in
formats other than pcapng and pcap with tshark.

Provide a couple sample implementations in Ethernet (WTAP_ENCAP_ETHERNET)
and IP (v4 and v6, WTAP_ENCAP_RAW_IP) that are the most common use cases.
(I can imagine a few others; WTAP_ENCAP_MPEG_2_TS could probably be
useful, for example.) Fixes #15141
2022-02-25 20:29:16 -05:00
João Valverde 90c0862a93 Reword plugin info in About Wireshark dialog 2022-02-24 21:30:04 +00:00
João Valverde ac6cbbcda3 Windows: Fix build
For some reason this was not caught by the CI.
2022-02-24 20:29:04 +00:00
David Perry e2fab18853 wsutil: New API to gather compile/runtime info 2022-02-24 13:27:08 +00:00
Roland Knall 21f57f04b1 Lua: Forward display filter text info
Fix issues caused with previous commits

Fixes: #17188
2022-02-23 16:31:35 +00:00
David Perry dd2fd30ba3 Tooltips for menu items that open browser windows 2022-02-23 15:36:42 +00:00
Chuck Craft 2990d624f9 Qt: Show Packet Bytes - first byte is 0 so end byte is length-1
Closes  #17804
2022-02-21 16:57:31 +00:00
Gerald Combs 695ce22b0d [Automatic update for 2022-02-20]
Update manuf, services enterprise numbers, translations, and other items.

[ Reverted packet-asterix.c by hand. ]
2022-02-20 18:58:53 +00:00
Uli Heilmeier 0824558af1 QT Proto Tree: Fix link to wiki for protocol ref
The wiki pages for protocols are currently reachable via
https://gitlab.com/wireshark/wireshark/-/wikis/<proto_abbrev>

Fixes #17944
2022-02-19 11:59:56 +00:00
Chuck Craft 0396c65d60 Qt: "Decode As..." tooltips misassigned 2022-02-19 11:48:21 +00:00
Jim Young 59b5c83e4c Qt: Refactor to avoid deprecation warning on Windows 2022-02-14 09:24:02 +00:00
Gerald Combs 4e3b2ec007 [Automatic update for 2022-02-13]
Update manuf, services enterprise numbers, translations, and other items.
2022-02-13 16:39:57 +00:00
Alexis La Goutte 0f86319543 follow_stream_dialog(qt): Fix Wunreachable-code
follow_stream_dialog.cpp:591:29: warning: code will never be executed [-Wunreachable-code]
2022-02-13 10:23:42 +00:00
Alexis La Goutte 13c42f5f83 help_url(ui) Fix Wunreachable-code
help_url.c:308:15: warning: code will never be executed [-Wunreachable-code]
2022-02-13 10:23:42 +00:00
Roland Knall 699c3c051a Qt: Fix ASAN heap-use-after-free 2022-02-11 18:51:54 +00:00
John Thacker 52955b9c43 Qt: highlight when search result is in the current packet.
Calling setCurrentIndex with QItemSelectionModel::ClearAndSelect clears
the currentIndex, but not the selection, so it doesn't trigger
selectionChanged. However, highlighting depends on the selectionChanged
signal, not currentChanged(), and it's not emitted if we're still on the
same packet/row as the current selection (which can occur if searching
for something that occurs in exactly one packet in a capture.)

Since packet_list_select_row_from_data() cares about where the data
is within the packet, it needs to clear the selection.  Fix #8269
2022-02-11 18:21:35 +00:00
John Thacker 0011bb6a4c Qt: Allow omitting secondary data sources when printing
Add a checkbox to the packet format group box to allow the
hexdump to only have the main frame instead of secondary data
sources as well, so that Print and Export Packet Dissections can
be used for input to text2pcap.
2022-02-10 23:28:53 -05:00
David Perry 1e0d117eb7 Specify directory for temporary captures 2022-02-09 14:32:28 +00:00
Roland Knall 1e795b3f8c Qt: Fix Packet bytes dialog view
Mac/Linux use a different sorting for the QDialogButtons
2022-02-07 22:03:01 +00:00
Roland Knall 81f220ae80 Qt: Fix open explorer
Apparently on Windows, if a dialog contains spaces it is not properly
opened via /select. But opening the file via QDesktopServices leads to
the file not being selected in the open explorer windows (expectation by
the user). Therefore the original change is restored, but with a
differenc call which should handle the space issue in most cases better
than before. See
https://stackoverflow.com/questions/3490336/how-to-reveal-in-finder-or-show-in-explorer-with-qt
for a short explanation (bottom of post)

Fixes #17927
2022-02-07 15:57:59 +00:00
Roland Knall 835d5b3f97 Qt: Allow byteview to be hidden
Implements: #17887
2022-02-07 12:48:18 +00:00
Roland Knall 5b6bf0b4f3 Qt: Fix show in folder issue
Opening a folder on Windows lead to undesired behaviour

Fixes: #17927
2022-02-07 10:54:38 +01:00
Gerald Combs d6fe0b3211 [Automatic update for 2022-02-06]
Update manuf, services enterprise numbers, translations, and other items.
2022-02-06 16:39:45 +00:00
Chuck Craft 8510013135 Prefs/Expert: disable Open Expert Info on Protocol Preferences context menu
Closes #17920
2022-02-06 13:10:08 +00:00
Stig Bjørlykke 9a11d75d4d Qt: Add Show as Json in Show Packet Bytes
Show as human readable indented Json.
2022-02-06 10:54:18 +00:00
Roland Knall d003ad9092 Qt: Display fieldname as tooltip in expert info dialog 2022-02-05 11:49:41 +00:00
Roland Knall 4e11aa1829 Qt: Show Preference key in the tooltip 2022-02-03 23:15:41 +00:00
Chuck Craft 5c020863c7 Qt: Go To Packet field - change from inputMask to QIntValidator
inputMask populates the field with a space for each character
in the mask. Mouse people that click in the field may position
the cursor at the far right of the mask and not be able to enter
a value.
https://www.qtcentre.org/threads/7106-QLineEdit-and-input-mask

Remove the inputMask from the field definition and add a validator.
2022-02-01 21:41:18 +00:00
Roland Knall a087544ba8 Qt: Fix PacketDialog preference context menu
The context menu is not being filled in the packetdialog popup

Fixes #17803
2022-02-01 19:44:39 +00:00
Gerald Combs bbed034329 [Automatic update for 2022-01-30]
Update manuf, services enterprise numbers, translations, and other items.
2022-01-30 18:14:08 +00:00
Gerald Combs f7fba2ad52 [Automatic update for 2022-01-23]
Update manuf, services enterprise numbers, translations, and other items.
2022-01-23 17:43:16 +00:00
Guy Harris 125f5cbd88 Fix no-ZLib builds.
Don't use ZLib routines or data types if we're built without ZLib.

Don't support --compress-type=gzip, or a gzip check box in the Output
pane of the Capture Options dialog, if we're built without ZLib.

Fixes #17899.
2022-01-21 15:04:28 -08:00
John Thacker 3e2c79d924 dumpcap: Fix segfault when failing to create temporary file
g_file_open_tmp() does not set name_used unless the temp file
is successfully created (cf. to our old hand written library
pre commit 2925fb0850). Initialize it so that g_free doesn't
free a random memory location in that case, and don't use it
otherwise after failure. Fix #17828.
2022-01-19 13:57:08 +00:00
Anders Broman fe09d8e7e5 version info: Update for Microsoft Visual Studio 2022. 2022-01-18 17:28:28 +00:00
Gerald Combs 496a23a56a [Automatic update for 2022-01-16]
Update manuf, services enterprise numbers, translations, and other items.
2022-01-16 16:40:05 +00:00
Thibaut Vandervelden c9e08b7be3 Add ShowAsRustArray option 2022-01-16 08:07:44 +00:00
John Thacker 3f6c273e11 import_text: Check writable encap types against pcapng
Since Import from Hex Dump creates a pcapng temporary file, use
the list of encapsulations we can write to pcapng instead of pcap.

In particular, this makes WTAP_ENCAP_SYSTEMD_JOURNAL possible, so make
text_import capable of writing that encapsulation by using the proper
rec_type and block. It's not clear why someone would have a binary
hex dump of this text based format, but it works.
2022-01-16 03:34:34 +00:00
Roland Knall 1abf3d7000 Qt: Automatically enable new coloring rules
Ensure, that new coloring rules are enabled automatically
2022-01-12 14:33:02 +00:00
Nicolas Fella 34c7a0edfd Set desktop file name for QApplication
This must match the base name of the .desktop file (without the .desktop suffix).

The implicit default is 'wireshark', which worked until the file got renamed in 42a09ad02e

Setting this is important for several desktop enviromnent features to work, for example the window icon on Plasma Wayland
2022-01-12 01:41:48 +01:00
John Thacker f85f077b54 text_import: Allow fake IP headers with Raw IP encapsulation
In text2pcap and Import from Hex Dump, allow fake IP headers with
the appropriate versions when the Raw IP, Raw IPv4, and Raw IPv6
encapsulations are specified. In such cases, do not add a dummy
Ethernet header.

Continue to reject other encapsulations besides these, Ethernet,
and Wireshark Upper PDU when appropriate. Add some checks for the
encapsulation type in text_import as well, instead of just assuming
that the callers handle it correctly.
2022-01-11 08:46:44 -05:00
John Thacker ad035ed438 text2pcap: Case insensitive match for ISO time option
Let the user select ISO 8601 time format with "ISO", "iso",
or anything in between.
2022-01-11 05:12:13 +00:00
John Thacker d047c75cd0 import_text+Qt: Don't add impossible dummy headers to wrong encaps
Move the list of encapsulation buttons to a QButtonGroup, which makes
it easy to tell which one of them is activated.

Use that to fix an issue where dummy headers impermissible for an
encapsulation type could be added if the radio button was selected
before switching the encapsulation type. (Only for encapsulations
that allow at least one type, i.e. Ethernet or Wireshark Upper PDU.)
2022-01-11 01:04:21 +00:00
Gerald Combs e71ab6dde5 [Automatic update for 2022-01-09]
Update manuf, services enterprise numbers, translations, and other items.
2022-01-09 16:38:45 +00:00
Alexis La Goutte a0328bdb03 qcustomsplot: Fix Clang Warnings [core.UndefinedBinaryOperatorResult]
qcustomplot.cpp:34001:37: warning: The left operand of '-' is a garbage value [core.UndefinedBinaryOperatorResult]
qcustomplot.cpp:34001:37: warning: The right operand of '-' is a garbage value [core.UndefinedBinaryOperatorResult]
2022-01-09 12:37:37 +00:00
Alexis La Goutte 075ee9138a qcustomsplot: fix Clang warnings [core.CallAndMessage]
qcustomplot.cpp:26643:9: warning: 1st function call argument is an uninitialized value [core.CallAndMessage]
qcustomplot.cpp:27752:11: warning: 1st function call argument is an uninitialized value [core.CallAndMessage]
qcustomplot.cpp:27779:11: warning: 1st function call argument is an uninitialized value [core.CallAndMessage]
qcustomplot.cpp:34087:7: warning: 2nd function call argument is an uninitialized value [core.CallAndMessage]
2022-01-09 12:37:37 +00:00
Alexis La Goutte 6fd4188804 qcustomsplot: fix Clang Warning UndefinedBinaryOperatorResult
qcustomplot.cpp:22400:17: warning: The left operand of '>' is a garbage value [core.UndefinedBinaryOperatorResult]
qcustomplot.cpp:22400:17: warning: The right operand of '>' is a garbage value [core.UndefinedBinaryOperatorResult]
qcustomplot.cpp:35170:17: warning: The left operand of '>' is a garbage value [core.UndefinedBinaryOperatorResult]
qcustomplot.cpp:35170:17: warning: The right operand of '>' is a garbage value [core.UndefinedBinaryOperatorResult]
2022-01-09 12:37:37 +00:00
Alexis La Goutte 3afa8264cb qcustomsplot: fix Clang Warnings[core.UndefinedBinaryOperatorResult]
qcustomplot.cpp:21229:13: warning: The left operand of '==' is a garbage value [core.UndefinedBinaryOperatorResult]
qcustomplot.cpp:21274:13: warning: The left operand of '==' is a garbage value [core.UndefinedBinaryOperatorResult]
qcustomplot.cpp:35323:13: warning: The left operand of '==' is a garbage value [core.UndefinedBinaryOperatorResult]
qcustomplot.cpp:35349:13: warning: The left operand of '==' is a garbage value [core.UndefinedBinaryOperatorResult]
2022-01-09 12:37:37 +00:00
Dr. Lars Völker bb1fb0624c SOME/IP: Adding taps and statistics
Added:
- SOME/IP Messages tap and statistics
- SOME/IP-SD Entry tap and statistics
2022-01-09 10:49:23 +00:00
John Thacker 175e24a30b text_import: Add default IPv6 addresses
Add some default IPv6 addresses, used in place of the unspecified
address. These are unique local addresses as in RFC 4193 with
a global ID generated using the pseudo-random algorithm mentioned
therein.
2022-01-08 20:23:10 -05:00
Gerald Combs c65f0a5a15 Update our Npcap URLs.
The official Npcap web site is now https://npcap.com/. Update our URLs
to match. Fixes #17838.
2022-01-06 16:12:30 -08:00
j.novak@netsystem.cz 428f222853 Extcap: Extcaps must be fully configured before start of capture 2022-01-06 07:02:11 +00:00
j.novak@netsystem.cz e1a8f0119e Extcap prefs: Editor remembers empty values 2022-01-06 03:48:27 +00:00
Pascal Quantin adca11dd5c range_string: follow-up of 893290c 2022-01-05 20:34:15 +00:00
João Valverde 3f27a830fc wslog: Use a wider type for line 2022-01-05 13:31:52 +00:00
Guy Harris 72a4210828 text_import: "localtime()" is an API, "local time" is local time. 2022-01-04 15:17:30 -08:00
John Thacker da6cfc4de2 text_import: nanosecond resolution by default
Use nanosecond resolution pcapng files for "Import from Hex Dump"
by default (since we support that level of precision and that's
what text2pcap does).
2022-01-03 22:38:31 +00:00
Gerald Combs 6d319297ae Qt: Add a common hover color. 2022-01-03 19:03:46 +00:00
Gerald Combs c6f328c6a9 Qt: Disable alternating table rows.
Disable QAbstractItemView's alternatingRowColors in places where we have
that set. One of Wireshark's most heavily used features is packet
colorization; we use color in packet list and detail rows to convey
information. Simple alternating color rows doesn't do that, and as my
blatant appeal to authority^W^W^W^W^WEdward Tufte points out, "Strips
are merely bureaucratic or designer chartjunk; good typography can
always organize a table, no stripes needed."

https://www.edwardtufte.com/bboard/q-and-a-fetch-msg?msg_id=0001IV
2022-01-02 14:41:53 -08:00
Gerald Combs 17e4032e81 [Automatic update for 2022-01-02]
Update manuf, services enterprise numbers, translations, and other items.
2022-01-02 16:39:07 +00:00
Moshe Kaplan 67f05835ca Fix more repeated words throughout
Fixes more repeated words seen throughout
the code base.
2021-12-31 22:50:40 +00:00
John Thacker 4d7199d14b import_text: Add fake interface name to settings
Write and retrieve the interface name for "Import from Hex Dump"
to the settings file.
2021-12-31 15:49:21 +00:00
John Thacker b296db31a4 import_text: Allow setting interface name from GUI
Add the ability to set the interface name from the GUI
"Import from Hex Dump" just as with text2pcap. The last
feature for #16724 from the GUI side.
2021-12-30 14:10:04 -05:00
John Thacker 42084c2d17 text2pcap: Move SHB and IDB setup to ui/text_import
Move the parameter setup to text_import, so that later it can
be called from the GUI, including the interface name. (This has
to be a separate function because these parameters need to be
set before the call to wtap_dump_open, which is different for
regular files vs temp files vs stdout.)
2021-12-30 17:05:06 +00:00
j.novak@netsystem.cz 6c9cb8f3fa Prefs/Extcap: Added support for password which is never stored on the disk 2021-12-30 16:03:15 +00:00
John Thacker 6d0bd4e8e1 text_import: Fix squished address line edits on MacOS
Add the same fix for Mac to the address line edits as the others.
2021-12-30 09:37:47 -05:00
John Thacker 021c25e22c text2pcap: Use standard log debug level
Remove the '-d' option from text2pcap, and move the two levels
of debug messages in text2pcap and text_import to either
LOG_LEVEL_DEBUG or LOG_LEVEL_NOISY as appropriate.
2021-12-30 01:17:06 +00:00
John Thacker 15fa09e5e3 import_text: Move IPv6 header control, use QComboBox
In "Import from Hex Dump", change the control that determines
IPv4 versus IPv6 to a QComboBox, and move it into the grid of
options, in the IP option section.
2021-12-29 15:06:33 +00:00
John Thacker c1d7069a83 text_import: Only popup a warning about offsets the first time
Only warn about the parser getting an unexpected offset when
using OFFSET_NONE the first time. Use log warnings for subsequent
messages.

Strip off the whitespace/newline/colon from the offset when adding
it to the message, only output the offset number.
2021-12-29 14:45:10 +00:00
Guy Harris b38987573e text_import: use 4-space indentation for number_of_padding_bytes().
It's the only routine that doesn't use 4-space indentation.
2021-12-28 20:57:28 +00:00
Chuck Craft 9a9a754378 Qt: byteview mouse hover highlights not selects 2021-12-28 20:39:11 +00:00
John Thacker 44d27e975a text_import: Switch default IPv4 addresses to what text2pcap used
text2pcap used 10.1.1.1 and 10.2.2.2 for default IPv4 addresses,
and "Import From Hex Dump" used 1.1.1.1 and 2.2.2.2. The former
are a little bit better for defaults since they're RFC 1918
private IP addresses, so let's use them for the common code.
2021-12-28 11:00:46 -05:00
Stig Bjørlykke 6343967eef Qt: Disable Import Hex Dump IPv6 check box when unused
Only enable the IPv6 option check box when adding a IP header.
Improve the tooltip text.
2021-12-27 18:38:35 +01:00
John Thacker 7dc79c9a2f text_import: Fix custom IPv6 address handling
Fix a case where one address but not the other was set to a nonzero
IPv6 address and direction was indiciated.
2021-12-27 10:28:44 -05:00
John Thacker a42723359e import text: add IPv6 option, custom IPv6 addresses
Add the option to use IPv6 instead of IPv4 for dummy headers,
including custom source and destination address, to the
"Import from Hex Dump" GUI box. Related to #16724
2021-12-27 10:06:02 -05:00
John Thacker 756cc28592 import_text: Save IP address settings 2021-12-27 14:35:01 +00:00
João Valverde 0d5bfd44a8 Use a wrapper function to call strptime()
Encapsulate the feature requirements for strptime() in a
portability wrapper.

Use _GNU_SOURCE to expose strptime. It should be enough on glibc
without the side-effect of selecting a particular SUS version,
which we don't need and might hide other definitions.
2021-12-27 14:07:32 +00:00
John Thacker b83cefd2fe import text: Custom IPv4 source and destination address from GUI
Add the ability to set custome IPv4 source and destination addresses
to the "Import from Hex Dump" GUI menu. Part of #16724.
2021-12-27 08:32:34 -05:00
John Thacker 23355cddf6 import_text: Add ASCII identification checkbox
Add a checkbox for the extra detection for ASCII in a hex+ASCII
hexdump even when the text looks like hexbytes to Import from Hex
Dump. Save and restore it from the settings. Work towards #16724.
2021-12-26 19:13:25 -05:00
Gerald Combs a3df9fe13f [Automatic update for 2021-12-26]
Update manuf, services enterprise numbers, translations, and other items.

Asterix failed.
2021-12-26 18:40:31 +00:00
John Thacker 9e7b5c9189 text2pcap: Use debug level
Pass the debug level parameter from text2pcap to text_import
so that it is used as it was before to print internal parsing
information.
2021-12-25 15:52:46 -05:00
Gerald Combs 38dbb8486f text import: Remove an unneeded cast.
Don't bother casting to a guint32. We check for large values further on.
2021-12-25 19:43:35 +00:00
John Thacker f63571c3e8 text_import: Ignore offsets in no offset mode
If we're in the no offset mode and we parse an offset,
warn the user and ignore. At the very beginning of the file try
adding it to the preamble, maybe there's something unfortunate
like an all numeric time stamp format (ISO-8601 Basic).
2021-12-25 08:39:29 -05:00
John Thacker 857d518c17 text_import: Use time format directly
Also use g_strcmp0 for setting the ISO format.
2021-12-25 03:35:24 +00:00
John Thacker 54c4c7b0a6 text_import: Another explicit cast for unsigned long and clang 2021-12-24 21:54:40 -05:00
John Thacker 96c299c6b8 text_import: Reduce globals
A bunch of the globals are simply copied from the input parameter
text_import_info_t, just use them directly.

Move the count for packets read and written into the info type,
so that callers like text2pcap can access them as results.
2021-12-24 08:20:27 -05:00
John Thacker 48574e3a58 text_import: Report errors and warnings
Don't exit in the middle with unexpected values. Report a failure
and return a failed exit status when something goes really wrong.
Use warnings when appropriate, like when a time code value couldn't
be parsed.
2021-12-23 19:26:45 -05:00
Gerald Combs 4605ad2ed7 CMake: Clean up the Qt CMakeLists.txt
Sort each of our file lists and remove a duplicate item. Make our
indentaion consistent.
2021-12-23 10:32:55 -08:00
John Thacker bc9cfa6340 text_import: Allow ISO8601 format times
Includes allowing the string "ISO" in the format string text box
in the GUI, so this works in "Import from Hex Dump" as well as
being for the text2pcap transition. Part of #16724.
2021-12-23 11:42:51 -05:00
John Thacker bc4b27bbe2 text_import: Report failure to write
Use report_message and report wtap_dump failures. Pass in
the output filename and keep track of the frame numbers for
the message parameters.

Report failure to initialize the lex scanner in text_import
instead of in the GUI, so that it would be reported from text2pcap,
and because text_import might have other failure cases that are
not the scanner.

The regex parser returns a positive number of packets processed
on success; save that number in text_import, and return zero on
success to our callers.
2021-12-23 15:49:04 +00:00
Gerald Combs 20ebe853d1 Qt: Make utils more independent.
Use qApp instead of wsApp in ColorUtils and StockIcon.
2021-12-22 19:00:13 -08:00
John Thacker 8d421de42c text_import: port ASCII identification from text2pcap
This is the special check for canonical hex+ASCII textdump
files that looks for the edge case where the beginning of the
ASCII column has strings that can be mistaken by the parser for
additional hex bytes. Not implemented in the GUI yet. Preparing
for text2pcap switchover. Related to #16724.
2021-12-22 20:08:29 -05:00
John Thacker 50d66b6346 text_import: gracefully handle hexdump without trailing LF
Adjust the grammar to recognize two trailing hexadecimal characters
without a LF as a byte as well. Ported from text2pcap and commit
22cf80d30d which explains why this
is safe. More work for #16724.
2021-12-22 20:15:11 +00:00
John Thacker 334d24ec5b text_import: Fix IPv6 payload length 2021-12-22 19:40:13 +00:00
Moshe Kaplan 69d54d6f8e Corrects repeated words throughout the code.
Repeated words were found with:
egrep "(\b[a-zA-Z]+) +\1\b" . -Ir
and then manually reviewed.
Non-displayed strings (e.g., in comments)
were also corrected, to ease future review.
2021-12-22 11:01:11 +00:00
John Thacker 6a74dae750 text_import: Add interface and internals for IPv6
Add IPv6 handling to text_import, including the ability to
handle dummy IPv6 addresses instead of IPv4. GUI support is
still TBD. This further reduces the number of text2pcap features
that ui/text_import does not yet support. Related to #16724.
2021-12-22 05:13:17 +00:00
John Thacker 3ff0c753a1 text_import: Add interface and internals for dummy IPv4 addresses
Add dummy IPv4 addresses to the text_import_info_t struct, and
use them if set in the same way text2pcap does. GUI support in
"Import from Hex Dump" is not added yet. This is also part of the
work for text2pcap to eventually call text_import. Related to #16724.
2021-12-22 02:41:11 +00:00
John Thacker 4cfae8e378 text_import: pcap_link_type -> wtap_encap_type
The encapsulation type that text_import expects and puts
directly into rec.rec_header.packet_header.pkt_encap is a
wiretap encap type, not a pcap link type. Fix the name and
comment appropriately.
2021-12-22 01:00:19 +00:00
j.novak@netsystem.cz 9b62d8ba05 Extcap prefs: Selector correctly selects default value 2021-12-21 21:40:51 +00:00
j.novak@netsystem.cz 55aad96738 Extcap prefs: Selector option shows tooltip 2021-12-21 20:14:14 +00:00
João Valverde 5ce2ae2804 Clean up some printf() format strings 2021-12-21 02:15:46 +00:00
Gerald Combs e56c00e12f [Automatic update for 2021-12-19]
Update manuf, services enterprise numbers, translations, and other items.
2021-12-20 06:22:21 +00:00
João Valverde 0ccd69e530 Replace g_strdup_printf() with ws_strdup_printf()
Use macros from inttypes.h.
2021-12-19 21:21:58 +00:00
João Valverde fe5248717f Replace g_snprintf() with snprintf()
Use macros from inttypes.h with format strings.
2021-12-19 20:06:13 +00:00
John Thacker db10235d68 text_import: Handle SCTP and minimum packet lengths
Correctly handle when a minimum packet length forces fragmentation of
SCTP and we are generating dummy SCTP DATA chunk headers: mark fragmentation
in the chunk flags and set the transmission sequence number and
stream sequence number appropriately.

Port from text2pcap commit f8d48662c8
Part of #16724.
2021-12-18 22:45:02 -05:00
John Thacker f89d536503 text_import: Fix direction detection in Import from Hexdump
If the first character of the preamble indicates direction, it
needs to be skipped over and not tested as part of the timestamp.
2021-12-18 00:49:42 +00:00
John Thacker b4054d3879 text_import: Time delta between packets without timestamp
The "Import from Hex Dump" time delta for packets without a timestamp
was changed to be a nanosecond, but the time resolution for the file
created by import_text_dialog is the default, microseconds. Until
that is configurable, the time tick used needs to be microseconds like
it was before.

Clean up the code so that it's a little more consistent about when
and how the extra time tick is added, namely:
1. If there is no time format passed in.
2. If time format conversion for the packet fails for any reason.

We don't add an extra delta in other situations, e.g. if packets just
happen to have the same valid time value.

Fix #15562.
2021-12-17 13:37:29 +00:00
John Thacker 5f5f03f0e8 text_import: Fix spelling and grammar 2021-12-17 12:55:52 +00:00
John Thacker a74fabf73f text_import: Parse entire timestamp from hex dumps
_parse_time, which uses g_strlcpy, expects that end_field points
to the position after the end of the field (such as the \0.)
text_import_regex handles this correctly, but when importing from
hex dumps the last character of the timestamp was being cut off,
which makes a big difference when fractional seconds are not used.
2021-12-16 00:07:08 +00:00
João Valverde 81de22e81a wslog: 'struct timespec' is C11, use that 2021-12-15 15:00:59 +00:00
João Valverde fe30cf2f8a wsutil: Add portability wrapper for clock_gettime(CLOCK_REALTIME) 2021-12-15 15:00:59 +00:00
João Valverde e877460a9e Revert "The function timespec_get() is C17 so assume we have it"
This reverts commit 8b15d0e641.
2021-12-15 15:00:59 +00:00
João Valverde cf3cb3a695 wslog: Avoid logging any output to stdout
For historical reasons our logging inherited from GLib the logging of
some levels to stdout. Namely levels "info" and "debug" (to which we
added "noisy").

However this practice is discouraged because it mixes debug output
with application output for CLI tools and breaks many common usage
scenarios, like using tshark in pipes.

This change flips the logic on wslog to make logging to stderr the
default behavior.

Extcap subprocess have a hidden dependency on stdout so add that.

Some GUI users may also have a dependency on stdout. Because
GUI tools are unlikely to depend on stdout for programatic output
add another exception for wireshark GUI, to preserve backward
compatibility.
2021-12-14 12:05:41 +00:00
João Valverde 8b15d0e641 The function timespec_get() is C17 so assume we have it 2021-12-14 11:23:05 +00:00
Gerald Combs a6cffab3a1 [Automatic update for 2021-12-12]
Update manuf, services enterprise numbers, translations, and other items.
2021-12-12 17:54:42 +00:00
João Valverde 7d7873187e GUI: Lower log level of "up and ready" message
This lowers the level of this message from "message" to
"info". This has two side-effects:
  - It is not displayed by default
  - It is printed to stdout instead of stderr.

Some users were depending on this message. Restore this to
the level it had before 05ed76d4. Even though this output is
not considered a stable interface restoring the old behavior
helps them and has no meaningful usability downsides. The
changes in 05ed76d4 were experimental anyway.

Related to #17763.
2021-12-11 00:01:41 +00:00
John Thacker f888074def cli: Cleanup rtspstat tap output format
Actually output the packet count for RTSP response status codes,
and align the columns between requests and response. (This CLI-only
stat is largely redundant with rtsp,tree but it might as well work.)
2021-12-10 14:15:29 +00:00
John Thacker 51134bca8d RTSP: Fix segault of cli tap with no filter set 2021-12-09 05:37:59 +00:00
Dario Lombardo 5fd23d72b6 Qt: fix compilation without pcap. 2021-12-09 04:51:02 +00:00
Gerald Combs 3d369c01cc CMake+Qt: Fix a version check. 2021-12-08 08:26:27 -08:00
John Thacker 8938b83961 cli: Clean up httpstat tap output format
Actually output the packet count for HTTP response status codes,
and align the columns between requests and response. (This CLI-only
stat is largely redundant with http,tree but it might as well work.)
2021-12-08 00:46:48 +00:00
Chuck Craft c560226f3b Qt: capture with file intervals bug; autostop duration reset
Closes #16783. No open issue for autostop bug. Link added in
issue 16783 to Ask site question 15303.
2021-12-07 08:05:56 +00:00
Martin Mayer 8d07014df0 Qt: Collapse/Expand context menu for StatsTreeDlg 2021-12-07 06:04:09 +00:00
j.novak@netsystem.cz d50c666cd7 Capture Options dialog: Added configuration icon 2021-12-07 05:47:54 +00:00
John Thacker 34f3a902f8 cli: Make CAMEL SRT stats filter work
The filter needs to be set after memsetting the struct to 0.
Also fix a length being off by one so that the filter doesn't
include the comma.
2021-12-06 03:52:49 +00:00
Gerald Combs 49e1576c31 CMake+Qt: Add a version check for QT5_ADD_TRANSLATION.
Passing options to QT5_ADD_TRANSLATION requires Qt >= 5.11.

https://github.com/qt/qttools/blob/5.11/src/linguist/Qt5LinguistToolsMacros.cmake
https://github.com/qt/qttools/blob/5.10/src/linguist/Qt5LinguistToolsMacros.cmake
2021-12-05 16:30:44 -08:00
John Thacker 7987df81ff QT: Default sort simple stat tables by first column ascending
Without this, the simple stat tables default to sorting by the first
column in descending order. (An artifact of the QTreeWidget that they
inherit from.) The first column is generally a message type (integer or
string) and ascending order makes more sense.

Some of the stat tables intentionally insert rows in a preferred order
that is different than sorting by the first column (e.g, ANSI A I/F tables
are sorted by the second column), but we can't tell what that is.
QTreeWidget only allows the data to be shown in its original unsorted
order if the widget is marked unsortable, but then the user isn't allowed
to sort at all, and being able to sort by other columns (such as count)
is useful.
2021-12-05 14:54:07 +00:00
Gerald Combs 6ef2b48fc0 CMake+Qt: Run lrelease in silent mode. 2021-12-04 17:46:29 +00:00
João Valverde e921b804d0 Fix logging with extcaps
Extcaps require a log file when invoked in child mode. It also has
a specific flag to enable debugging, other that the wslog options.

Fix the logging to:
  1. Enable debug log level if --debug is used.
  2. Do not emit messages to the stderr if debug is enabled.

This brings extcap logging to the same feature level it had before
wslog replaced GLib logging.
2021-12-03 12:30:53 +00:00
João Valverde 14bb016b5b Add release build configuration to version info 2021-12-01 20:28:25 +00:00
Moshe Kaplan 3953ddcf57 Add UI header files to Doxygen
Add @file markers for UI
header files so that Doxygen will
generate documentation for them.
2021-11-30 08:01:36 -05:00
Chuck Craft b081651088 Qt: Expert Info - set group summary label to ei_ field name
There is some lose of detail in the group label but eliminates
the misleading information that comes from grabbing the
potentially modified summary of the first entry in the group.

Closes #14892 #14425
2021-11-30 09:45:47 +00:00
Chuck Craft 8a19d8d1c7 cfilters/cli: -f "predef:..." needs cfilters loaded
Restore early loading of cfilters file removed in e0ddc7ad.
2021-11-30 09:30:44 +00:00
João Valverde 504de90a3c wsutil: Split format_size() enum
Use an enum to select units and a bit flag for the other options,
currently only prefix type.
2021-11-29 22:13:32 +00:00
Tomasz Moń 890555b8bd Qt: Qt6.2 compatibility fixes
Wireshark successfully compiles on Windows with Qt6.2 with following
cmake options:
  -DUSE_qt6=ON -DDISABLE_ERROR=ON

QCustomPlot QT 6.2 patch is taken from QCustomPlot forum post by miccs.
2021-11-29 04:55:12 +00:00
Jaap Keuter 32b2018ea9 LTE RLC graph: plug possible memory leak 2021-11-28 22:15:27 +00:00
Gerald Combs 2452270c4e [Automatic update for 2021-11-28]
Update manuf, services enterprise numbers, translations, and other items.
2021-11-28 16:24:55 +00:00
Tomasz Moń ede0bc5d61 Qt: Add missing QRegularExpression include 2021-11-28 13:13:31 +01:00
Tomasz Moń e51a0cb4f4 Qt: Use QRegularExpression instead of QRegExp
Qt5 recommended to use QRegularExpression instead of QRegExp.
Qt6 deprecated QRegExp and provides it in Qt5 compatibility module.

QRegularExpression is generally faster and safer to use as the results
are returned in separate QRegularExpressionMatch instead of modifying
interal QRegExp object state.
2021-11-26 09:10:42 +00:00
João Valverde 9dd770fd64 Clean up PCRE2 version info 2021-11-24 12:58:39 +00:00
Joerg Mayer 5bb7e1606b Fix some of the compile errors when compiling with Qt6
This is basically applying c knowledge and Google to the compiler
error messages. There is basically no understanding involved into
what I was doing:
- No idea why lots of #includes needed to be added for Qt6
- No idea how to actually fix the remaining problems, but it's a start

Things that need to be done:
- The AudioDeviceInfo thingy needs to be replaced by something new (as
  an interim solution another patch disables the audio player in Qt6).
- GRegExp eventually needs to be replaced by QRegularExpression
  (available since Qt5.0, so development can be done in Qt5).
- Solutions for the other problems like some methods no longer
  being available in Qt6 that have to sort of co-exist with Qt5.
2021-11-24 10:31:16 +00:00
Joerg Mayer fe01f0109d Readd feature to make QtXMultimedia optional again
In order to be able to defer solving all Qt6 API differences at once
I tried to reactivate the QT_MULTIMEDIA_LIB feature. I managed to fix
most problems but one problem remains in both Qt5 and Qt6 builds.
Without Qt[56]Multimedia, the following error exceeds my non-existing
C++ knowledge:

jmayer/work/wireshark/git/ui/qt/rtp_player_dialog.cpp:154:18: error: out-of-line definition of 'RtpPlayerDialog' does not match any declaration in 'RtpPlayerDialog'
RtpPlayerDialog::RtpPlayerDialog(QWidget &parent, CaptureFile &cf, bool capture_running) :
                 ^~~~~~~~~~~~~~~
2021-11-24 10:31:16 +00:00
Joerg Mayer 24a364f762 Get CMake to successfully work with Qt6
Of course it still fails in the compile phase, but only for some
of the ui/qt/ files.

Wireshark with Qt5 still compiles and runs.

To do the build invoke cmake with the following settings added:
export CMAKE_PREFIX_PATH=:${MY_QT6_PREFIX}/lib/cmake
cmake -DUSE_qt6=ON ...

Independently of this patch there is lots of Qt-stuff in
CMakeLists.txt that needs review/cleanup:
- Some of the stuff can probably be solved in a less hacky way:
  + There seemed to be a way for QT6 to provide the required c++-standard,
    but in the end I could not find it.
  + Once we have a working Qt6 codebase, we may get rid of the USE_qt6
    flag and just test for Qt6Core first and if not present check for
    Qt5Core.
- All comments that match /qt ?[4-6]/i need reviewing/cleaning up.
- The changes in this patch have been tested to work on all machines
  that are my mac (macos 12.0.1, XCode 13.1, Intel, GPL-Qt6.2.1 with only
  the macos package selected, cmake 3.21.4)

Add ui/qt/qt6-migration-links.txt for some possibly helpful links
2021-11-24 10:31:16 +00:00
Gerald Combs 92045d98c0 [Automatic update for 2021-11-21]
Update manuf, services enterprise numbers, translations, and other items.
2021-11-21 16:24:28 +00:00
Stig Bjørlykke a8643ab254 Qt: Fix column validation in columnString()
The column parameter in PacketListRecord::columnString() must be
below cap_file->cinfo.num_cols to be valid. An issue with this check
may be triggered when switching profile.
2021-11-20 17:22:33 +00:00
Chuck Craft f748c91bb2 Qt (ByteView): update preference on hover state change; WSUG typo 2021-11-17 09:43:11 +00:00
Jirka Novak ffd1f1cecf VoIP calls dialog: fix generated filter
New 'in { }' syntax requires comma between items so filter generator in
VoIP calls dialog must use it too.
2021-11-16 21:02:05 +01:00
Gerald Combs 6ee1390b86 Qt: Make Lua dialogs children of the main window.
Pass the funnel operations ID to new_text_window and new_dialog so that
we can assign parent widgets when we create new FunnelTextDialogs and
FunnelStringDialog. This should ensure that they're destroyed properly.
Ping #17590.
2021-11-15 20:03:16 +00:00
João Valverde b30a2112e8 regex: Prefer C99/POSIX types
Replace 'gssize' with 'ssize_t'.

Add a CMake configure check for ssize_t.

Fix missing "config.h" includes.
2021-11-15 02:41:59 +00:00
João Valverde b9f2e4b7fa Make PCRE2 a required dependency 2021-11-14 21:00:59 +00:00
Gerald Combs 41a247287e [Automatic update for 2021-11-14]
Update manuf, services enterprise numbers, translations, and other items.
2021-11-14 16:39:31 +00:00
Gerald Combs 3f8f22f472 Qt: Add some notes about cleaning up after ourselves. 2021-11-11 13:21:48 -08:00
Gerald Combs eda588d1a6 Revert "Qt: fix memory leaks found by Visual Leak Detector"
This reverts commit c2edb44a9a.

While we should definitely avoid leaking memory, this runs up against
the Qt code's assumption that it will always have valid epan data.

Fixes #17590.
Fixes #17719.
2021-11-10 11:48:26 -08:00
Gerald Combs 7a30021aef Revert "Qt: Fix epan cleanup exit crash"
This reverts commit 5f50fad289.
2021-11-10 11:48:09 -08:00
Tomasz Moń 5f50fad289 Qt: Fix epan cleanup exit crash
Do not keep epan_dissect_t instance hanging until FrameInformation
destructor is called. Simply copy the tvb data into local buffer and
cleanup epan_dissect_t instance as soon as possible.

Fixes #17590
2021-11-09 10:54:49 +00:00
Gerald Combs e5eb17d414 UAT: Allow missing fields.
Add uat_set_default_values, which lets us provide default values for
fields that might be missing from the end of a UAT line. Set a default
value for the I/O Graph dialog's Y Axis Factor. Fixes the backward
compatibility issue described in #17623
2021-11-08 22:20:24 +00:00
João Valverde 69c850df51 ftypes: Simplify fvalue_can_*() interface
If an ftype can participate in equala assume it can also participate in
not equals. Use fvalue_can_eq() instead of fvalue_can_ne().

If it can participate in one order comparison it can participate in all.
Replace any comparison with fvalue_can_cmp().
2021-11-07 22:44:59 +00:00
Gerald Combs 8570fb47e8 [Automatic update for 2021-11-07]
Update manuf, services enterprise numbers, translations, and other items.
2021-11-07 16:40:28 +00:00
Moshe Kaplan 0b13ad6d95 Qt: Debounce View -> Internals -> Supported Protocols "Search" to improve UX
As searching the list of protocols takes a noticeable amount
of time and so would introduce significant lag while typing a string
into the Search box, we instead debounce the call to
updateSearchLineEdit(), so that it doesn't run until a set amount of
time has elapsed with no updates to the Search field.
If the user types something before the timer elapses, the timer restarts
the countdown.
2021-11-04 05:12:50 +00:00
Gerald Combs 552ee4c445 [Automatic update for 2021-10-31]
Update manuf, services enterprise numbers, translations, and other items.
2021-10-31 16:48:39 +00:00
Jirka Novak e880cf61d7 Flow sequence: Shows more information about various skinny messages
For many skinny messages additional information is shown next to
message. It simplifies call flow analysis.
2021-10-27 06:47:55 +00:00
Eugene Adell 4bdb4b1762 Follow Stream: Disable the Arrow button on 1st call
The first call to Follow Stream forgot to disable the arrow
button. Reverse the precedence between the display filter edition
and the display filter success now gives the expected GUI behavior.
Closes #10774
2021-10-26 04:02:14 +00:00
Gerald Combs 923ae6acca [Automatic update for 2021-10-24]
Update manuf, services enterprise numbers, translations, and other items.
2021-10-24 17:25:30 +00:00
João Valverde 0abe10e040 dfilter: Fix "!=" relation to be free of contradictions
Wireshark defines the relation of equality A == B as
A any_eq B <=> An == Bn for at least one An, Bn.
More accurately I think this is (formally) an equivalence
relation, not true equality.

Whichever definition for "==" we choose we must keep the
definition of "!=" as !(A == B), otherwise it will
lead to logical contradictions like (A == B) AND (A != B)
being true.

Fix the '!=' relation to match the definition of equality:
  A != B <=> !(A == B) <=> A all_ne B <=> An != Bn, for
every n.

This has been the recomended way to write "not equal" for a
long time in the documentation, even to the point where != was
deprecated, but it just wasn't implemented consistently in the
language, which has understandably been a persistent source
of confusion. Even a field that is normally well-behaved
with "!=" like "ip.src" or "ip.dst" will produce unexpected
results with encapsulations like IP-over-IP.

The opcode ALL_NE could have been implemented in the compiler
instead using NOT and ANY_EQ but I chose to implement it in
bytecode. It just seemed more elegant and efficient
but the difference was not very significant.

Keep around "~=" for any_ne relation, in case someone depends
on that, and because we don't have an operator for true equality:
  A strict_equal B <=> A all_eq B <=> !(A any_ne B).
If there is only one value then any_ne and all_ne are the same
comparison operation.

Implementing this change did not require fixing any tests so it
is unlikely the relation "~=" (any_ne) will be very useful.

Note that the behaviour of the '<' (less than) comparison relation
is a separate, more subtle issue. In the general case the definition
of '<' that is used is only a partial order.
2021-10-24 06:55:54 +00:00
Eugene Adell 9bedc8af1a Follow Stream: Minor update of a variable scope
To enhance the Merge 4644, the isReadRunning variable scope is
changed to reduce the header footprint and make the code compliant
to the usual coding rules.
2021-10-23 13:28:19 +00:00
Jirka Novak cf41fbd897 IAX2 Stream Analysis: Fix of mean jitter calculation
Calculation was using incorrect variable so calculation was incorrect.
Patch corrected this mistake.
2021-10-23 12:01:54 +00:00
Gerald Combs ca8e6f3db4 Qt: Add back some Q_OBJECT calls.
They're needed in some places for translations.
2021-10-22 16:47:38 -07:00
João Valverde 59c082c046 Add new global header wireshark.h with guideline
Remove ws_diag_control.h from config.h because that was a workaround
for the lack of a public global header. Fix the resultant build errors.
2021-10-22 06:41:44 +00:00
Eugene Adell 5863a7cbeb Ensure a single Follow Stream is running only
When changing one of the selection parameters in the Follow Stream
dialog while a filtering task is already running, the result is
inaccurate.
While a filtering task is already running in the Follow Stream
dialog, any filter change which triggers a new filtering gives a
wrong result. Both the displayed data and the Save As functions
are impacted. Closes #15637
2021-10-22 05:30:51 +00:00
Jirka Novak a747639add RTP Analysis: Fix of mean_jitter calculation
Calculation used current_diff in place current_jitter in mean_jitter
calculation so it produced incorrect results. This patch fixes it.

Closes #17600.
2021-10-20 07:05:30 +00:00
Gerald Combs 0e667117b4 [Automatic update for 2021-10-17]
Update manuf, services enterprise numbers, translations, and other items.
2021-10-17 09:30:23 +00:00
John Thacker cc91fd51ff cli: stats_tree: Make syntax consistent with other -z options
The statistics that use the stats_tree API parse the -z option
without expecting a comma separator between the statistics name
and the filter. This is contrary to both the man pages and how
all the other options work. Fix that so it's consistent.
Fix #17656
2021-10-15 04:22:23 +00:00
David Perry fd076e6ca8 Proposed rewording of filter tooltips
For #16186. Proposed changes to the tooltips which appear when a filter
expression is potentially problematic.

Rename references to "User's Guide" to "Help" since the link to the
User's Guide in the Help menu is just called *Contents*.

Name specific sections within the help which pertain to the warning
tooltip being shown. Gives first-time users some help in finding the
right part of the sizeable User's Guide.
2021-10-12 06:54:25 +00:00
Gerald Combs 11c58e78f7 Qt: More new-style signals+slot conversions. 2021-10-11 17:03:21 +00:00
Gerald Combs e5bcf6b402 Qt: Use new-style signals+slots in more places. 2021-10-11 16:32:49 +00:00
Chuck Craft 92ab6d0704 Rawshark: is not a CamelCase word 2021-10-11 08:03:31 +00:00
Gerald Combs ab34ebbc7b [Automatic update for 2021-10-10]
Update manuf, services enterprise numbers, translations, and other items.
2021-10-10 23:00:00 +00:00
Gerald Combs f9d3b9d51a Qt: Remove more Q_OBJECT macro calls. 2021-10-09 17:07:03 -07:00
Chuck Craft 48e740f8e4 text2pcap: typo on Help -> Manual Pages 2021-10-09 02:46:01 -05:00
Gerald Combs 991fc16e85 Qt: Remove Q_OBJECT in a few places where it's not needed.
Q_OBJECT is only needed for signals+slots, translations, and other
meta-object services. Remove it in some classes, since having it means
we're generating and compiling code unnecessarily.
2021-10-08 03:29:30 +00:00
Martin Mathieson af19fc795a Add NGAP Stats. 2021-10-06 09:26:42 +00:00
Stig Bjørlykke e724ab1b41 Qt: Handle fieldsChanged before prefs_apply_all
Improve reload Lua plugins to handle fieldsChanged before calling
the preferences apply callback, because a proto.prefs_changed()
function may call reload_packets() or redissect_packets(), and this
requires the fields to be updated.
2021-10-04 10:08:30 +02:00
Stig Bjørlykke e866034c55 Qt: Handle errors when reloading Lua FileHandler
Reloading the capture file after reloading a Lua FileHandler
may fail because of Lua errors. Handle this by closing the file.

Related to #17615
2021-10-04 07:15:11 +00:00
Gerald Combs 4bda9dfd3d [Automatic update for 2021-10-03]
Update manuf, services enterprise numbers, translations, and other items.
2021-10-03 10:51:10 +00:00