Commit Graph

3122 Commits

Author SHA1 Message Date
Michael Mann 3f2f16411f Convert GUI layout preferences to use preference effects.
Another simple example of how to use preference effects to limit
the times a capture file is redissected unnecessarily.

Also clean up some of the grammar of preference effect descriptions.

Change-Id: I2db92e8e3ee913d3b37162916bd0ef7ac8ecd794
Reviewed-on: https://code.wireshark.org/review/25175
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-09 13:09:18 +00:00
Dario Lombardo 22b5ffad86 extcap: add preference to prevent interfaces loading.
Change-Id: Ia5865a40c75e582f28408a0515c5c0b38e43a916
Reviewed-on: https://code.wireshark.org/review/25188
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-01-09 09:58:48 +00:00
Guy Harris af0f49e80d Use pcapng as the name of the file format.
At one point, I remember a discussion resulting in the official name of
the next-generation replacement for pcap format being changed to
"pcapng", with no hyphen.

Make Wireshark reflect that.

Change-Id: Ie66fb13a0fe3a8682143106dab601952e9154e2a
Reviewed-on: https://code.wireshark.org/review/25214
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-01-09 00:38:51 +00:00
Michael Mann c53412f7db Bugfix the sort order of protocols in Preference dialog.
Sort properly by module title.

Also consolidate some of the searching in PrefModuleTreeView.

Change-Id: I5312581c63f8626de08bd9f03613219b34bf968a
Reviewed-on: https://code.wireshark.org/review/25176
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-08 09:08:42 +00:00
Dario Lombardo e80b40adbe extcap: remove conditional compilation.
Change-Id: Ia54bba388755cf27a343fe6d69d244bf1ab897f9
Reviewed-on: https://code.wireshark.org/review/25186
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-08 05:50:15 +00:00
Gerald Combs f5f6ceeb66 [Automatic update for 2018-01-07]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: I65801bc1440f64c28ee003e23be2ca528bc1adc8
Reviewed-on: https://code.wireshark.org/review/25178
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-01-07 08:16:08 +00:00
Michael Mann 603bb5097d Set captures preferences for PREF_EFFECT_CAPTURE.
This is a simple example of changing preferences that don't
affect dissection to something else, so that changing them
doesn't cause a file to be redissected unnecessarily

Change-Id: I77c64c739e8bbc9f2a202f744f27cb07be4a822b
Reviewed-on: https://code.wireshark.org/review/25173
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-01-07 00:06:21 +00:00
Martin Mathieson 2941018a72 WLAN stats: make filter + apply button work
Also export as text just the networks.
Change-Id: I228d65cb219792a70c6077932dbe9cf65b92eb6e
Reviewed-on: https://code.wireshark.org/review/25169
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2018-01-06 23:27:00 +00:00
Michael Mann eef3c8434d Add ability for preferences to determine what they can change.
Add flags field to preference structure to help determine what
areas of Wireshark are affected by a preference changing.  The
intent is to be able to distinguish dissection from GUI or other
changes that are not dissection.

The default is to have all preferences affect dissection, but their
flags can be changed.  This patch doesn't change any flags from the
default.

Change-Id: Ied5ae961bc3f33f5b730b2892fff3fa0898380b8
Reviewed-on: https://code.wireshark.org/review/25171
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-01-06 17:49:23 +00:00
Pascal Quantin 5a5d9348b0 wireshark_preference.cpp: rework comments to please MSVC2015
Change-Id: Ic7a1f51df833e8aec7555f796e9a86f1d120cdc1
Reviewed-on: https://code.wireshark.org/review/25165
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-01-05 17:12:33 +00:00
Roland Knall 3b64fc008f Qt: Fix windows version of Preference Dialog
Initializing a static member on Windows C++ has to be done differently.

This fixes the segfault introduced with Ia611ec192dcc1ad638a997182cec1ab5bdb7859c

Change-Id: Ib7a9840feda74830f835345c666f57e23e9e4e0b
Reviewed-on: https://code.wireshark.org/review/25163
Reviewed-by: Roland Knall <rknall@gmail.com>
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-01-05 15:14:42 +00:00
Michael Mann 1a07d97fd7 Qt: Add manager for preference dialog
Abstract out the different types of preferences into a visitor
and factory pattern to handle the preference dialog.

Change-Id: Ia611ec192dcc1ad638a997182cec1ab5bdb7859c
Reviewed-on: https://code.wireshark.org/review/25142
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-01-05 11:13:21 +00:00
Stig Bjørlykke 1e16be7556 Qt: Bring back correct profile_status font size
The refactoring in ga79b7986 did not preserve the font size
for the profile name in the status bar.

Change-Id: If38224a43043dd572992836b6fe78f1829f9cccd
Reviewed-on: https://code.wireshark.org/review/25159
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-01-05 11:10:21 +00:00
Gerald Combs 3b2e999813 Qt: Byte view recent updates.
Add a recent.gui_bytes_encoding preference and use it for the byte view
encoding as requested in bug 14044.

The recent.gui_bytes_view preference is an enum, so make it one.

Bug: 14044
Change-Id: Ibc40721c29465aca1940467e41d71e9dd2485e71
Reviewed-on: https://code.wireshark.org/review/25147
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-01-05 06:52:13 +00:00
Gerald Combs 0f3aa8522e Qt: Move sized toolbar images to stock_icons.
The sized (WWxHH) icons in the toolbar directory aren't limited to
toolbars. Create a "stock_icons" directory and move them and their
related SVGs there.

Change-Id: I2c1852499594aa738371c79542f24bd3351653bb
Reviewed-on: https://code.wireshark.org/review/25133
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-01-05 03:27:15 +00:00
Michael Mann dbe9be2f06 Qt: Cleanup cases where QTreeWidgetItem is no longer used
Change-Id: Ib2b6d4f73a6c9f1dacb728f6275a240487a73a02
Reviewed-on: https://code.wireshark.org/review/25149
Petri-Dish: Michael Mann <mmann78@netscape.net>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-01-05 03:26:54 +00:00
Michael Mann dce8682e10 Qt: Reexpand dissector table and enabled protocol trees when dialog is searched.
If search text ends up with no results, the tree is cleared.  When the search
text is removed, it results in all but main leaf being collapsed.  Restore
the search tree to its default state after any search text has been entered.

Change-Id: Id7d1a4fcb4355c6e2551cf3dfd300e26bf683ca3
Reviewed-on: https://code.wireshark.org/review/25148
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-01-04 23:50:38 +00:00
Michael Mann d239da264c Convert preference dialog to use more models.
Convert Advanced view and Modules view to use a single base model,
loading the preferences once and then filter and display what they
need with QSortFilterProxyModel derived classes.

Convert the PreferencePane "types" to just strings.  This allows
a more straightforward relationship between the "special" modules
that need custom widgets for preference manipulation and it also
removes dependency on preferences_dialog.h for many files.

Change-Id: I091deb3061564aa4d1564e9ca1c792715961b083
Reviewed-on: https://code.wireshark.org/review/25134
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-01-04 21:20:59 +00:00
Roland Knall a79b7986cd Qt: Redesign profile menu in status bar
Remove global variables and move menu to where it is created.
Additionally exchange LabelStack with ClickableLable, as it
was overkill.

Change-Id: I04528b707e9e491d0dd43063f5a47b08dfdb3471
Reviewed-on: https://code.wireshark.org/review/25140
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-01-04 15:33:10 +00:00
Dario Lombardo ba3830e03b Qt: add conditional compilation in switches.
Compiling without pcap, the lack of all the cases causes an error.

../ui/qt/main_window_slots.cpp:756:13: error: enumeration values 'Capture',
'Update', and 'Fixed' not handled in switch [-Werror,-Wswitch]
    switch (ev->captureContext()) {
            ^
1 error generated.

Change-Id: I36c0bc854b1d864ebf54ac59ca15743918bc7d2b
Reviewed-on: https://code.wireshark.org/review/25127
Reviewed-by: Roland Knall <rknall@gmail.com>
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2018-01-04 13:20:26 +00:00
Gerald Combs 1e05c57cca Qt: Fix capture file properties averages.
Round our average packet sizes to the nearest whole number as described
in bug 9836 and change 687.

Change-Id: I842eca7650d19be66eb35c40a886bd591a86650d
Reviewed-on: https://code.wireshark.org/review/25129
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-01-04 11:57:50 +00:00
Stig Bjørlykke d1fe22d14e Qt: Use switch/case in MainWindow::captureEventHandler
Change-Id: I765667465e08ec51a107edbee3c2026a52cacb74
Reviewed-on: https://code.wireshark.org/review/25117
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-01-03 11:15:15 +00:00
Stig Bjørlykke a382ed35fe Qt: Fix CaptureEvent::Reload event handling
Fix an error introduced in signal/slot redesign in gd5d81518.

This error disabled all capture file menu items after doing a rescan,
like when adding a display filter.

Change-Id: Ib468051c15b9f1a15faa2ed07b958340b82a662b
Reviewed-on: https://code.wireshark.org/review/25116
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-01-03 09:37:32 +00:00
Roland Knall d20629e0f0 Build: Fix Ubuntu moc build
Includepaths for moc where not correctly applied

Change-Id: I1e3df133736372f3e4139957dc2e426f51764c86
Reviewed-on: https://code.wireshark.org/review/25108
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-01-02 10:59:26 +00:00
Gerald Combs 6f84e1b5f3 Qt: Fixup fieldSelected behavior.
Check the originating sender of fieldSelected in a couple of places so
that we don't re-emit it. This fixes an issue that was keeping the byte
view from marking the protocol.

Remove duplicate signal+slot connections in MainWindow.

Remove an unused member function.

Change-Id: Ia876bb4117d1e30a56f4c335a65f6976c8058f9d
Reviewed-on: https://code.wireshark.org/review/25077
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-31 08:48:22 +00:00
Gerald Combs f930710585 [Automatic update for 2017-12-31]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: I38b0274b93baf3e2d307827f04960f4bf7407842
Reviewed-on: https://code.wireshark.org/review/25080
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-12-31 08:16:15 +00:00
Dario Lombardo 5bdd333240 Qt: add check after cast.
CID: 1396367.
CID: 1373059.

Change-Id: Icf47537608166ccd7c2028b71c0169d3469da9c0
Reviewed-on: https://code.wireshark.org/review/25043
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-12-29 20:38:23 +00:00
Dario Lombardo c7c5e2abb1 Qt: handle a failed open file the right way (CID: 1159174).
Change-Id: Ia639a4b530cc9fdf7b72887031bc029c065d2162
Reviewed-on: https://code.wireshark.org/review/25048
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-12-29 20:35:41 +00:00
Dario Lombardo 727fac4559 Qt: remove unneeded check (CID: 1415729).
base_graph_ is always set in the constructor.

Change-Id: I760e26a612458c15b47cd5381a6b7eb284b2cdf4
Reviewed-on: https://code.wireshark.org/review/25041
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-12-29 20:29:13 +00:00
Dario Lombardo d5f0157c09 Qt: add initializers (CID: 1412975).
This commit completes change I5a161a98a90efb7dda95646c4f025c34623b0327,
incomplete by mistake.

Change-Id: I5236a8cd86b4955e5605c234bc04f832ff3e4f47
Reviewed-on: https://code.wireshark.org/review/25070
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-12-29 20:25:45 +00:00
Gerald Combs d089cca16b Qt: Miscellaneous translation hints.
Add QT_TR_NOOP and comments in a few places.

Change-Id: I77c964a4be463aa61de73fdd6af43623edc55474
Reviewed-on: https://code.wireshark.org/review/25051
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-29 14:15:21 +00:00
Michael Mann ead32b5628 Populate Remote Interfaces with data from recent file
Remote Interfaces have been saved in the recent_common file however
they were never populated by the GUI.

Bug: 8557
Change-Id: Ib68a75ce02f5b5e2c115b72d58c3e781a5122f9f
Reviewed-on: https://code.wireshark.org/review/25039
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-29 07:44:37 +00:00
Dario Lombardo 2677b07073 Qt: check preference existence.
CID: 1159290
CID: 1159292
CID: 1159290

Change-Id: I7c4218f3aa67a2eaea5b052c751cb8757bcd168d
Reviewed-on: https://code.wireshark.org/review/25047
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-12-29 01:39:20 +00:00
Dario Lombardo 422f1c0fb1 Qt: check return value of strtok() (CID: 1372271).
Change-Id: I588ecf79f53181af8ca48c5b32de54437d6275d3
Reviewed-on: https://code.wireshark.org/review/25044
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-12-29 01:33:17 +00:00
Dario Lombardo f8670a96c8 Qt: use QVariant::String instead of QMetaType::QString.
They both have the value 10, but the checks are run against methods
that return a QVariant::Type, then is formally more correct to use
that. This also removes the need for a cast.

CID: 1323929.
CID: 1311958.
CID: 1268202.
CID: 1268201.
CID: 1238868.

Change-Id: I792c0e3b70b0f181867648d8f47a02c675200b10
Reviewed-on: https://code.wireshark.org/review/25036
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-12-28 15:31:46 +00:00
Roland Knall b9341ad2d9 Qt: Fix moc interface issue
moc has an issue with interfaces defined in classes, where also other
Qt objects are being defined. At least in some versions for Qt, this
may lead to the interface declaration not being found

Change-Id: Id143311322086abe23085d2482957ec330ae67c8
Reviewed-on: https://code.wireshark.org/review/25032
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-12-28 12:31:24 +00:00
Roland Knall e3329cdc31 Qt: Remove duplicate copy actions
Remove the final copy actions from MainWindow and use DataPrinter instead.
This way, MainWindow no longer is involved in copying data, and the actions
purely are defined by DataPrinter

Change-Id: Ib70ad6394dee501bb2c8d58c9d174a0eb04b47de
Reviewed-on: https://code.wireshark.org/review/25031
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-12-28 11:26:25 +00:00
Martin Mathieson 25425839cf LTE stats: trivial changes after review
Change-Id: Ibcb755440180fc761a547de55d14c3fdc32973de
Reviewed-on: https://code.wireshark.org/review/25024
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-28 07:36:19 +00:00
Alexis La Goutte 9715aff0bd capture_file(.h): fix commas at the end of enumerator lists are a C++11 extension [-Wc++11-extensions]
Change-Id: I64c9fdefcf72add83944a6c38d5aa4e42dbaacb9
Reviewed-on: https://code.wireshark.org/review/25017
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-12-27 22:50:12 +00:00
Michael Mann e65ce97f1a Add template helper for simple Qt tree models
Provide template class for data item of a tree model that has
simple parent/child relationship and can handle the APIs necessary
to navigate between parent/children.

Also provide template class to shim between QAbstractItemModel
and inherited class to handle "tree navigation" API.  It's not
supported by Qt 4.8, so hold off on actually using it.

This saves a bunch of typing and enforces type safety.

Change-Id: I431dee73625f5335b45fe9c6e4c2973932860ad8
Reviewed-on: https://code.wireshark.org/review/24988
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-12-27 19:28:22 +00:00
Gerald Combs e641846837 Qt: Add "Copy as…" to the byte view.
Make ByteViewText an IDataPrintable and add "Copy as…" context menu
actions. Remove some unused functions.

Bug: 14276
Change-Id: Ie48c7c9b016de19fd8978397d03d23e9a7fe247a
Reviewed-on: https://code.wireshark.org/review/24933
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-12-27 18:19:10 +00:00
Michael Mann 777acc73da Apply new CaptureEvents to statistics dialogs.
Refactoring from If366d42b07dc822636404ac44ba2306ec4418b4e ignored
dialogs outside of the main window.  Searched for removed signals
from CaptureFile class and applied new CaptureEvent handling.

Change-Id: I9e0aaa0dc1c702ce04810d27c8f9273997f7ca30
Reviewed-on: https://code.wireshark.org/review/25007
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-12-27 08:08:10 +00:00
Michael Mann cb7eef8ff8 Convert Export Objects dialog to use a model.
Change-Id: I4be2c83755be95ab0deec15f066dd3e89b96a240
Reviewed-on: https://code.wireshark.org/review/25005
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-12-27 03:13:38 +00:00
Guy Harris 5153a7aba2 Don't close something we didn't manage to open.
Addresses Coverity CID 1426950.

Change-Id: I5e47d1ede0ed8a56597fe71dad5a3e48191a0ad8
Reviewed-on: https://code.wireshark.org/review/25003
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-12-26 19:42:04 +00:00
Martin Mathieson 540cdaf54c RLC Stats: SaveAs working for all columns
Note that when the iterator was used for the items within
the tree (in TapParameterDialog::getTreeAsString()), the
last 2 items/headers were not being seen.  Don't know why,
but when instead iterate by index, all column headers
are visible.

Change-Id: Ib5f38d1af0ecbefd400041584ba1d59d235dcbd1
Reviewed-on: https://code.wireshark.org/review/24969
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-26 12:03:32 +00:00
Martin Kaiser 971333665c qt: follow stream: use the new CaptureEvent signal
The signals related to capture events were refactored recently. Adjust
the follow stream dialogue to use the new CaptureEvent signal instead of
the now removed signal CaptureFileClosing.

Filter for context==file, event==closing in the signal handler.

Change-Id: I2d75b424fbf0a6734b0290aa205dd3d0c1ce053f
Reviewed-on: https://code.wireshark.org/review/24980
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-26 12:02:58 +00:00
Dario Lombardo b8ea5eb69d Qt: remove unneeded check.
CID: 1402186.
CID: 1402182.

Change-Id: Icaae5e8b0459a4df751e08f45ce3f461a21499e8
Reviewed-on: https://code.wireshark.org/review/24993
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-26 09:25:33 +00:00
Dario Lombardo 340fc6f08a Qt: rework ByteViewText::addFormatRange to avoid dead code (CID: 1426074).
Change-Id: I8341a6106cd38118f0bf1bdb87aa87cc90e89eee
Reviewed-on: https://code.wireshark.org/review/24966
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-12-25 03:09:25 +00:00
Gerald Combs c7ce426f84 [Automatic update for 2017-12-24]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: Ia4acffe0372de93476cb677b1859509cec39216a
Reviewed-on: https://code.wireshark.org/review/24974
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-12-24 08:10:41 +00:00
Michael Mann 386f354f87 Add Service Response Time dialog for SCSI.
SCSI requires parameter data to be passed into the tap.  Provide
a new dialog that can handle SCSI commands.

Bug: 14144
Change-Id: I4561f251ec38753a28befee33b8b994b04b92230
Reviewed-on: https://code.wireshark.org/review/24955
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-24 06:53:41 +00:00
Dario Lombardo c2dee33630 Qt: add initializer (CID: 1412975).
Change-Id: I5a161a98a90efb7dda95646c4f025c34623b0327
Reviewed-on: https://code.wireshark.org/review/24965
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-24 06:36:33 +00:00
Martin Mathieson c60d7bb199 LTE RLC stats: supply fields for Save As..
Also use double rather than float for bandwidth
calculations.

There is an issue where TapParameterDialog is not showing
the last 2 column headings - most likely because
2 of the column headings are not used by UE entries
(only channel entries).  Will investigate after this.

Change-Id: I3f691990b723434176060916153786665034b8d1
Reviewed-on: https://code.wireshark.org/review/24960
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2017-12-23 18:36:44 +00:00
Roland Knall d5d815189d Qt: Redesign signal/slot concept of capture_file
This is in preparation to make it easier for other classes
to get the right signals from the capture file. Also the decision
on what signals to listen to now resides with the final classes,
not main window, and it no longer needs to be changed if the
statusbar or wsapp needs additional signals.

Change-Id: If366d42b07dc822636404ac44ba2306ec4418b4e
Reviewed-on: https://code.wireshark.org/review/24941
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-12-23 09:41:46 +00:00
Dario Lombardo 8a83e4d9ea Qt: close file exiting from scope (CID: 1418343).
Change-Id: Ie54fcf5c16f98addd512ef8efcfadfebac56177a
Reviewed-on: https://code.wireshark.org/review/24954
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-12-23 01:13:50 +00:00
Michael Mann 54f6df525e RPC Service Response Time dialog: Fix crash
There were a few use-after-free situations.  Fix one by using epan API
to get program name for tap structure.
tap structure shouldn't be deleted because it's needed.  Will be freed
by the tap reset/free function.

Change-Id: Ia18d84340362839926036c777106ca1c6d1b18f5
Ping-Bug: 14141
Reviewed-on: https://code.wireshark.org/review/24950
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-12-23 01:08:31 +00:00
Dario Lombardo 8a961e8e15 Qt: add missing break (CID: 1426884).
Change-Id: I2fb495ca59ca5f6a659287f7140328f8850f732b
Reviewed-on: https://code.wireshark.org/review/24944
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2017-12-22 16:23:00 +00:00
Pascal Quantin 4bba969698 byte_view_text.cpp: add initializers to please GCC 7.2.1
Even if a code review suggests that they are not required, it silence 2
compiler warnings.

Change-Id: I9ea45dd6759275dd8a2b8fc48fc41d0a9cecbcc2
Reviewed-on: https://code.wireshark.org/review/24942
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-12-22 14:18:08 +00:00
Gerald Combs 9354901dd1 Qt: Lighten non-printable byte view characters.
Draw non-printable characters using a lighter foreground color in the
byte view.

Change-Id: Ib97a1f9f897fa6f78e33ff80c7efea21f68ef2d5
Reviewed-on: https://code.wireshark.org/review/24935
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-12-22 13:05:35 +00:00
Martin Mathieson cf9d7fb8a5 LTE MAC stats: save to file, ue entries only
Change-Id: I25f3b1b793861aeb066739290db5e9ebd0e0b596
Reviewed-on: https://code.wireshark.org/review/24934
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2017-12-22 09:32:50 +00:00
Gerald Combs 46a35e5004 Qt: Add back byte view hover.
Add back the byte view hover behavior. Draw an overline+underline when
hovering to make it a bit less distracting and to make hovered vs marked
modes more obvious. Update names to match.

Change-Id: I554d1cad98199f08f1c19796b14d158ad41706b4
Reviewed-on: https://code.wireshark.org/review/24932
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-12-21 22:06:57 +00:00
Roland Knall 57d54a2fc0 Qt: Filter Dissector tables properly
Also cleanup the code a little bit

Change-Id: I53097478fafa46249fa6ecb52508d9bc5b963caa
Reviewed-on: https://code.wireshark.org/review/24908
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-12-20 19:42:11 +00:00
Stig Bjørlykke 153d588972 Qt: Improve ColumnEditorFrame stretching
Use more free space in the ColumnEditorFrame for the Fields entry.

Change-Id: I6bdf2c6ce187dbd2aae08da00d99bda683dc5970
Reviewed-on: https://code.wireshark.org/review/24907
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-12-20 19:40:40 +00:00
Gerald Combs 6d38bc00db Qt: Fix DataPrinter hex conversions.
Add casts so that we call the unsigned version of QString::arg. We
aren't modifying the byte array and want to avoid deep copies so
constify it.

Change-Id: I2dcdeeab87bb0f810ffd4d36d41d1e47256d487e
Reviewed-on: https://code.wireshark.org/review/24901
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-12-20 14:10:31 +00:00
Stig Bjørlykke 0b30fb239f Qt: Add new keyboard shortcuts
Add Ctrl+Shift+I for "Apply as Column"
Add Ctrl+Shift+O for "Show Packet Bytes"

Also added "Show Packet bytes" to the "Analyze" menu.

Change-Id: I03e39bf92c254cf33bef73b1356ad576c92241d2
Reviewed-on: https://code.wireshark.org/review/24906
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-12-20 08:39:47 +00:00
Michael Mann 8521dbbe67 Convert Dissector Tables dialog to use model
Now with searchability!

Change-Id: I6ab4e89d4080d3599d522807d39de80cc46e7360
Reviewed-on: https://code.wireshark.org/review/24898
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-12-19 21:00:24 +00:00
Stig Bjørlykke c781cc38fd Qt: Avoid using cmd+H as keyboard shortcut on macOS
The keyboard shortcut Ctrl+H (cmd+H) is used on macOS to "Hide Wireshark".
Change shortcut for "Export Packet Bytes" to Ctrl+Shift+X.

Change-Id: I2d39911f83bc2aaf20930cda303741fa89738767
Reviewed-on: https://code.wireshark.org/review/24895
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-12-19 20:24:50 +00:00
Michael Mann 1bdececdb2 Fix some copy/paste errors with new models.
Change-Id: Ic018fafece38ef0e49321ef9ea5351848d5dd486
Reviewed-on: https://code.wireshark.org/review/24899
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-12-19 20:15:44 +00:00
Dario Lombardo 106e0b4ee0 Qt: add initializers (CID: 1426703).
Change-Id: Ib75685a099449672b55d63b647fd0f579ad1e5f6
Reviewed-on: https://code.wireshark.org/review/24893
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-19 14:12:21 +00:00
Roland Knall 4db038aa28 Qt: Fix sorting of enabled protocols description
Change-Id: Ifa7b6e61927615c342839b6c2e7d012198a5f939
Reviewed-on: https://code.wireshark.org/review/24892
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-12-19 09:54:59 +00:00
Michael Mann 0d6eb9631f Convert Enabled protocols dialog to use model.
Change-Id: I618df2f2608adcd1be5da02262c5296e4d86cfba
Reviewed-on: https://code.wireshark.org/review/24866
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-12-19 08:21:19 +00:00
Stig Bjørlykke 7cb6255f17 Qt: Resolve duplicate keyboard shortcuts
Two Edit->Copy methods are using the same keyboard shortcut as other
functionality:

1. Ctrl+Shift+D is used for "Copy this item's description" and
   "Ignore All Displayed packets"

2. Ctrl+Shift+F is used for "Copy this item's field name" and
   "Reload as File Format/Capture"

Resolve this by changing the Copy methods to use Ctrl+Alt+Shift as modifier.
Add a keyboard shortcut for "Copy all visible items" while here.

Change-Id: I0d963501055e63963d93e211f592aa9e82801d3c
Reviewed-on: https://code.wireshark.org/review/24884
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-19 04:47:42 +00:00
Stig Bjørlykke 9f7b8713fa Qt: Add Collapse Subtrees
This item is missing from the Qt port.

Change-Id: Iacc18a7c2eb2368d6566622788a4e900868d446e
Reviewed-on: https://code.wireshark.org/review/24879
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-19 04:46:49 +00:00
Gerald Combs 3c87991c28 -1 is a valid tree_type value.
Adjust tree_expanded and FieldInformation::treeType accordingly.

Change-Id: I9b12c28550ba2639f636531a7ea1841df0638b5e
Reviewed-on: https://code.wireshark.org/review/24844
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-18 04:28:06 +00:00
Gerald Combs 9761e27939 Qt: Process our event loop less often at startup.
Add back info_update_freq_ and use it to skip event loop processing.

Change-Id: Id36b4786c5ff1458abbf12f4e9ded13c56e14d57
Reviewed-on: https://code.wireshark.org/review/24876
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-18 04:25:34 +00:00
Gerald Combs 50be2bde1a Qt: Handle RecentFileStatus destruction manually.
Restore the "deleteLater" behavior removed in 889aacae6e so that we
don't trigger an assert in debug builds.

Move the itemStatusFinished connection to RecentFileStatus while we're
here.

Bug: 14279
Change-Id: I79bc74d77fb3ad970c7c8a71037f680d55eac47c
Reviewed-on: https://code.wireshark.org/review/24875
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-12-17 23:59:43 +00:00
Gerald Combs f37e759f41 [Automatic update for 2017-12-17]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: Ideac9831381dbf6411af0e1d8bfa4fef6a1d7769
Reviewed-on: https://code.wireshark.org/review/24867
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-12-17 08:17:00 +00:00
Gerald Combs 889aacae6e Qt: Update our recent status sooner at startup.
Update our recent file status as soon as we read recent_common.

Run recent stats updates in the global thread pool.

Revert 15a97b5986 since it's no longer needed.

Change-Id: If1b08ea640dfcad26affab5d20c80c90fbf133f2
Reviewed-on: https://code.wireshark.org/review/24862
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-17 08:04:03 +00:00
Martin Mathieson cd573915ea LTE RLC graph: export graph as image, like TCP stream does
Change-Id: I8709f7c09528a44a9729a06ea2ba4d6f99dbeccb
Reviewed-on: https://code.wireshark.org/review/24864
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-17 08:02:34 +00:00
Martin Mathieson f4b2263a0b Simple statistics export: fill in callback to get item data
Bug: 13942

Change-Id: Ie7d13b1c17083d0a5b98282f04e6ac30319352a7
Reviewed-on: https://code.wireshark.org/review/24853
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-17 07:59:42 +00:00
Michael Mann 0b88544b07 Fix memory leaks in Expert Info dialog
Models and children weren't deleted which leaked memory all over the place.

Change-Id: I961016b2501ad8cc8c75cf5fa5b0c86756a29382
Reviewed-on: https://code.wireshark.org/review/24858
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-12-16 15:41:21 +00:00
Michael Mann 68668b785c Convert Supported Protocols dialog to use model
Also have search file search name, filter and description columns

Change-Id: Id519c5b1deb4a80e3b95437cf2e6d3e9510e4b11
Reviewed-on: https://code.wireshark.org/review/24857
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-12-16 15:20:50 +00:00
Martin Kaiser b2e6d615c2 qt: follow stream: prevent duplicate close
621498f88e fixed a crash that's caused by
closing the follow stream dialogue multiple times. Another way to get a
similar crash is to press the Back or "Filter out this stream" buttons
again while we're already about to close.

Ignore the two buttons in this case.

Change-Id: Ia8d7b3ca500db2519a784b42c0744e2527b9d5f6
Reviewed-on: https://code.wireshark.org/review/24839
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-12-16 05:21:25 +00:00
Gerald Combs 15a97b5986 Qt: Show our recent files earlier.
Show the recent file list before it's been scanned so that the welcome
screen layout will be complete by the time we're done initializing.

Change-Id: I09f0a68c6d36f30e7cdb2958f82af38f52444c34
Reviewed-on: https://code.wireshark.org/review/24849
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-12-16 00:31:40 +00:00
Stig Bjørlykke 3071356d9e Qt: A node without a child can not be expanded
Change-Id: I28bb5797e8eab69c761e257b90a11c646d06cf68
Reviewed-on: https://code.wireshark.org/review/24845
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-12-15 23:56:41 +00:00
Gerald Combs cf5a58f72a Qt: Initialize QFontDatabase in a worker thread.
QFontDatabase uses an internal list of system fonts which might take a
while to initialize depending on your platform and hardware. On my
notebook here it takes about 45 to 50 ms. Create a worker thread for
QFontDatabase initialization similar to QMimeDatabase.

Change-Id: Ieff683b023537a6c104a80f2611ea1e966b65610
Reviewed-on: https://code.wireshark.org/review/24841
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-12-15 22:07:34 +00:00
Gerald Combs bdb6baa740 Qt: Switch ProtoTree to a treeview+model.
Add a ProtoTreeModel and use it in ProtoTree. This should make the UI
more responsive when we have lots of items in the tree.

Change-Id: Id26e6bcff84663867a8da17fd9ae86ff639b633f
Reviewed-on: https://code.wireshark.org/review/24774
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-15 20:58:14 +00:00
Stig Bjørlykke a51ac8d398 Qt: Fix translating some texts
Change-Id: I8267bfd96efe9d9d086913ff418a74a68e63b8da
Reviewed-on: https://code.wireshark.org/review/24837
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-12-15 16:48:00 +00:00
Gerald Combs 90102ad12e Remove a plugin_if_gui_cb type conversion.
We always pass a GHashTable * to plugin_if_gui_cb so don't cast it to a
gconstpointer. This should fix the following and related warnings:

main_window.cpp: In function ‘void plugin_if_mainwindow_apply_filter(gconstpointer)’:
main_window.cpp:121:44: warning: cast from type ‘gconstpointer {aka const void*}’ to type ‘GHashTable* {aka _GHashTable*}’ casts away qualifiers [-Wcast-qual]
     GHashTable * data_set = (GHashTable *) user_data;

Fix another const warning while we're here.

Change-Id: Ia9225188bfb913feb4fef4369f10fd5791fc8dc9
Reviewed-on: https://code.wireshark.org/review/24830
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-12-14 23:43:38 +00:00
Gerald Combs 629596ebef Qt: Constify a variable.
Change-Id: Icb3ce93d24ffbdf4ac6d3b70e7baa1f991169ac3
Reviewed-on: https://code.wireshark.org/review/24823
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-12-14 20:27:09 +00:00
Gerald Combs db740987ff Qt: Add and use qUtf8Printable.
Qt 5.4 introduced qUtf8Printable, a convenience macro for converting
QString to a UTF-8 const char *. Add a compatibility definition and
start using it.

Change-Id: I3cf88611b1ed1a34082cb2ba82394954e2e6c461
Reviewed-on: https://code.wireshark.org/review/24828
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-12-14 20:26:52 +00:00
Guy Harris 6d30df0cdd Replace a comma with a semicolon, which it presumably was intended to be.
Change-Id: I308752a50b465a2772172c3500f6417a3ae19f11
Reviewed-on: https://code.wireshark.org/review/24816
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-12-14 02:39:22 +00:00
Gerald Combs c781bd4110 Qt: Fix a cast.
Just use a const_cast instead of messing with compiler settings.

Change-Id: I35d3498ac4c2817d02cbf11497a70f72b60b58bb
Reviewed-on: https://code.wireshark.org/review/24815
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-12-14 01:08:12 +00:00
Roland Knall 801ee01aff Qt: Add ui, qrc and qm files to source
Autogen had the resulting effect, that IDE's no longer see
those files as part of the source tree, and therefore do not
show them. This fixes it.

Change-Id: Ia1f259743ba5b63f5bc47da79afca90a9fabc07b
Reviewed-on: https://code.wireshark.org/review/24794
Petri-Dish: Roland Knall <rknall@gmail.com>
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-12-13 18:19:05 +00:00
Michael Mann b0112e60ad Add a model to use for Expert Info dialog.
With the model (and proxy), the following features were added/fixed.
1. Expert severities can be filtered by type
2. Search filter expanded to include summary, protocol and column info
3. Expert info starts with all items collapsed.
4. Context menus for collapse/expand all

Bug: 11753
Bug: 13831
Bug: 13842
Change-Id: I8e89c7be441e1f08e18915ef8805609e5c5d0bd1
Reviewed-on: https://code.wireshark.org/review/22458
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-12-13 16:07:07 +00:00
Martin Kaiser 621498f88e qt: follow stream: fix crash during close
The Follow Stream dialogue's button "Filter out this stream" filters out
the stream's packets and then closes the Follow Stream dialogue. This may
take a moment. If the user presses the Close button while the filtering
is still running, the dialogue will be closed twice. This causes a crash
which can be seen in ASAN builds.

==9485==ERROR: AddressSanitizer: SEGV on unknown address 0x60205e80001b (pc 0x7f923e672b8c sp 0x7fff73104600 bp 0x7fff73104600 T0)
    #0 0x7f923e672b8b in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) (/usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x2d9b8b)
    #1 0x7f924f46010b in QApplicationPrivate::notify_helper(QObject*, QEvent*) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x13f10b)
    #2 0x7f924f4655ff in QApplication::notify(QObject*, QEvent*) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x1445ff)
    #3 0x7f923e672dca in QCoreApplication::notifyInternal(QObject*, QEvent*) (/usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x2d9dca)
    #4 0x7f924f49ae54 in QWidgetPrivate::close_helper(QWidgetPrivate::CloseMode) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x179e54)
    #5 0x55f3e249582f in FollowStreamDialog::close() /media/sf_wireshark.git/ui/qt/follow_stream_dialog.cpp:327
    #6 0x55f3e236e534 in FollowStreamDialog::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) ui/qt/moc_follow_stream_dialog.cpp:155
...
SUMMARY: AddressSanitizer: SEGV ??:0 QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*)
==9485==ABORTING

Ignore the Close button if we know that we'll be closing the dialogue shortly.

Change-Id: Ibf1684fd75937e6b24fcb9ea62ae6acb038260e6
Reviewed-on: https://code.wireshark.org/review/24777
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-12-12 12:52:16 +00:00
João Valverde 7617af1d89 Fix make distcheck
Change-Id: I0c5a31d423d19071dc6ed0a42b064271e5f63fd2
Reviewed-on: https://code.wireshark.org/review/24769
Reviewed-by: João Valverde <j@v6e.pt>
2017-12-11 20:21:09 +00:00
João Valverde 5fc43fe63a Rewrite make-tap-reg.py in C
Change-Id: Ief5b1fffecc9712c01ff10292c403b7c84a5908a
Reviewed-on: https://code.wireshark.org/review/24756
Reviewed-by: João Valverde <j@v6e.pt>
2017-12-11 02:52:28 +00:00
Gerald Combs 91548948bb [Automatic update for 2017-12-10]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: If3becbd6b66f0a7a49a80c4ff2dc2a2a6015fa16
Reviewed-on: https://code.wireshark.org/review/24752
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-12-10 08:16:52 +00:00
Gerald Combs d0d1eaadf0 Win32: Add checks for _WIN32_WINNT and NTDDI_VERSION.
Check to see if we're the source of truth for _WIN32_WINNT and
NTDDI_VERSION in config.h and emit a compiler error if we aren't.

Rearrange the #includes in ui/qt/data_printer.cpp so that config.h is
included first. This fixes the following:

   136>C:\buildbot\wireshark\wireshark-master-64\windows-2016-x64\build\cmbuild\config.h(411): warning C4005: 'NTDDI_VERSION': macro redefinition (compiling source file C:\buildbot\wireshark\wireshark-master-64\windows-2016-x64\build\ui\qt\utils\data_printer.cpp) [C:\buildbot\wireshark\wireshark-master-64\windows-2016-x64\build\cmbuild\ui\qt\qtui.vcxproj]
         C:\Program Files (x86)\Windows Kits\10\Include\10.0.15063.0\shared\sdkddkver.h(223): note: see previous definition of 'NTDDI_VERSION' (compiling source file C:\buildbot\wireshark\wireshark-master-64\windows-2016-x64\build\ui\qt\utils\data_printer.cpp)
   136>C:\buildbot\wireshark\wireshark-master-64\windows-2016-x64\build\cmbuild\config.h(412): warning C4005: '_WIN32_WINNT': macro redefinition (compiling source file C:\buildbot\wireshark\wireshark-master-64\windows-2016-x64\build\ui\qt\utils\data_printer.cpp) [C:\buildbot\wireshark\wireshark-master-64\windows-2016-x64\build\cmbuild\ui\qt\qtui.vcxproj]
         C:\Program Files (x86)\Windows Kits\10\Include\10.0.15063.0\shared\sdkddkver.h(213): note: see previous definition of '_WIN32_WINNT' (compiling source file C:\buildbot\wireshark\wireshark-master-64\windows-2016-x64\build\ui\qt\utils\data_printer.cpp)

Change-Id: I90886cb9450463d768d6529ccd678ca11508cde2
Reviewed-on: https://code.wireshark.org/review/24744
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-10 07:50:14 +00:00
Martin Mathieson d96ef7ed05 Allow switching direction in LTE RLC graph
Change-Id: I1681089aebe7f00b2b84ece00c53a3bf8769d50b
Reviewed-on: https://code.wireshark.org/review/24682
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2017-12-09 13:58:19 +00:00
Guy Harris 8aa14236f8 Have the frame_tvbuff.c routines not use the global cfile.
Have the routines that create them take a pointer to a struct
packet_provider_data, store that in the tvbuff data, and use it to get
the wtap from which packets are being read.

While we're at it, don't include globals.h in any header files, and
include it in source files iff the source file actually uses cfile.  Add
whatever includes that requires.

Change-Id: I9f1ee391f951dc427ff62c80f67aa4877a37c229
Reviewed-on: https://code.wireshark.org/review/24733
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-12-08 08:31:41 +00:00
Guy Harris 797d2f6a87 Move the frame_set stuff back into the capture_file structure.
libwireshark now expects an epan_t to be created with a pointer to a
"packet provider" structure; that structure is opaque within
libwireshark, and a pointer to it is passed to the callbacks that
provide interface names, interface, descriptions, user comments, and
packet time stamps, and that set user comments.  The code that calls
epan_new() is expected to provide those callbacks, and to define the
structure, which can be used by the providers.  If none of the callbacks
need that extra information, the "packet provider" structure can be
null.

Have a "file" packet provider for all the programs that provide packets
from a file.

Change-Id: I4b5709a3dd7b098ebd7d2a7d95bcdd7b5903c1a0
Reviewed-on: https://code.wireshark.org/review/24731
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-12-08 03:32:25 +00:00
Gerald Combs 847585f938 More QVector fixes.
Change-Id: I710f9c9d5391a8f1252cc02fdd263a8dfedb31f6
Reviewed-on: https://code.wireshark.org/review/24730
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-12-08 02:22:00 +00:00
Gerald Combs 683087628b Qt: Fix ByteViewText compilation for Qt < 5.5.
Older versions of Qt don't let you pass a QVector to QVector::append.

Change-Id: I58d62c44aa915d4ffb8319e08db85eee069ecbb2
Reviewed-on: https://code.wireshark.org/review/24729
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-12-07 23:27:38 +00:00
Gerald Combs be8a400053 Qt: Use QTextLayout in ByteViewText.
Use QTextLayout to draw each line in ByteViewText instead of drawing
fragments ourselves. Build our pixel-to-byte-offset map when we draw our
first line, which should hopefully make it more accurate. This should
fix layout and hover issues on some systems.

Start moving common code to DataPrinter.

Mark prefs.gui_hex_dump_highlight_style GTK+ only.

Bug: 11844
Change-Id: Ifda16ae7dc1a5ea22570c0bfd0eb20cee621bfc9
Reviewed-on: https://code.wireshark.org/review/24717
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-12-07 19:00:35 +00:00
Gerald Combs 99ea13988d Qt: Speed up the splash overlay.
Instead of blurring the main welcome screen during startup, draw a dark
band under the progress bar. This reduces the startup time a bit here.

Port over a date check from the GTK+ UI.

Change-Id: I997d0fd2e4320702fe85ee2aea02ce835a423df9
Reviewed-on: https://code.wireshark.org/review/24711
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-12-06 00:46:38 +00:00
Gerald Combs abcb7ec875 Convert the file set dialog treewidget to a treeview+model.
Add a FilesetEntryModel and use it in FileSetDialog. This should be
faster than using a QTreeWidget. Move dialog updates and date
calculations out of the "add file" loop.

Bug: 11280
Bug: 14242
Change-Id: I702cef4fe91e739695fe805dc5e496bf3db411f1
Reviewed-on: https://code.wireshark.org/review/24708
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-12-05 18:27:23 +00:00
Martin Mathieson e5f884c8b0 Show retx prev and next framenum types as chevrons
Change-Id: I1641c70130a7562db9ea099770d8b5a7fe6e5532
Reviewed-on: https://code.wireshark.org/review/24676
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-04 05:51:55 +00:00
Martin Mathieson 5350fd741f RLC LTE graph: add comments clarifying tracer limitation
Change-Id: Ib6a79689ced9377b1ac00513810db2e86d26d83f
Reviewed-on: https://code.wireshark.org/review/24690
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-04 05:49:49 +00:00
Guy Harris ccc55bc80c Put the structure of a capture_file back in cfile.h.
The split isn't necessary now that epan no longer uses the capture_file
structure.

Change-Id: Ia232712a2fb5db511865805518e8d03509b2167f
Reviewed-on: https://code.wireshark.org/review/24693
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-12-04 05:35:36 +00:00
Guy Harris 1834dca365 Move the parts of a capture_file used by libwireshark to a new structure.
Embed one of those structures in a capture_file, and have a struct
epan_session point to that structure rather than to a capture_file.
Pass that structure to the routines that fetch data that libwireshark
uses when dissecting.

That separates the stuff that libwireshark expects from the stuff that
it doesn't look at.

Change-Id: Ia3cd28efb9622476437a2ce32204597fae720877
Reviewed-on: https://code.wireshark.org/review/24692
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-12-04 05:02:18 +00:00
Guy Harris eb8ffb74e2 Use cfile.h to define the capture_file type.
Have cfile-int.h declare the structure, and use it in files that
directly access the structure.

Have cfile.h just incompletely declare the structure and include it
rather than explicitly declaring it in source files or other header
files.

Never directly refer to struct _capture_file except when typedeffing
capture_file.

Add #includes as necessary, now that cfile.h doesn't drag in a ton of

Change-Id: I7931c8039d75ff7c980b0f2a6e221f20e602a556
Reviewed-on: https://code.wireshark.org/review/24686
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-12-03 18:54:37 +00:00
Gerald Combs 114c989fb3 [Automatic update for 2017-12-03]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: I4a3a5f62e5024a4df19c12296ddd67012c9ff5c7
Reviewed-on: https://code.wireshark.org/review/24683
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-12-03 16:56:48 +00:00
Peter Wu bb4726abf2 Qt: fix crash when selecting field with composite data
The HTTP2 decompressed headers tab is composed from multiple TVBs, these
have a null "real_data" pointer. Do not access it directly but use an
accessor which Does The Right Thing™.

Change-Id: Ib974fed9782d60aa2b91e3e712ba737000b79b4b
Fixes: v2.5.0rc0-1627-g8a6ea0e454 ("Qt: Further cleanup ByteView")
Reviewed-on: https://code.wireshark.org/review/24658
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Alexander Gryanko <xpahos@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-11-30 02:53:34 +00:00
Martin Mathieson 52365a55e4 LTE L2 protocols: add FT_FRAMENUM_TYPE for most FT_FRAMENUM fields.
Missed out some that would probably result in too many links.
Added FT_FRAMENUM_RETRANS_PREV and FT_FRAMENUM_RETRANS_NEXT to enum,
these display as arrows like REQUEST and RESPONSE do.

Change-Id: I6e8d222955f2ba59a713e8a389837b55a1c7f262
Reviewed-on: https://code.wireshark.org/review/24600
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2017-11-29 21:21:09 +00:00
Peter Wu e29378b030 Qt: fix role check in AStringListListUrlProxyModel::data
Change-Id: I7c683449155f7dcb63731e6575cf92c30be78934
Fixes: v2.5.0rc0-1841-gd865871627 ("Qt: About Dialog move to QTreeView and fix copy")
Reviewed-on: https://code.wireshark.org/review/24637
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-11-29 03:53:26 +00:00
Guy Harris ae65dc20ea Report the actual *error* for CANT_GET_INTERFACE_LIST.
CANT_GET_INTERFACE_LIST does *NOT* mean "No remote interfaces found.",
as in "there are no remote interfaces"; a NULL return from
get_remote_interface_list() and an err value of 0 means that.
CANT_GET_INTERFACE_LIST means "something bad happened and the error
string says what it is".  Display that error string, so when people
report problems:

	https://github.com/the-tcpdump-group/libpcap/issues/666

they'll give the actual error message, and I'll fix my breakage of the
rpcap protocol negotiation:

	2972769d03

rather than just wondering what the problem was and asking the reporter
of the problem for more information.

Report anything other than "there are no remote interfaces" as an error,
not a warning.

Change-Id: Ia9381953d080e037254f21e47ee7ecc4619b7254
Reviewed-on: https://code.wireshark.org/review/24627
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-11-28 23:06:48 +00:00
Stig Bjørlykke 1e892a1db6 Qt: Small layout improvement in preferences
Make PacketList settings look like the StatusBar settings.
Remove unneeded QVBoxLayout.

Change-Id: Id1910b2cf4cc5d3ab52d2abd781045ad4033469a
Reviewed-on: https://code.wireshark.org/review/24618
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-11-28 21:09:58 +00:00
Michael Mann 9c6d2af0ae Qt: Add support for DCE/RPC in Decode As
DCE/RPC is a FT_GUID type, but has some special handling.  "Regular"
FT_GUID dissector tables still not supported.

Bug: 13122
Change-Id: I328776ffe5bbe87ecfbe6719f04d18b1b237a583
Reviewed-on: https://code.wireshark.org/review/24602
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-28 16:32:57 +00:00
Roland Knall d865871627 Qt: About Dialog move to QTreeView and fix copy
- Fix an issue, where the url was opened twice on Linux
- Make the filter case insensitive if so wished for
- Allow the copy to either copy the selected column (just Copy) or copy the complete row, with tab separation
- Move to QTreeView instead to make it similar to the rest of the tables

Change-Id: Ie6064f2ad2014e24546553c5febe63358e2f69ec
Reviewed-on: https://code.wireshark.org/review/24570
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jim Young <jim.young.ws@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-26 15:57:56 +00:00
Gerald Combs 9b7ad9c20e [Automatic update for 2017-11-26]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: I2963633f86a87209eca574db52663ebbe732f9d9
Reviewed-on: https://code.wireshark.org/review/24590
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-11-26 08:16:20 +00:00
Martin Mathieson fdeaaa362a LTE MAC stats: make display filter field work
Change-Id: I76b97f4f67ba63f7479dffc1cf1267b39cefa4fa
Reviewed-on: https://code.wireshark.org/review/24582
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2017-11-25 15:35:28 +00:00
Stig Bjørlykke 89ae2826d6 Qt: AccordionFrame users keyPressEvent() fixes
- Declare keyPressEvent() virtual.
- Give keyPressEvent() to parent when done.

Change-Id: If1c05e86a5ab71dd239c025cdb2bcfb1ef484811
Reviewed-on: https://code.wireshark.org/review/24573
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-25 09:30:21 +00:00
Martin Mathieson e1f3d9dcbe LTE RLC Stats: make display filter field work.
Change-Id: Ic3c9ebb176bcc7c3973aca382c270aacac7283af
TODO: the same for LTE MAC Stats..
Reviewed-on: https://code.wireshark.org/review/24577
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-25 09:29:45 +00:00
Martin Mathieson cf110add65 RLC LTE stats: show UE and channel bw properly
Change-Id: I49edf405d61b15ba451f291c32b8fc3126a7e9d7
Reviewed-on: https://code.wireshark.org/review/24575
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-25 09:05:42 +00:00
Roland Knall 1ecad01420 Qt: About - implement copy&paste and urls
Make the URLs clickable again, and allow the copy/paste of
selected entries via context menu

Change-Id: I619059ca77c54314df31364de8ee7fce9dbc3ed3
Reviewed-on: https://code.wireshark.org/review/24569
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-11-24 11:02:24 +00:00
Stig Bjørlykke b99677dea9 Qt: Add key event to reject changes in AddressEditorFrame
Also give focus to the name field.

Change-Id: I409d48e513c04b510f1e3d838c05e1518e6d2e9d
Reviewed-on: https://code.wireshark.org/review/24547
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-24 05:17:28 +00:00
Roland Knall 73c01d6d05 Qt: Rewrite the About dialog to use models
Rewrite of the about dialog, to use QTableView and Models
instead of HTML files.

Everything is now model based, and the model is generic enough
to support any variation which can be put into a QStringList row.

Change-Id: Ie32bf66b2fe2a7754c0bf07205a7b068d46b0070
Reviewed-on: https://code.wireshark.org/review/24534
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-24 05:17:07 +00:00
João Valverde 8fa4a440a8 GTK: Remove packet editor
Removes limited experimental feature for deprecated UI.

Change-Id: Ib3ccfae89dd2a674ebbde346a442fa1cf6587f26
Reviewed-on: https://code.wireshark.org/review/24563
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-24 05:13:42 +00:00
Martin Mathieson e7b12d8550 LTE RLC graph: 'r' should reset, not zoom out
Change-Id: I34ad795b5c4f3f5d47b357d3af1de1f4b5fe481b
Reviewed-on: https://code.wireshark.org/review/24561
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-24 05:12:01 +00:00
Michael Mann 76d7b7a519 Qt: Add menu option to remove all packet comments
Bug: 14186
Change-Id: I8793078ea50379b2f9697787e6b7a8ab2d9e3e0e
Reviewed-on: https://code.wireshark.org/review/24558
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-11-23 20:45:41 +00:00
Stig Bjørlykke 80424d135f Qt: Make InterfaceFrame use QFrame
It's no need for InterfaceFrame to use AccordionFrame.

Change-Id: Iccef1bcf919d7e5ec2bf818802ef68c1faf4e4a3
Reviewed-on: https://code.wireshark.org/review/24548
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-11-23 14:49:19 +00:00
João Valverde 7540ac6938 Move the protocol registration routines back into libwireshark
Follow-up to b695b3e2f7.

Change-Id: I7e36519f2c3806c1205d05437671325080974257
Reviewed-on: https://code.wireshark.org/review/24524
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2017-11-21 20:21:50 +00:00
Roland Knall 1470aeef4c Qt: Remove merge issue from Drag Drop
Remove a remissent merge artefact

Change-Id: I4c53d4b2adef124712091c40efccc1cad3db3301
Reviewed-on: https://code.wireshark.org/review/24521
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-11-21 09:50:39 +00:00
Stig Bjørlykke 90e236fd09 Qt: Main Welcome hover sparkline color fix.
Use the default text color for sparkline in hovered items.  This makes
the selected item look the same as non-selected items when hovering.

This is related to g1ed38dc2.

Change-Id: I96ba349067cf7d398d11425cfa5ada5e5b4d587c
Reviewed-on: https://code.wireshark.org/review/24516
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-11-21 07:38:38 +00:00
Gerald Combs 23b6028e1d Qt: Remove an unused variable.
Change-Id: Iba1abe66cfa4d39e95cf85b9fc866789151127f9
Reviewed-on: https://code.wireshark.org/review/24517
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-11-21 00:23:12 +00:00
Gerald Combs dd562b503f Qt: Move the MIME init thread to WiresharkApplication.
The Qt 4.8 "Starting a Thread" document at
http://doc.qt.io/qt-4.8/threads-starting.html says,

"Note that you must create the QApplication (or QCoreApplication) object
 before you can create a QThread."

It looks like this changed some time around Qt 5.5 or 5.6, e.g.
https://codereview.qt-project.org/#/c/120793/, but just to be safe move
the MIME database initialization thread to WiresharkApplication. We
start reading the database later than I'd like, but it's still early
enough to make a difference here.

QMimeDatabase was added in Qt 5.0. Add version checks.

Change-Id: Ic80ebb8692e93b1e4aea7a8670f4fcf45e385b29
Reviewed-on: https://code.wireshark.org/review/24512
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-11-20 22:08:09 +00:00
Roland Knall 6917ec769e Qt: Fix various smalles issues with drag-drop
Cleanup adding a filter and implement some
sanity checks in the drop code

Change-Id: I1778be16abdea3f93ed11fc610962c4a23f10a2f
Reviewed-on: https://code.wireshark.org/review/24505
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-11-20 14:56:23 +00:00
Roland Knall 61bd626d5d Qt: Fix Activation of menus
Fixes the bug, where submenu items are not properly activated

Bug: 14232
Change-Id: I007010310dfa8a6c7eba3ba8cdf3eac74701b0ba
Reviewed-on: https://code.wireshark.org/review/24493
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-11-19 17:28:41 +00:00
Gerald Combs 1b79315aac [Automatic update for 2017-11-19]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: I52c4830ef81733156fa4ce0de65330c8aacd8932
Reviewed-on: https://code.wireshark.org/review/24487
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-11-19 08:17:16 +00:00
João Valverde 1097e8020a autotools: Library build products don't need explicit cleaning
Change-Id: I5d68c05f2844d6c9ae486531b189dbf10bc09cff
Reviewed-on: https://code.wireshark.org/review/24484
Reviewed-by: João Valverde <j@v6e.pt>
2017-11-18 22:29:41 +00:00
Roland Knall 18d49f467d Qt: Properly reset the byteview
Reset the byteview on every load of a capture file, and on every
start/reset of a capture

Change-Id: I0edd30ffddc64484bc6f009d99dfc6fc1a3ceb59
Reviewed-on: https://code.wireshark.org/review/24468
Reviewed-by: Roland Knall <rknall@gmail.com>
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-18 07:23:48 +00:00
Gerald Combs 658578a5b9 Qt: Initialize QMimeDatabase in a worker thread.
As part of its initialization, QMimeDatabase parses the freedesktop.org
shared-mime-info database, which is a large-ish (2 - 4 MB) XML file.
This takes about 85 - 90 ms here.

We first access QMimeDatabase in our startup sequence when we load the
normal and capture application icons. Create a worker thread that
initializes QMimeDatabase as early as possible and load load the normal
and capture icons as late as possible.

Change-Id: I27e3d65d8ee1308a62d12d3ff7e1b95f82c2e75a
Reviewed-on: https://code.wireshark.org/review/24471
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-11-17 20:26:27 +00:00
Roland Knall 71cec74ccb Qt: Fix selection of elements
If two elements existed with the same filter expression, the first
element got selected allways. This is much more secure, as it only
takes the label into account. If the user by accident created two
buttons with the same filter expression, but different label and
wants to remove the second button, the first one no longer will be
removed instead of the second one.

Change-Id: I16130aa69cb853aedb9a5c9b0bbbb3eb64b467d1
Reviewed-on: https://code.wireshark.org/review/24399
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-11-17 14:10:29 +00:00
Gerald Combs ac1d52aff5 Register protocols and handoffs in separate threads.
Instead of interleaving protocol registrations and status callbacks in
the main thread, move protocol registrations to a worker thread. Do the
same with protocol handoffs. This *should* be safe since the status
callbacks only update the UI.

This reduces startup time by about 200ms on my laptop:

Run     OS    Thread?    Time
  1   macOS      N      340 ms
  2   macOS      N      260 ms
  3   macOS      N      252 ms
  4   macOS      Y      147 ms
  5   macOS      Y      146 ms
  6   macOS      Y      142 ms
  7   Win 7      N       80 samples
  8   Win 7      N       56 samples
  9   Win 7      N       75 samples
 10   Win 7      Y       31 samples
 11   Win 7      Y        2 samples
 12   Win 7      Y        0 samples

macOS was sampled using Instruments. Windows 7 was sampled using the
Visual Studio 2015 profiler.

We should do the same thing with our capture and tap event loops, but
that will likely require quite a bit more work.

Change-Id: Iac9a81d8f71668f5979b524744a03f6d80aee893
Reviewed-on: https://code.wireshark.org/review/24447
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-16 06:11:55 +00:00
Stig Bjørlykke 665eb78729 Qt: Add UAT move up and down buttons
Add two new buttons for moving entries up and down in the list.

Change-Id: I90e5c5812754391651885e2a622148cecc124099
Reviewed-on: https://code.wireshark.org/review/24413
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-16 06:10:47 +00:00
Stig Bjørlykke 8d9fbdf851 Qt: Show as much as possible of UAT pathLabel
Remove the horizontal spacer between buttons an path label in UAT
views to show as much as possible of the path label.

Change-Id: I99d21ff6a1d151c9fcf83200a88b34b2e0c8eb5d
Reviewed-on: https://code.wireshark.org/review/24444
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-11-15 15:09:40 +00:00
Stig Bjørlykke 129ffaf11b Qt: Update UAT clear button enabling
Check for enabling the clear button when loading a UatFrame.

Change-Id: Id9bbe4f99314d2798c4bccf10b57db99431a00fd
Reviewed-on: https://code.wireshark.org/review/24412
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-11-15 07:21:31 +00:00
Roland Knall 7c40580584 Qt: Really fix the packet list selection
Really fix the selection of a row in the packet list

Change-Id: I87ab36146bd9b2a130f443717ce73609a1c0b656
Reviewed-on: https://code.wireshark.org/review/24397
Reviewed-by: Roland Knall <rknall@gmail.com>
Petri-Dish: Roland Knall <rknall@gmail.com>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-13 05:20:52 +00:00
Roland Knall 58a44aef23 Qt: ToolbarMimeData and display
Implement the mime data for the toolbar in the same fashion as it
has been done for the drag-drop of the field filter.

Change-Id: I2b1ac7f82b637c999f458700c9ab24a9e4dcbcb8
Reviewed-on: https://code.wireshark.org/review/24378
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-11-12 22:17:29 +00:00
Stig Bjørlykke 3105382bed Qt: Show ByteView for first packet
Change-Id: Ie5b09f0ac8db0adb999633f3367339b8f50eabe9
Reviewed-on: https://code.wireshark.org/review/24395
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-11-12 19:47:12 +00:00
Stig Bjørlykke b5a1145cf1 Qt: Select correct packet from list
Change-Id: Id29d74506f7f009b7f14a86d8fc7c299711c4c2c
Reviewed-on: https://code.wireshark.org/review/24393
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-11-12 19:35:38 +00:00
Roland Knall e13e2df9a1 Qt: Rename packetSelection to frameSelected
In order to consolidate the interfaces between certain parts of the UI,
the signal emitted after a frame change has occured, has to include the
number of the frame. This led to two signals for frame change, and therefore
packetSelection is to be removed.

Change-Id: I24e0e0890291d2243935b0c48387beb66904bfa3
Reviewed-on: https://code.wireshark.org/review/24377
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-11-12 17:18:44 +00:00
Roland Knall 447291d84a Qt: Fix DragDrop on ProtoTree
Fix two issues, first that you could not move the scrollbar as it would
initiate a drag-drop operation. Second, if you start a drag-drop operation
at the top of a field, it would select the field you move over as well.

Change-Id: I553785b1b6c586919e025d3042a876701f36860d
Reviewed-on: https://code.wireshark.org/review/24376
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-11-12 15:07:54 +00:00
Roland Knall 8e5436687a Qt: Clear up the label
The modifier key is a hidden option for now, with the label only
showing the filter expression and the description

Change-Id: I4c983ed0d4fadbd69f0836ecfc85ea8e1109478e
Reviewed-on: https://code.wireshark.org/review/24379
Reviewed-by: Roland Knall <rknall@gmail.com>
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-11-12 12:28:25 +00:00
Roland Knall 98ca698a37 Qt: Add Modifier to drop only field
Add a modifier to the drag-drop operation, to only drop the field
name as filter, instead of the complete filter expression

Change-Id: I9da96906575397191e821e3494a42e0f10d51f45
Reviewed-on: https://code.wireshark.org/review/24375
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-11-12 10:49:08 +00:00
Peter Wu e95623cd6b Qt: do not crash when selecting a field without tvb
If no tvb is attached to a field, crashing is not the expected result.

Change-Id: Ica0e95326cfcfeb015016770d1b930a9f0447066
Fixes: v2.5.0rc0-1627-g8a6ea0e454 ("Qt: Further cleanup ByteView")
Ping-Bug: 14205
Reviewed-on: https://code.wireshark.org/review/24370
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-11-12 09:43:37 +00:00
Gerald Combs 5bd8fb4131 [Automatic update for 2017-11-12]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: I18adb8aceae2a8962697284087d43e3b30d133f1
Reviewed-on: https://code.wireshark.org/review/24371
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-11-12 08:11:18 +00:00
Peter Wu bce5b50f73 Qt: Fix use-after-free crashes when changing packets
QTabWidget::clear() is documented to remove all tabs without deleting
them. As a result, findByteViewTextForTvb will still find ByteViewText
children with freed tvbs. Fix this by deleting the tabs too.

Change-Id: I5b4fdc7154a3804e3bd5f360749e95d178ffe580
Bug: 14199
Fixes: v2.5.0rc0-1532-g56a130a152 ("ByteViewText: Remove epan dependancy")
Reviewed-on: https://code.wireshark.org/review/24339
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-11-11 08:59:28 +00:00
Peter Wu 7cbbbe0bde Qt: avoid undefined behavior in ProtoTree::eventFilter
UBSan complains about "ev" being a "QEvent" rather than a QMouseEvent.

Change-Id: I9e59ffbe16df2ef20b7856e6dd2d9ef246632de6
Fixes: v2.5.0rc0-1608-g4d6454e180 ("Qt: Drag n Drop Filter expression from Packet Tree")
Reviewed-on: https://code.wireshark.org/review/24338
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-11-11 08:58:25 +00:00
Michael Mann cb7e896a4a Add frame number to packet comment dialog
Bug: 14185
Change-Id: I9f52999339d3c34502d4e046e22f05a83fa773bb
Reviewed-on: https://code.wireshark.org/review/24330
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-11-10 03:57:17 +00:00
Dario Lombardo 50b91d0b4d qt: add constructor to proto_tree (CID: 1420705).
Change-Id: I60a07ef6c8006ad8f4b6a5f25c2b4f2b1cb32766
Reviewed-on: https://code.wireshark.org/review/24326
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-11-09 19:57:54 +00:00
João Valverde 3bc743a9fd autotools: Fix build for unknown Qt interface
Change-Id: Ibba717da1fa6cf9b87fc1972e83b0e637e54fd80
Reviewed-on: https://code.wireshark.org/review/24324
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2017-11-09 17:19:08 +00:00
Stig Bjørlykke c57ab694ec Qt: Give focus to preference value in PreferenceEditorFrame
Select the preference value text and give focus when editing
a single preference.

Ping-Bug: 14191
Change-Id: I8d5f91c40118b9d74f1a65f5311aa92dfeb3e1b7
Reviewed-on: https://code.wireshark.org/review/24306
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-11-09 07:36:20 +00:00
Stig Bjørlykke 25c5d830c9 Qt: Give focus to Title in ColumnEditorFrame
Select the title text and give focus to the title when Edit Column.

Bug: 14191
Change-Id: I04fc5f6bcc830a15ef43fa2d06a1a729df52e370
Reviewed-on: https://code.wireshark.org/review/24305
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-11-09 07:35:48 +00:00
Peter Wu 35a1907fe6 iograph: Use default graph values if io_graphs UAT file doesn't pass validation
Change-Id: I70c8ca7b5b31d284a12220fc6ce2a764ea9fbe6b
Fixes: v2.5.0rc0-631-g5b3e3ee587 ("Use UAT model for I/O graph")
Reviewed-on: https://code.wireshark.org/review/23366
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-08 22:07:44 +00:00
Roland Knall 8a6ea0e454 Qt: Further cleanup ByteView
This further separates ByteView and the rest of the system.

Using FieldInformation and DataPrinter, this is the final cleanup
of the ByteViewTab

Change-Id: If41521167527cf5664c2564cdd0d45fea0f3f612
Reviewed-on: https://code.wireshark.org/review/22783
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-11-08 20:20:31 +00:00
Roland Knall 4a1f8f5f27 Qt: ReleaseNotes and reformatting of Drag n' Drop
Added ReleaseNotes and changed the representation

Change-Id: Ica927368ef6c5d912a29e06733ad0a95e1886077
Reviewed-on: https://code.wireshark.org/review/24291
Petri-Dish: Roland Knall <rknall@gmail.com>
Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-11-08 08:58:29 +00:00
Roland Knall 96735846be Qt: Clean Drag-n-Drop Mimetype for toolbar
Cleans up the mime type to use a class instead of a mimetype
string

Change-Id: I122ba9b39de86d8e263f2204715911a2b0ac75cd
Reviewed-on: https://code.wireshark.org/review/24286
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-11-08 07:26:03 +00:00
Roland Knall 4d6454e180 Qt: Drag n Drop Filter expression from Packet Tree
Drag and Drop a field from the packet tree to the displayfilteredit
or the toolbar and drop it there to either apply the filter (or prepare
it by holding down the Shift key) or create a new toolbar button

Change-Id: I42645a02223c71315e91e0d58eb1b54ebab4fd58
Reviewed-on: https://code.wireshark.org/review/24280
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-11-08 07:25:54 +00:00
Paul Offord d84d43372c Improvement to plugin_if_get_ws_info(...) functionality
A plugin can register an initialisation function to be called each time
Wireshark opens a new capture file. If plugin_if_get_ws_info(...) is
called from within the initialisation function it does not return the
name of the file being opened.  This is because
plugin_if_get_ws_info(...), through calls to a number of other
functions, gets the file name details from a capture_file structure.  At
the time of the call to the plugins initialisation function, the
capture_file structure in question has not yet been created.

This change ensures that if plugin_if_get_ws_info(...) is called from a
plugin's initialisation function, the name of the file to be open is
correctly returned. The change also fixes a bug where
plugin_if_ws_get(...) returns an incorrect file state if called from a
plugin initialisation function.

Bug: 14165
Change-Id: I28c85e480db96852e11bbaa14fb1f434b457ed52
Reviewed-on: https://code.wireshark.org/review/24251
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-07 11:50:23 +00:00
Simon Barber fa2649ac61 wireless_timeline: fix blank display
Sometimes when a file opens the timeline does not display, also sometimes when
zooming it disappears.

Change-Id: I141eaef5f332a1de9af133abbeccede7c1cf5502
Reviewed-on: https://code.wireshark.org/review/24209
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-11-07 10:39:24 +00:00
Roland Knall 68ead1d025 Qt: Fix drag-n-drop in toolbar
Fixing two crashes in the toolbar, first one only appeared on mac,
the second one happens every time the toolbar is removed or updated

Change-Id: Ic3075a5af1b4a566e09bbce9712c968c053cc727
Reviewed-on: https://code.wireshark.org/review/24244
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-11-05 08:28:10 +00:00
Gerald Combs aed3e66672 [Automatic update for 2017-11-05]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: I4abb96429b1ad8c6d78a129efd453f3019669f4f
Reviewed-on: https://code.wireshark.org/review/24245
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-11-05 08:16:13 +00:00
Roland Knall 649c81b83c Qt: ByteViewTab Fix tabs creation
Fix creation of tabs

Change-Id: I11b22a3964f7c25c0c88b8ecd4eec1ad480fe800
Reviewed-on: https://code.wireshark.org/review/24202
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-10-31 14:45:21 +00:00
Roland Knall 56a130a152 ByteViewText: Remove epan dependancy
Remove all dependancy for the byte_view_text from the epan system,
and therefore cleanly separate data and display for further separation
of dissection and view

Change-Id: Id1ee91b93da4511afa95f24da4cbbf39cbb89b1f
Reviewed-on: https://code.wireshark.org/review/24050
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-10-31 11:42:21 +00:00
Michael Mann 63966ec5d5 Use endpoint_type in conversation tables and hostlists
Follow up to having conversions use endpoint_type instead of
port_type.

Change-Id: Ifd59a33bd8b9a013c242bce5fcceb09533f02c17
Reviewed-on: https://code.wireshark.org/review/24172
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-10-29 20:17:03 +00:00
Gerald Combs 930f634515 [Automatic update for 2017-10-29]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: Ia316bd89a4a8d08237b0e5eb9f0036dc5a6bad61
Reviewed-on: https://code.wireshark.org/review/24157
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-10-29 08:18:13 +00:00
Michael Mann 7dbc520d57 Privatize the conversation_key structure
The intention is to make it more transparent when making a switch
to an "endpoint" over address/port combination.

Change-Id: Ic424c32095ecb103bcb4f7f4079c549de2c8d9c4
Reviewed-on: https://code.wireshark.org/review/24148
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-10-28 19:22:24 +00:00
Michael Mann 23afd9a184 Convert to using find_conversation_pinfo where appropriate
This makes it easier to identify the simpler/common conversations

Change-Id: I7094f23e49156ee27f5f72c8e130308470f3e462
Reviewed-on: https://code.wireshark.org/review/24145
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-10-28 14:33:11 +00:00
Michael Mann 087faa2488 Always provide value for Decode As selector column
Previous logic required multiple values from the decode as structure in
order to provide an initial value.  This was incorrect and led to
values from protocol not selected showing in the selector column.

Change-Id: If1ad5085f4a6eb8d79fc5dd72be968188051ec4e
Reviewed-on: https://code.wireshark.org/review/24122
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-10-28 00:24:42 +00:00
Guy Harris 458c3c026e Add a ws_in6_addr typedef for struct e_in6_addr.
That allows a parallel typedef of ws_in4_addr for guint32.

Change-Id: I03b230247065e0e3840eb87635315a8e523ef562
Reviewed-on: https://code.wireshark.org/review/24073
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-10-26 08:50:34 +00:00
Eldon Stegall c7918da8a6 Improve http object export for URLs with long extensions
This allows the export of objects with extensions that may be longer
than the allowed file name of an export (due to underlying filesystem, etc).
The extension detection mechanism previously preserved everything in the file
name after the final ".", but in some cases (especially with long query strings)
this would exceed the allowed maximum file length, and simply refuse to export
the object. Now, if the length of the extension and duplicate number is longer
than the allowable file length, the extension is ignored, and the entire string
is truncated to allow an acceptable export filename.

Bug: 14130
Change-Id: I6fa0281519d031c07a9ac621002ac328f34f54cc
Reviewed-on: https://code.wireshark.org/review/23960
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-10-23 04:42:51 +00:00
Michael Mann 182d9deb08 Add "Apply as filter" button to Coloring Rules Dialog
Add a button to apply currently selected color as the display filter.

Bug: 14100
Change-Id: Ife3edeb577075f1fe30b649a5655ef5887684d8a
Reviewed-on: https://code.wireshark.org/review/24012
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-10-22 21:34:55 +00:00
Gerald Combs ce3ce9e70e [Automatic update for 2017-10-22]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: I973703f2a82c96e47ec15512e223766404a6d3a1
Reviewed-on: https://code.wireshark.org/review/24021
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-10-22 17:06:16 +00:00
Gerald Combs b0432442c6 [Automatic update for 2017-10-22]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: I2bc1e987630e05d2942e9405ab45e4c2f7452263
Reviewed-on: https://code.wireshark.org/review/24013
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-10-22 08:13:34 +00:00
Michael Mann 61380f9504 Add button in Qt UAT dialog/frame to remove all UAT entries at once.
Change-Id: If5a172cd69beeb0b9a22eb7f6b9e7cb25f350b49
Reviewed-on: https://code.wireshark.org/review/23968
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-10-21 16:33:03 +00:00
Peter Wu 0088d010ed Qt: fix crash after loading SRT dialog
TapParameterDialog::on_applyFilterButton_clicked first calls fillTree to
populate the table and endRetapPackets to add the results to GUI. The
table data must remain valid until closing the dialog since the user can
still interact with the GUI.

Change-Id: Ie3105be78d39c562af52f2b49081552063afcada
Ping-Bug: 14141
Reviewed-on: https://code.wireshark.org/review/23994
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-10-20 12:13:02 +00:00
Peter Wu 4273eced0c cmake: fix Qt build with CMake 3.0.0 and 3.0.1
AUTOUIC fails to generate some ui_*.h files because of a bug that was
fixed in CMake 3.0.2: https://cmake.org/Bug/view.php?id=14981

Change-Id: I964d991c7edefcea55ae43b0768a7fd3503f94a9
Fixes: v2.5.0rc0-1366-gdfa893b1cf ("cmake: set CMAKE_AUTOUIC and CMAKE_AUTORCC to avoid CMP0071 warning")
Reviewed-on: https://code.wireshark.org/review/23993
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-10-20 03:00:57 +00:00
Peter Wu dfa893b1cf cmake: set CMAKE_AUTOUIC and CMAKE_AUTORCC to avoid CMP0071 warning
CMake 3.10 adds CMP0071 which results in warnings about applying AUTOMOC
and AUTOUIC on generated files. It somehow tries to do this for files
generated by QT5_ADD_RESOURCES and QT5_WRAP_UI.

As a workaround, just convert from the legacy macros to the new method.
Autogenerated ui_*.h and moc_*.h will now also be shown in the "External
Dependencies" tab in Visual Studio

Change-Id: I36df2212bbf0f938fcd4560000031b6137db93ca
Reviewed-on: https://code.wireshark.org/review/23917
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-10-18 07:33:42 +00:00
Michael Mann 560945336c Bugfix Decode As dissector table selection.
Need to use UI name to select between different tables.

Change-Id: I2f25435e6ac1a2f1a15e651cd3ef1bbc9e860d89
Reviewed-on: https://code.wireshark.org/review/23952
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-10-17 03:29:32 +00:00
João Valverde 9764cd0a83 autotools: make maintainer-clean should allow rerunning 'configure'
Change-Id: Iedae94ffefe27b13b1967d69cacb757b5aa4576d
Reviewed-on: https://code.wireshark.org/review/23928
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
2017-10-15 14:17:20 +00:00
Ahmad Fatoum 9d49e13166 Remove superfluous null-checks before strdup/free
NULL checks were removed for following free functions:

- g_free "If mem is NULL it simply returns"
  https://developer.gnome.org/glib/stable/glib-Memory-Allocation.html#g-free

- g_slist_free(_full)? "NULL is considered to be the empty list"
  https://developer.gnome.org/glib/stable/glib-Singly-Linked-Lists.html

- g_strfreev "If str_array is NULL, this function simply returns."
  https://developer.gnome.org/glib/stable/glib-String-Utility-Functions.html#g-strfreev

- g_slice_free "If mem is NULL, this macro does nothing."
  https://developer.gnome.org/glib/stable/glib-Memory-Slices.html#g-slice-free

- g_match_info_free "not NULL... otherwise does nothing"
  https://developer.gnome.org/glib/stable/glib-Perl-compatible-regular-expressions.html#g-match-info-free

- dfilter_free defined in Wireshark code. Returns early when passed NULL
  epan/dfilter/dfilter.c

They were also removed around calls to g_strdup where applicable:

- g_strdup "If str is NULL it returns NULL."
  https://developer.gnome.org/glib/stable/glib-String-Utility-Functions.html#g-strdup

Change-Id: Ie80c2db89bef531edc3aed7b7c9f654e1d654d04
Reviewed-on: https://code.wireshark.org/review/23406
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
2017-10-15 12:38:51 +00:00
Peter Wu 1dea7f3dc1 Rename ui_util.h -> ws_ui_util.h
In preparation for possibly using AUTOUIC in CMake which treats "ui_*.h"
files specially, rename ui_util.h. No other changes.

Change-Id: Id026572c000b713ff0e9388dc7fff8d81d4df73e
Reviewed-on: https://code.wireshark.org/review/23916
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-10-15 01:14:26 +00:00
João Valverde 9bba3866ff CMake: Allow user build flags to override default build flags
Autotools has the very useful feature by design of allowing the user
to override the default build flags (you break it you keep it).

Apparently CMake applies COMPILE_OPTIONS target property after
CMAKE_{C,CXX}_FLAGS so that doesn't work here. Prepend our flags to those
variables instead to make it work then.

Specific target flag overrides can still be added with COMPILER_OPTIONS
(e.g: generated files with -Wno-warning) but this is less effective and
then we're back at the point where this overrides user flags. It's less
of a concern though.

Change-Id: I44761a79be4289238e02d4e781fef0099628817b
Reviewed-on: https://code.wireshark.org/review/23675
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-10-13 21:32:18 +00:00
Mikael Kanstrup 5a99830e21 Qt: Free dynamic menu actions at shutdown
Some menu actions registered at startup are not freed at shutdown
making Valgrind complain. Fix by clearing the lists holding them
and making sure all actions have a parent to free them.

Bug: 14071
Change-Id: I8d99d062d394a7262b0f9b7ddea4ed71049636ac
Reviewed-on: https://code.wireshark.org/review/23793
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-10-05 04:21:46 +00:00
Mikael Kanstrup 867e6f0e00 qt: Fix leaked dialogs
Some dialogs are allocated on heap but not freed when the dialog
boxes are closed. This means one dialog instance is leaked each
time opened/closed. Also dialogs being subclasses of
GeometryStateDialog means they might lack a parent reference and
are not automatically freed on application shutdown either.

Fix these leaks by letting the dialogs automatically destroy
themselves on close (via WA_DeleteOnClose).

Capture filter, display filter and capture interfaces dialogs are
also leaked on application shutdown. These dialogs are protected by
a NULL check that at least prevent multiple instances. Though
none of them are freed on application shutdown. Fix leaks by
freeing when main window is destroyed.

Bug: 14071
Change-Id: I8c5c5a75ad3c89abb5996941875ba5d616a22d9c
Reviewed-on: https://code.wireshark.org/review/23747
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-10-05 04:21:22 +00:00
cheloftus 70996dc669 Qt: add preference to restore display filter after Follow Stream
Added new user preference 'restore_filter_after_following_stream',
defaults to false.
When true, the current display filter is restored after following a stream.

Change-Id: I153107761003658c6d7f1464711da7b3adeb60a8
Reviewed-on: https://code.wireshark.org/review/22455
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-10-04 03:59:38 +00:00
Alexis La Goutte dcf7ca7abd interface_toolbar (Qt): fix commas at the end of enumerator lists are a C++11 extension [-Wc++11-extensions]
Change-Id: I36ea982656e45855b357e071bcca7c6f3d12d03f
Reviewed-on: https://code.wireshark.org/review/23825
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-10-03 11:45:21 +00:00
Martin Kaiser d8903ce397 simplify some include file paths
For both autotools and cmake, the top-level source directory is always
part of the search path for include files. For include files in this
directory, we can simply use the file name. There's no need for a
relative path.

Change-Id: Ibf46265d91b5cb9bff4fa791e5b1d69ee3c1e165
Reviewed-on: https://code.wireshark.org/review/23798
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-10-01 15:10:19 +00:00