Commit Graph

386 Commits

Author SHA1 Message Date
Pau Espin 866178eb1f GTK+Qt: Show Osmux Packet Counter on Telephony menu
Change-Id: I565b0d2d43dd98781f77a302a20bd841e3e4650e
Reviewed-on: https://code.wireshark.org/review/21598
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2017-05-28 18:50:06 +00:00
Stig Bjørlykke 6bc71e4d0a Qt: Add check for packet bytes
Disable menu items handling packet bytes if not having any.

Bug: 13723
Change-Id: I9cdb1185910f865c61a8ee74e3cf3177159bf315
Reviewed-on: https://code.wireshark.org/review/21710
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-05-19 21:31:50 +00:00
Stig Bjørlykke 81bad32f2c Qt: Remove semicolon behind Q_UNUSED macro, part 2
Change-Id: Id27a93c9a76b554bb2e98199d08d3d9604550889
Reviewed-on: https://code.wireshark.org/review/21348
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-04-26 06:27:37 +00:00
Stig Bjørlykke 30d98d1ea9 Qt: Remove semicolon behind Q_UNUSED macro
Change-Id: I75ff975216da23447b94bc513671ac269c52b7dc
Reviewed-on: https://code.wireshark.org/review/21342
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-04-26 06:11:32 +00:00
Dario Lombardo 0557fe1446 Qt: fix compilation without pcap.
Change-Id: Ia0fe79157f21fd0b1c0e5195c902ae07c55ca253
Reviewed-on: https://code.wireshark.org/review/21343
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-25 23:14:00 +00:00
Stig Bjørlykke 77751c94f1 Qt: Add interface toolbar support
An extcap utility can provide configuration for controls to use in a
GUI interface toolbar.  This controls are bidirectional and can be
used to control the extcap utility while capturing.

This is useful in scenarios where configuration can be done based on
findings in the capture process, setting temporary values or give other
inputs without restarting current capture.

Todo:
- Add support for Windows

Change-Id: Ie15fa67f92eb27d8b73df6bb36f66b9a7d81932d
Reviewed-on: https://code.wireshark.org/review/19982
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-04-25 06:19:39 +00:00
Stig Bjørlykke 951cf710e8 Qt: AdditionalToolbars is a menu
Rename actionViewAdditionalToolbars to menuAdditionalToolbars
because this is a menu, not an action.

Change-Id: I85e45c065f415ffa008792f04127d81283e54b7e
Reviewed-on: https://code.wireshark.org/review/21181
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-04-18 09:21:30 +00:00
Guy Harris 2c44a7f930 Clean up handling of enabled/disabled protocols/heuristic dissectors.
Add a "report a warning message" routine to the "report_err" code in
libwsutil, and rename files and routines appropriately, as they don't
only handle errors any more.

Have a routine read_enabled_and_disabled_protos() that reads all the
files that enable or disable protocols or heuristic dissectors, enables
and disables them based on the contents of those files, and reports
errors itself (as warnings) using the new "report a warning message"
routine.  Fix that error reporting to report separately on the disabled
protocols, enabled protocols, and heuristic dissectors files.

Have a routine to set up the enabled and disabled protocols and
heuristic dissectors from the command-line arguments, so it's done the
same way in all programs.

If we try to enable or disable an unknown heuristic dissector via a
command-line argument, report an error.

Update a bunch of comments.

Update the name of disabled_protos_cleanup(), as it cleans up
information for disabled *and* enabled protocols and for heuristic
dissectors.

Support the command-line flags to enable and disable protocols and
heuristic dissectors in tfshark.

Change-Id: I9b8bd29947cccdf6dc34a0540b5509ef941391df
Reviewed-on: https://code.wireshark.org/review/20966
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-08 20:40:08 +00:00
Guy Harris 357cfd3b03 A bunch of "{Mac} OS X" -> "macOS" changes.
Avoid anachronisms, however; there was no "macOS 10.0" or even "OS X
10.0", for example.  It was "Mac OS X" until 10.8 (although 10.7 was
sometimes called "OS X" and sometimes called "Mac OS X"), and it was "OS
X" from 10.8 to 10.11.

Change-Id: Ie4a848997dcc6c45c2245c1fb84ec526032375c3
Reviewed-on: https://code.wireshark.org/review/20933
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-05 19:16:22 +00:00
Peter Wu 601fe5e351 Qt: propagate selection from main screen to dialog
Ensure that the selection in main screen is updated on refreshing
interfaces (InterfaceFrame::interfaceListChanged). Add additional
patches to ensure that selection changes from the main screen propagate
to the dialog and be careful to avoid infinite recursions.

Life of a signal for InterfaceFrame:

    ui->interfaceTree->selectionModel emits selectionChanged
    -> slot InterfaceFrame::interfaceTreeSelectionChanged
      -> emits InterfaceFrame::itemSelectionChanged
        -> slot MainWelcome::interfaceSelected
           -> emits MainWelcome::interfacesChanged
              -> slot CaptureInterfacesDialog::interfaceSelected
                 (updats dialog selection)

Life of a signal for CaptureInterfacesDialog:

    ui->interfaceTree emits itemSelectionChanged
    -> slot CaptureInterfacesDialog::interfaceSelected
       (emission of next signal because sender is ui->interfaceTree)
       -> emits CaptureInterfacesDialog::interfacesChanged
          -> slot InterfaceFrame::updateSelectedInterfaces
             (updates main screen selection)

This should probably be updated to model/view with shared selection
model in the future.

Change-Id: Ibb32c201a92bd2f1310523b3e6e63b03209c9ce4
Reviewed-on: https://code.wireshark.org/review/20487
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-03-29 15:16:56 +00:00
Stig Bjørlykke cf1d07c8e3 Qt: Apply selected bookmark display filter
When selecting a display filter from the bookmark list this filter
should be applied, because that's the most common action for a user.

Holding down the the Alt key will only prepare the filter.

Change-Id: I567ee8a2a70a3de07fea33fa5763d9efba591de3
Reviewed-on: https://code.wireshark.org/review/20317
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-03-04 00:57:09 +00:00
Gerald Combs 8e76cfbf54 Qt: Add selection history navigation.
Add the ability to move back and forth in the packet selection history
similar to GTK+. Update the documentation accordingly.

Change-Id: If1fdc1e59b240c0588c292dc0f7f0a5f083c30e1
Reviewed-on: https://code.wireshark.org/review/20320
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-03-03 05:02:14 +00:00
Stig Bjørlykke beea6736ab Qt: Code cleanup
Remove whitespace to match coding style used in file.

Change-Id: I4c1649aa02087cd39b2f516db6e40749899c5125
Reviewed-on: https://code.wireshark.org/review/20260
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-02-24 09:11:47 +00:00
Roland Knall 321386e9f4 PluginIF: AdditionalToolbar
Creates an interface for plugins and other parts of the code, to
add a new toolbar to the system and have various widget types interact
with this toolbar.

All toolbars added via this interface, will be added to an additional
submenu called "Additional Toolbars" within Wireshark.

Also a demo plugin is being provided, demonstrating various features
of the toolbar, including updating the gui elements. It also demonstrates
how to update toolbar items.

Change-Id: I8d0351224b3d7f4b90220d58970b51695551d7e3
Reviewed-on: https://code.wireshark.org/review/19803
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-02-24 08:12:46 +00:00
Stig Bjørlykke a4d7793b4c Qt: Avoid flicker in filter expressions toolbar
Calling adjustSize() on the display filter toolbar causes flicker
in the filter expression toolbar when switching between profiles
without buttons and in some cases changing to a profile without buttons.

Only calling adjustSize() if adding buttons should be fine to avoid
this issues, even if they may be caused by something else.

Change-Id: I8cca84a51dbbc8244dc4342ac0466e35884c294d
Reviewed-on: https://code.wireshark.org/review/20222
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-02-22 05:37:49 +00:00
Stig Bjørlykke 6c654861d9 Qt: Mystery pixel issue is solved
The mystery pixel issue has probably been mysteriously solved earlier
because the adjustments does not work as expected now.

This fixes an issue where one of the panes increases with 1 pixel at
startup and when changing profile using layout type 3, 4, 5 and 6
(selection number 1, 4, 5 and 6 in “Preferences -> Appearance -> Layout”).

Change-Id: Iab36fa5303dc8628b21e5cf920e7c70a7167d76e
Reviewed-on: https://code.wireshark.org/review/20188
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-02-20 05:54:19 +00:00
Stig Bjørlykke b3f435ef54 Qt: Add "Reset Layout"
Add menu item "Reset Layout" to manually reset panes to equal sizes.

Change-Id: I1efbf655462e25053062e03f8038dc20f9f555c0
Reviewed-on: https://code.wireshark.org/review/20173
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-02-20 05:53:44 +00:00
Stig Bjørlykke 14e19128dc Qt: Disable pane menu items if not used in layout
If a pane is not used in the layout it should not be possible to show
and hide this from the menu, as this may give unexpected results.

Change-Id: I335168e66e1dffc89992cad480dd7daaea7e9d59
Reviewed-on: https://code.wireshark.org/review/20140
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-02-16 20:53:22 +00:00
Stig Bjørlykke 384c26622b Qt: Preserve pane sizes when layout content changed
Preserve pane sizes when rearranging layout content in the
preferences dialog.

Change-Id: I2af2a60424a7bf94f1f92e7c63e6a1823985b60d
Reviewed-on: https://code.wireshark.org/review/20145
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-02-16 20:53:00 +00:00
Stig Bjørlykke e2cef4cbbd Qt: Improved pane size auto detect
Split panes in exactly equal sizes.

Change-Id: I4b984931e860160791497a299011489aa26ad4ef
Reviewed-on: https://code.wireshark.org/review/20139
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-02-16 12:57:55 +00:00
Stig Bjørlykke a98eb3c312 Qt: Auto detect pane size when configured zero
The recent file configuration for pane sizes states that
“pane size of zero will auto detect”, so ensure we do this in
all cases where the settings may be zero.

This affects initial startup, Default profile reset and new profiles.

Change-Id: I1430ec1a83b7fb294b92837476f2bf9472384e45
Reviewed-on: https://code.wireshark.org/review/20121
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-02-16 05:13:50 +00:00
Stig Bjørlykke d718b1d7e1 Qt: Preserve pane sizes when changing profile
When changing between profiles having certain different layout types
the size of the last pane was calculated wrong.

This involves switching between this layout types:

   2 -> 3   2 -> 5   3 -> 1   3 -> 2   3 -> 4   3 -> 5
   4 -> 3   4 -> 5   5 -> 2   5 -> 3   5 -> 4   5 -> 6

Change-Id: I6ee3ed92c4c639b720587c0771be0a242e5a8793
Reviewed-on: https://code.wireshark.org/review/20116
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-02-16 05:08:45 +00:00
Stig Bjørlykke 6313e96e27 Qt: Hide "Go to Packet" frame when closing capture file.
The "Go to Packet" frame cannot be used without a capture file so
ensure we hide this when closing a capture file.

Change-Id: I339bc90b87181a8361e9f0bf27dfdf26d2f05333
Reviewed-on: https://code.wireshark.org/review/19783
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-01-27 05:07:14 +00:00
Gerald Combs a5fe96e50a Qt: Fixup drag and drop merging.
Make the behavior of MainWindow::dropEvent match the documentation and
dnd_open_file_cmd. If we've been passed a single file, open it. If we've
been passed multiple files, merge them first. Add an is_tempfile
parameter to openCaptureFile.

Add a note about setting the drop description on Windows.

Bug: 12129
Change-Id: I325a4da5a29e940b4efa7654627d8bcafba15b57
Reviewed-on: https://code.wireshark.org/review/19717
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-01-21 06:50:56 +00:00
Gerald Combs 05fbb4826b Qt: Show merge progress.
Add "file merge" callback plumbing. Use it to display "Merging files" in
the main statusbar.

Make sure we have a usable window pointer when we merge files.

Change-Id: I236b6edb30685f0b06703ab8304bc88ae592f83c
Reviewed-on: https://code.wireshark.org/review/19716
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-01-21 06:50:30 +00:00
Roland Knall 3df81a0550 Qt: Remove unneccessary Q_DECLARE_METATYPE
Remove unnecessary Q_DECLARE_METATYPE macros and replace calls
to QVariant conversions with VariantPointer where necessary

Change-Id: Ia4690590095f930bf94644197de7fa30b00ee7ec
Reviewed-on: https://code.wireshark.org/review/19611
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-01-12 16:04:00 +00:00
Gerald Combs 795f4eb106 Qt+Win32: Make software updates more friendly.
Add WinSparkle can_shutdown and shutdown_request callbacks which are
called prior to running the installer. Reject updates when we have
unsaved information. Add notes about possible improvements.

Ping-Bug: 9687
Ping-Bug: 12989
Change-Id: Ia126244b311417aa3105ea8136f186adc2745445
Reviewed-on: https://code.wireshark.org/review/19244
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-12-20 14:18:14 +00:00
Gerald Combs e150235ef1 Qt: Optionally restore our selected packet when thawing.
Stash the current row when we freeze the packet list. Make it possible
to restore it when thawing. Do so when the layout changes and when we
move a column.

Change-Id: I44cfb8bafcd4d49a46e1c89bf47aecf5ac139773
Reviewed-on: https://code.wireshark.org/review/19222
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-12-13 22:01:59 +00:00
Moshe Kaplan 20c57cb298 Enable exporting objects with tshark
A new "--export-object <protocol>,<destdir>" option is added to tshark.

This required refactoring Export Object behavior in all GUIs to give the
export object handling to the dissector, rather than the ui layer.
Included in the refactoring was fixing some serious memory leaks in Qt
Export Object dialog, crash due to memory scope issues in GTK Export
Object dialog, and addition sorting column feature in Qt dialog (set
up by creating a widget to manage the items that were previously
leaking memory)

Bug: 9319
Ping-Bug: 13174
Change-Id: I515d7662fa1f150f672b1476716f347ec27deb9b
Reviewed-on: https://code.wireshark.org/review/18927
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Tested-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-12-02 16:07:35 +00:00
Gerald Combs 94344cd491 Qt: Fix a "No such slot" warning.
Make sure on_actionCaptureOptions_triggered always exists so that we
don't get a "No such slot" warning when building without libpcap.

Change-Id: Ib7c82df6c72bf080ff080e0a650216b345a97e9c
Reviewed-on: https://code.wireshark.org/review/18747
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-11-11 17:36:52 +00:00
Moshe Kaplan ce98b6c90d Enable exporting IMF traffic as an EML file
Change-Id: Ia56b38a770a148dd8bf030699615189601944cc2
Reviewed-on: https://code.wireshark.org/review/18656
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2016-11-10 14:36:00 +00:00
Gerald Combs 414c132458 Qt: Handle retranslation events in the main window.
Update most (but not all) of the main status bar text when the user
changes the language setting.

Try to distinguish between recent preferences and recent captures more
clearly.

Change-Id: I5278a503178fe3620a25b185742688f957dc30f4
Ping-Bug: 11307
Reviewed-on: https://code.wireshark.org/review/9575
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-11-10 13:25:20 +00:00
Guy Harris 03c6937e62 Have routines for parsing options that affect dissection.
Have them handle -d, -t, --disable-protocol, --disable-heuristic, and
--enable-heuristic for TShark and both flavors of Wireshark.

Change-Id: I612c276b1f9df8a2092202d23ab3d48be7857e85
Reviewed-on: https://code.wireshark.org/review/18583
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-10-30 22:57:16 +00:00
Dario Lombardo af7fc8b7e4 Qt: add fullscreen feature.
The feature activates/deactivates fullscreen mode of Qt UI.
A new menu item has been added as well as a shortcut (F11 or Ctrl+Cmd+F)
according to browsers common shortcut.

Change-Id: I01906b494d0a13ce70d27c00ebbe03e6ec87cbd7
Reviewed-on: https://code.wireshark.org/review/18332
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
2016-10-23 23:25:49 +00:00
Roland Knall 99097dd3c6 Interface List: Change display to view/model
This changes the underlying model of the main interface tree.
Because of that, we can resort to a view/model approach, enlisting
the global interfaces list as only data source.

The interface list works identical to the old list, but allows
for filtering of the displayed interfaces by type. Only types, which
are present and whose interfaces are not hidden, are being displayed
for selection.

Change-Id: If8475b227daa026dc0ad3d25bc7fe050d5bf2ac3
Reviewed-on: https://code.wireshark.org/review/17940
Reviewed-by: Roland Knall <rknall@gmail.com>
2016-10-01 13:18:51 +00:00
Pascal Quantin 7a7f020285 Qt: fix file set menus when stopping a capture or opening a capture after startup
Create file_set_dialog_ window at program start so that file set menu entries
are properly populated

Bug: 12904
Change-Id: I597067da51808000683b15a19df646857082a867
Reviewed-on: https://code.wireshark.org/review/17785
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-09-19 04:55:05 +00:00
Pascal Quantin d7a07deb19 Qt: fix some menus activation when stopping a capture
Call MainWindow::setMenusForCaptureFile() once the capture is finished
While we are at it, let's deactivate Export PDU and Export Packet Bytes menus while capturing

Bug: 12071
Bug: 12898
Change-Id: I8ab9d531135790b51cd630d3f548d0c47a4a60a5
Reviewed-on: https://code.wireshark.org/review/17784
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-09-19 04:53:33 +00:00
Stig Bjørlykke ee2c4da947 Qt: Reset expert info icon when start capture failed
When starting capture fails the expert info icon must be removed
and the file status must be cleared.  This happens more frequently
when using sshdump with configuration errors.

Change-Id: I9b2215c71bd16406a0978256018b1664f06c19f1
Reviewed-on: https://code.wireshark.org/review/17741
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-09-16 21:27:34 +00:00
Gilbert Ramirez e8e193694a Qt: Option to copy bytes to clipboard as Escaped String
Some users need to copy the bytes to a Python script for
sending out through a raw socket. While they can modify a
plain hex dump, having Wireshark copy directly as a Python
string makes their work easier. This format also works
with Bash, so it is called "Escaped String". E.g.:

	"\x55\xb5\xd4\x67\x03"

Change-Id: I0b6a5eb2e348f686397afda76095aaa2fb85c18d
Reviewed-on: https://code.wireshark.org/review/17696
Petri-Dish: Gilbert Ramirez <gram@alumni.rice.edu>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-09-15 04:13:59 +00:00
Peter Wu 09be46361b qt: fix crash on Search Packet while redissecting
Before redissection, PacketList::freeze() is called which clears the
model. This results in a NULL-deref when pressing Ctrl-F (Packet
Search) or Ctrl-G (Go To Packet). Reproducer: in a large capture file,
enter some display filter (e.g. "udp") and immediately press Ctrl-F.

Thanks to Github user SNAPESNATCH for the initial report via IRC that
included a helpful stack trace on Windows.

Change-Id: If7334d6df4e9591fb1f2a52e3e2f837285b2959f
Reviewed-on: https://code.wireshark.org/review/17326
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2016-08-26 08:59:11 +00:00
Martin Kaiser 7e5cbf4e2c always update the status bar at the end of a capture
We used to update the status bar when we get a stopCapture signal.

This does not work for extcap interfaces like randpktdump which
creates 1000 packets and then exits. The status bar message "Live capture
in progress" is not deleted.

For randpktdump, the only reliable indication to detect the end of
the "capture" is when the pipe to dumpcap is destroyed. Update the
status bar at this time.

Change-Id: I59768e7f518625283b2c27c34c428bb115e27a61
Reviewed-on: https://code.wireshark.org/review/16479
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: Anders Broman <a.broman58@gmail.com>
2016-07-16 06:42:44 +00:00
Gerald Combs 5cf7fcdf0f Qt+Gtk: Fix the -t command line flag.
Add the time format to commandline_param_info_t and apply it when we've
finished application initialization.

Bug: 12489
Change-Id: Ice626198a610567e945a8e53c0c1093797e8208e
Reviewed-on: https://code.wireshark.org/review/16232
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-07-01 02:10:22 +00:00
Guy Harris 5d019cfb13 Make quit_after_cap an item in commandline_param_info_t.
And make the commandline_info structure global, so all the places that
look at quit_after_cap can get at it.

Change-Id: I006329cf8842c655cca36f024570855d1b16e107
Reviewed-on: https://code.wireshark.org/review/16182
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-06-28 01:40:39 +00:00
Guy Harris 3f49e897f6 Pull quit_after_cap out of the global capture options.
Really, all the GUI-related options should be pulled out, so they're not
cluttering up dumpcap and tshark.

Change-Id: I0276dee2be48bae3498a819d8c0c2747fe1352e7
Reviewed-on: https://code.wireshark.org/review/16180
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-06-28 00:21:53 +00:00
Gerald Combs 60cdee9e30 Qt: Handle unhandled filter actions.
Handle FilterAction::ActionColorize and ::ActionFind. Remove
::ActionConversation since it was unused. Assert when we encounter a
missing FilterAction, similar to what we do in other parts of the code.

Bug: 12363
Change-Id: I5c1ecd488e5bdb9700a80fc70ec7c047311054b6
Reviewed-on: https://code.wireshark.org/review/16131
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-06-26 06:10:51 +00:00
Gerald Combs 974a530f8e Qt: Conversation and Endpoint dialog performance tweaks.
Generate column text dynamically. This keeps us from having to iterate
over our tree items each time we receive updates.

Set the uniformRowHeights property.

Stop automatically resizing columns after 200 items.

Fixup name resolution behavior. Disable the checkbox if host name
resolution is disabled.

Change-Id: Ib2fef604d6ee9e39a8b1edd72d58d0cb02d3bb64
Reviewed-on: https://code.wireshark.org/review/16110
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-06-26 06:08:57 +00:00
Gerald Combs fe6856684b Qt: Fix "-l" behavior.
gbcae998 didn't completely fix the missing "-l" behavior.

Bug: 12311
Change-Id: Iee3c844013ac137e94848aaafca7aeb3de43e080
Reviewed-on: https://code.wireshark.org/review/16128
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-06-24 21:23:11 +00:00
Guy Harris 6b0923a640 No pcap, no live capture, so no auto_scroll_live.
Change-Id: Ic1993916cdb78c946bb291fa59f7cdc25e9cef2d
Reviewed-on: https://code.wireshark.org/review/16088
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-06-23 08:00:34 +00:00
Dario Lombardo 2c8056acdf Qt: quit the UI if WIRESHARK_QUIT_AFTER_CAPTURE is set (offline mode too).
This change is useful to use the offline mode in tests (like fuzzing)
that require the software to quit after the processing of a sample.

Change-Id: I311c642edecf4012dc518c2bf8bca66c97aa1b02
Reviewed-on: https://code.wireshark.org/review/16038
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-06-23 07:58:29 +00:00
Gerald Combs 300e055ab6 Qt: Use queued signals+slots for filter actions
Many of our dialogs can send an "apply this display filter" signal to
the main window. Applying a display filter in turn creates a nested
event loop via cf_read+update_progress_dlg. If the "apply" signal+slot
is directly connected (which is the default, and which means we're
calling into a function table) we can close the dialog while the signal
is firing, which means we return into a deleted object.

Make all of the filterAction signals+slots queued instead of direct.

Bug: 12523
Change-Id: Ica331054c0aa52a7f33bd8df1fa65ecd09fdc292
Reviewed-on: https://code.wireshark.org/review/16080
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-06-23 03:44:54 +00:00