Commit Graph

4972 Commits

Author SHA1 Message Date
Guy Harris 347a19ae96 Add common routines for command-line libwiretap error reporting.
These are similar to the routines added to ui/alert_box.c for dialog-box
libwiretap error reporting.

This centralizes the knowledge about what to say for various libwiretap
errors, removing some duplicate code, and giving more details in some
programs.

Change-Id: I737405c4edaa0e6c27840f78a8c587a8b3ee120b
Reviewed-on: https://code.wireshark.org/review/21234
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-20 02:21:58 +00:00
Guy Harris 9e36106baf Have a common "capture file write failure alert box" routine.
Take the code from save_record() to pop up an alert box and put it into
libui, with the name cfile_write_failure_alert_box().

While we're at it, clean up some variable names and comments.

Change-Id: If56e649e5afe50e7a20b39720ec96e8fe2983b24
Reviewed-on: https://code.wireshark.org/review/21233
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-19 22:06:59 +00:00
Guy Harris 4362e63dd5 Have a common "capture file close alert box" routine.
Take the code from cf_read() to pop up an alert box and put it into
libui, with the name cfile_read_failure_alert_box().  Use it in a couple
of places where we pop up such an error dialog.

While we're at it, get rid of the "err" argument to rescan_file();
nobody uses what it returns.

Change-Id: Iba7099b95de24309359d94eb96f606020e2ff2c3
Reviewed-on: https://code.wireshark.org/review/21232
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-19 21:43:47 +00:00
Xiaochuan Sun d13c6d9628 remove unnecessary guint64 cast in IO graph
Change-Id: I35d666a5a9fb5813706c312334f1552703c9475c
Reviewed-on: https://code.wireshark.org/review/21214
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-19 04:51:08 +00:00
Guy Harris cf40e733e9 Fix a comment.
Change-Id: I3a18e3fab9fa785e828df843b1b4b899beba1f19
Reviewed-on: https://code.wireshark.org/review/21206
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-18 21:20:54 +00:00
Guy Harris e6b9c7706f Fix a comment.
Change-Id: I2ed361efdaa6dcf632f054634dc473d518df4cc8
Reviewed-on: https://code.wireshark.org/review/21204
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-18 21:08:16 +00:00
Guy Harris 1015fa0431 Have a common "capture file close alert box" routine.
Take cf_close_failure_alert_box() and put it into libui, with the name
cfile_close_failure_alert_box().  Use it not only in file.c but also
in ui/export_pdu_ui_utils.c, ui/gtk/file_import_dlg.c, and
ui/qt/import_text_dialog.cpp where the error we get back isn't
necessarily an errno.

Have ui/gtk/file_import_dlg.c and ui/qt/import_text_dialog.cpp also use
cfile_open_failure_alert_box() on open errors.

Change-Id: I987f339a23ea58609390306a319923e7f92d5c07
Reviewed-on: https://code.wireshark.org/review/21203
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-18 21:02:54 +00:00
Stig Bjørlykke 1b7677e32f CMake: Sort entries
Put additional_toolbar in sorted position.

Change-Id: I483bca72265a5932f54ccf882c6659e94be5d95b
Reviewed-on: https://code.wireshark.org/review/21183
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 10:57:28 +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 e34d76942c Have a commont "capture file open alert box" routine.
Take cf_open_failure_alert_box() and put it into libui, with the name
cfile_open_failure_alert_box().  Use it not only in file.c but also in
ui/export_pdu_ui_utils.c, where the error we get back isn't necessarily
an errno.

Change-Id: Ia053f3e403ba464d446bd9530778d5ed302796d2
Reviewed-on: https://code.wireshark.org/review/21174
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-18 01:59:32 +00:00
Ahmad Fatoum b478df61f5 Qt: Provide both file save and open preferences
This is a breaking change.

prefs_register_filename_preference hasn't been differentiating
between files to be saved and ones to be opened.

On GTK, a neutral dialog is used, so no problems there.
On Qt, a save dialog has been always used, even in dissectors that
were reading configuration files without modification.

prefs_register_filename_preference now takes an argument to indicate
whether UI could be a save dialog with a warning on overwriting
a file, or whether it's a general purpose open file dialog.

Qt now does this. Previously no warning was shown on overwriting a file,
so it may be used for opening files too without irritating the user.
This has been changed, as non-destructive reads should now use
the open dialog.

Dissectors were changed accordingly.

Change-Id: I9087fefa5ee7ca58de0775d4fe2c0fdcfa3a3018
Reviewed-on: https://code.wireshark.org/review/21086
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-04-17 10:51:10 +00:00
Guy Harris f63ad23ef9 Check for localtime() failing.
It "shouldn't happen", but at least this squelches a Coverity complaint,
CID 1398224.

Change-Id: I9555f71a50574e9386a3c96d52143d838f7f121f
Reviewed-on: https://code.wireshark.org/review/21160
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-17 07:48:56 +00:00
Guy Harris 067ef3e08a Clean up documentation and help messages for protocol enabling/disabling.
List all of --enable-protocol, --disable-protocol, --enable-heuristic,
and --disable-heuristic in the SYNOPSIS section of the man pages.

Undent after the list of taps for the -z option, so the following
options are at the same indentation as other options.

List --enable-protocol in the DESCRIPTION, above --disable-protocol.

Include --enable-protocol in the help message.

Change-Id: I680a54430789f3543b2d539fbded22b0b57f7f76
Reviewed-on: https://code.wireshark.org/review/21159
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-17 03:48:14 +00:00
Gerald Combs b2219bbccb [Automatic update for 2017-04-16]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: I8165b1b2db0f81049a88dd17163a4367f04f83cc
Reviewed-on: https://code.wireshark.org/review/21142
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-04-16 15:17:00 +00:00
Guy Harris 4d2d423106 Rename routines to clarify what they do.
XXX_prime_with_YYY makes it a bit clearer than does XXX_prime_YYY that
we're not priming YYY, we're priming XXX *using* YYY.

Change-Id: I1686b8b5469bc0f0bd6db8551fb6301776a1b133
Reviewed-on: https://code.wireshark.org/review/21031
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-12 04:56:49 +00:00
Guy Harris c079255539 Add an API to let a postdissector specify fields whose values it needs.
Currently, this is only used to determine whether a protocol tree needs
to be built on the first pass or not - if there are postdissectors that
need fields, it does - but eventually we should be able to use it to
prime the dissection to deliver those fields in cases where we don't
need the *entire* protocol tree (rather than using a hack such as
cooking up a fake tap with a fake filter to do that).

Update MATE and TRANSUM to use it.

Clean up code to check whether we need a protocol tree, and add comments
before that code indicating, in each case, what the criteria are.

The array of postdissectors includes a length, so we don't need to
separately keep track of the number of postdissectors.

Clean up indentation while we're at it.

Change-Id: I71d4025848206d144bc54cc82941089a50e80ab7
Reviewed-on: https://code.wireshark.org/review/21029
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-12 04:31:19 +00:00
Peter Wu 73e24b31de Qt: mark bool and enum prefs as changed when modified via the menu
When preferences are modified, these must be marked to ensure that the
"prefs_changed" callback for Lua dissectors is invoked.

Bug: 13536
Change-Id: Ib93b2920ebefbc1532d3c6cd097f802a45ec6f35
Reviewed-on: https://code.wireshark.org/review/21016
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-04-11 19:28:08 +00:00
Guy Harris 6b3714254d Pull all the "load settings" calls into a epan_load_settings() routine.
That way, nothing using libwireshark needs to know what settings need to
be loaded, they just call epan_load_settings().

Change-Id: I9390e259e286fc4f5acaeaac2767e4c3c4b656af
Reviewed-on: https://code.wireshark.org/review/20983
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-09 22:40:30 +00:00
Guy Harris 7d5ce06cbe Pull the error reporting into {read,save}_filter_list.
Change-Id: I4d9582661f2f1728d400eeb2a1b1dea98f32ce7f
Reviewed-on: https://code.wireshark.org/review/20982
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-09 17:57:52 +00:00
Gerald Combs 05c501373d [Automatic update for 2017-04-09]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: I147cbfa4c9cca70ad581d2e3c149473afd243086
Reviewed-on: https://code.wireshark.org/review/20978
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-04-09 17:00:54 +00:00
Guy Harris 1fd23e21a5 We use libui with dumpcap, which is built PIE, so libui should be, too.
Change-Id: Ic469517dc414e1eb62b27b6d2b0b0a7837790bf9
Reviewed-on: https://code.wireshark.org/review/20975
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-09 04:51:16 +00:00
Guy Harris 77cad8561c Move the filter file reading code to libui.
It doesn't belong in libwireshark, as it doesn't affect dissection, but
it *does* belong in libui, as it's helper code for the UIs.

Change-Id: I8a5e0640a299a08e9ec1917dd253197438ebfdbc
Reviewed-on: https://code.wireshark.org/review/20974
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-09 04:25:52 +00:00
Guy Harris 62b342443d Pull the error-reporting code for preference files into read_prefs().
No need to duplicate it in N different programs.

Update comments while we're at it.

Change-Id: I3096cbe5448a19363eff6303bdd54e522dae9336
Reviewed-on: https://code.wireshark.org/review/20973
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-09 03:03:25 +00:00
Guy Harris f0a24bee89 Have vwarning_alert_box() pop up a warning, not an error.
Change-Id: I993133931af222c94f4a8814583fef97e49542ca
Reviewed-on: https://code.wireshark.org/review/20972
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-09 02:54:36 +00:00
Guy Harris 23a7890b6a Pull the code to save enabled/disabled lists into libwireshark.
It's identical in the GTK+ and Qt UIs, and it should just be done in
libwireshark.

Rename some routines to just speak of enabled_and_disabled_lists, so we
don't have to say enabled_and_disabled_protos_and_heuristic_dissectors
or something such as that.

Clean up indentation.

Change-Id: Ief2e612d9e1b60d8d0123b6bd3409dce5faf6495
Reviewed-on: https://code.wireshark.org/review/20970
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-09 02:00:37 +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
Peter Wu b9b5703a41 Qt: Remember exact position of selected item in tree
When switching between packets, the first field at a level would be
selected. This is annoying if you have similarly structured trees (like
TLVs or text labels).

Combined with something like bug 13533, this causes erratic jumping. Fix
this by incorporating the level position in the path.

Change-Id: I998853ce899fffc69dd4932902508141325c35a4
Ping-Bug: 13533
Reviewed-on: https://code.wireshark.org/review/20799
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-04-07 08:51:30 +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 023cf320eb Qt: support selecting the min/max packet from IO Graph
GTK+ supports selecting the first packet (via the "left mouse button")
and the last packet (via the "right mouse button") in an interval, and
Qt supports selecting the last packet of an interval. This patch enables
picking the packet matching the extreme value in Qt.

Bug: 12401
Change-Id: If0b7f2f1bf8c384ea0d68b5f5fae2d1e8b4b0ac2
Reviewed-on: https://code.wireshark.org/review/20769
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-04-05 09:27:32 +00:00
Peter Wu a5f9b4e06d Qt: fix tracer and selection of packet in IO Graph
Do not assume first graph in the list, pick the first visible graph.
This (1) fixes the tracer which would otherwise show a marker at an
non-obvious position that is not located on the graph and (2) fixes the
GoToPacket action when clicking on the graph.

Bug: 13537
Change-Id: I49d750102ad25c8539aa2e44fe1583cd535dd471
Reviewed-on: https://code.wireshark.org/review/20768
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-04-05 09:26:59 +00:00
Stig Bjørlykke 3053d7c0c1 Qt: Remove unused argument in Size string
Change-Id: I4c09092aba986c4fe224a46cac23d70bc5915aa6
Reviewed-on: https://code.wireshark.org/review/20923
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-05 08:00:19 +00:00
Michal Labedzki 2db162d326 Qt: Fix Conversation dialog's refreshing table
Fix wrong slot statement ("name").

Change-Id: I6911d6f7cb6d01ea14d5172c334c54f74ae6e546
Reviewed-on: https://code.wireshark.org/review/20897
Petri-Dish: Michal Labedzki <michal.labedzki@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-04-04 11:30:48 +00:00
Patryk Nowak 03f372fd8b Qt/Bluetooth: add results filter in HCI Summary window
Add ability to display only these HCI commands whose names match specified
filter. Currently only simple filtering is implemented (substring search,
no regex-matching).

Change-Id: I418d3d2d3e7a3b196d5ba05496d31c508e842dec
Reviewed-on: https://code.wireshark.org/review/20880
Reviewed-by: Michal Labedzki <michal.labedzki@wireshark.org>
Petri-Dish: Michal Labedzki <michal.labedzki@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-04-04 01:59:32 +00:00
Gerald Combs 522532643f [Automatic update for 2017-04-02]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: I9e722e963dcf7437feb98a3176e6c507d86a9485
Reviewed-on: https://code.wireshark.org/review/20848
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-04-02 15:14:44 +00:00
Peter Wu fff930d393 Qt: do not expand collapsed trees when switching packets
Scenario: user selects a field, collapsed tha parent tree and selects
the next packet. Before this patch, the tree would be expanded again,
selecting the child. After this patch, the tree will not be expanded,
instead selecting the tree node that got collapsed.

Change-Id: I7968fca1056a937cf3b399afb6f3089c2d199067
Reviewed-on: https://code.wireshark.org/review/20801
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-03-31 09:44:51 +00:00
Peter Wu 0ea51ad822 Qt: Fix uninitialized memory access in val_units_
Fixes the following UBSAN errors:

    ui/qt/io_graph_dialog.cpp:1720:75: runtime error: load of value 3200171710, which is not a valid value for type 'io_graph_item_unit_t'
        #0 0x5611f0b0cd1d in IOGraph::setFilter(QString const&) ui/qt/io_graph_dialog.cpp:1720:75
        #1 0x5611f0b737a1 in IOGraph::IOGraph(QCustomPlot*) ui/qt/io_graph_dialog.cpp:1682:5
        #2 0x5611f0afb3f3 in IOGraphDialog::addGraph(bool, QString, QString, int, IOGraph::PlotStyles, io_graph_item_unit_t, QString, int) ui/qt/io_graph_dialog.cpp:340:24
        #3 0x5611f0af7c19 in IOGraphDialog::IOGraphDialog(QWidget&, CaptureFile&) ui/qt/io_graph_dialog.cpp:289:13

    ui/qt/io_graph_dialog.cpp:1818:19: runtime error: load of value 3200171710, which is not a valid value for type 'io_graph_item_unit_t'
        #0 0x5611f0b1167e in IOGraph::setPlotStyle(int) ui/qt/io_graph_dialog.cpp:1818:19
        #1 0x5611f0b062ee in IOGraphDialog::syncGraphSettings(QTreeWidgetItem*) ui/qt/io_graph_dialog.cpp:420:10

    ui/qt/io_graph_dialog.cpp:1872:29: runtime error: load of value 3200171710, which is not a valid value for type 'io_graph_item_unit_t'
        #0 0x5611f0b13e6a in IOGraph::setValueUnits(int) ui/qt/io_graph_dialog.cpp:1872:29
        #1 0x5611f0b06640 in IOGraphDialog::syncGraphSettings(QTreeWidgetItem*) ui/qt/io_graph_dialog.cpp:422:10

Note that calling setFilter with an empty string is pretty useless,
especially since the filter is initialized later, so remove it.
The choice for IOG_ITEM_UNIT_FIRST is quite arbitrary and needed because
setValueUnits reads the "old" (uninitialized) value.

Change-Id: I32c65a30593cb718b838c0f324e0d1b0eaab90e5
Reviewed-on: https://code.wireshark.org/review/20767
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-03-30 22:28:01 +00:00
Joerg Mayer 57d15713db Prevent crash/assert on access to "uninitialized" device.if_info.name.
While this is one possible way to fix it, it probably is not the "right"
way to do it. I just don't know which one would be right. I regard
several options to be cleaner:
- Remove if_info from interface_t altogether and add the required fields
  to interface_t directly.
- Never use device.if_info.name but always use device.name (same with
  friendly_name)
- Initialize both fields the same (same with friendly_name)
- Also not nice: device is optically a struct, not a pointer. So into the
  function, when we create a new struct (that's where the error "is made"),
  the same name continues to be used.

Not improving my confidence into my solution:
- I haven't bee able to figure out why the automated Windows builds don't
  crash/assert.

Last but not least: The two qt/gtk functions should probably have their common
core extracted into a common function.

Change-Id: I1b36d1765d1a1ec975927cb5785a1540ba4952f5
Ping-Bug: 13448
Reviewed-on: https://code.wireshark.org/review/20721
Petri-Dish: Jörg Mayer <jmayer@loplof.de>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2017-03-29 20:12:58 +00:00
Guy Harris f8c870eee2 Throw in a cast to squelch a compiler warning.
MSVC warns that comparing a gboolean (which is a typedef for int) to a
bool is unsafe; convert the gboolean to a bool (the post-C++11 draft C++
standard I have says that the conversion from integral to bool does
pretty much what you'd expect - zero goes to false, non-zero goes to
true - and is exactly what we want).

Change-Id: Ia7d7b62baf87ca3a29da5140f68c2c5b38b2d6de
Reviewed-on: https://code.wireshark.org/review/20787
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-03-29 16:45:58 +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
Michael Mann b56bbb493a Fix "warning C6246: Local declaration hides declaration of the same name in outer scope" warnings
Change-Id: I98edc076fdab40ef1fd05313168011f58e13a4d6
Reviewed-on: https://code.wireshark.org/review/20773
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-03-29 02:38:29 +00:00
Martin Sehnoutka 8efd42c4aa Reflect new default value of snaplen in man pages.
Default value for snaplen is defined in wiretap/wtap.h:
 #define WTAP_MAX_PACKET_SIZE    262144

and used in capture_opts.c:
    capture_opts->default_options.snaplen         =
    WTAP_MAX_PACKET_SIZE;

but help and man pages don't reflect this change.

Change-Id: I35ddf1e8b7ffd657f4e01b3fe6b4c44c9acece2b
Reviewed-on: https://code.wireshark.org/review/20738
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: Michael Mann <mmann78@netscape.net>
2017-03-28 16:23:59 +00:00
Alexis La Goutte 172107521b voip_calls_infO_model(.h): fix extra ‘;’ [-Wpedantic]
Change-Id: I2f131999cd0337d0d65d52f303c8ab9ca6bda39a
Reviewed-on: https://code.wireshark.org/review/20757
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-03-28 13:57:12 +00:00
Pascal Quantin aa998d7573 Qt: update endpoint statistics column labels to match GTK ones
Bug: 13526
Change-Id: I40485c6f9b54ff0bf07f955c1dde8cd5ac05ef9b
Reviewed-on: https://code.wireshark.org/review/20762
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: Michael Mann <mmann78@netscape.net>
2017-03-28 13:43:18 +00:00
Guy Harris 6b929abe69 Don't wire in 262144, use WTAP_MAX_PACKET_SIZE.
That way, if we ever increase WTAP_MAX_PACKET_SIZE, this code won't need
to be changed.

Change-Id: I68d21e10810b7b8a4732d9ecf7e145668b0fe1cb
Reviewed-on: https://code.wireshark.org/review/20761
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-03-28 10:34:15 +00:00
Peter Wu 721182b09b Qt: fix closing editor in capture interfaces dialog
Whenever (every second) the points list is updated, a dataChanged signal
is emitted and Qt decides to close all editors. Workaround this issue by
disabling the dataChanged signal. (Alternatively, we could change the
list into a pointer-to-list again.)

Change-Id: Ie06d118d011a72f5be5608c2324ca2715a3f97c7
Fixes: v2.3.0rc0-2014-gf8dc2346df ("Qt: fix memleak of PointList in interface statistics")
Reviewed-on: https://code.wireshark.org/review/20530
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-03-28 05:09:39 +00:00
Pascal Quantin e1b14fbcfe text_import: the maximum frame length should be WTAP_MAX_PACKET_SIZE
Change-Id: I41989e8b5fd273c518f786ca74683b9284d9403e
Reviewed-on: https://code.wireshark.org/review/20747
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-03-28 05:06:58 +00:00
Pascal Quantin 2141eafa64 GTK: the maximum packet size is WTAP_MAX_PACKET_SIZE, not 65535
Change-Id: I4b78a3bff7ed158eef2008e52ec8abc9f7a8d1d3
Reviewed-on: https://code.wireshark.org/review/20748
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-03-28 05:02:31 +00:00
Pascal Quantin 4cc0d1e728 Qt: the maximum packet size is WTAP_MAX_PACKET_SIZE, not 65535
Also ensure that the update of sparkline does not lose focus of the
spinbox currently edited.

Change-Id: Icf7dd180fe3cb1d8bfab9017f923bf38e6210554
Reviewed-on: https://code.wireshark.org/review/20749
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-03-28 01:35:54 +00:00
Pascal Quantin cea97f225a Qt: fix capture statistics display in status bar
Broken in g414c132

Bug: 13524
Change-Id: I4d579170f925749aa9e7a6015ff17dee08d6e445
Reviewed-on: https://code.wireshark.org/review/20750
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2017-03-27 19:23:45 +00:00
Michael Mann f5ed8a4306 Fix "warning C6246: Local declaration hides declaration of the same name in outer scope" warnings
Change-Id: I0dbf8d0236b163da568a173ccedc3072bd039caa
Reviewed-on: https://code.wireshark.org/review/20739
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-03-27 15:23:34 +00:00
Michael Mann 3b588dffcf Check for return value of WSAStartup on all executables.
Windows vscodeanalysis complains even though the event is probably
very unlikely.

Change-Id: Iafe158eea5586908209d6bfe1e45540117558673
Reviewed-on: https://code.wireshark.org/review/20727
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-03-27 03:14:15 +00:00
Michael Mann 520cfcf53b bluetooth_device_dialog.cpp: warning C6246: Local declaration of 'item' hides declaration of the same name in outer scope
Change-Id: If6d2cf5d193b45d972534a3064fea7d290eac7f4
Reviewed-on: https://code.wireshark.org/review/20726
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-03-27 03:14:02 +00:00
Joerg Mayer 244b30179c Move #if 0 up to include the now unused struct definition
Change-Id: I5500a091608af61d7f8091ba133db558c148a853
Reviewed-on: https://code.wireshark.org/review/20719
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2017-03-26 16:54:01 +00:00
Gerald Combs 2d31c2a93d [Automatic update for 2017-03-26]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: I284e7960d0ad30e715a9afc42e4248f2a19f8fa7
Reviewed-on: https://code.wireshark.org/review/20716
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-03-26 15:13:47 +00:00
Peter Wu 370f3b358c Qt: add cache proxy model for Voip Calls dialog
When a capture file is reloaded, the information stored in
VoipCallsInfoModel is invalidated. Add another cache layer to fix this:

    VoipCallsInfoModel          wraps around raw data (invalid on close)
    CacheProxyModel             NEW: use prev. data or cache on close
    VoipCallsInfoSortedModel    provided sorting, etc.
    VoipCallsDialog             actual user of model (callTreeView)

This also fixes a UAF after a file was closed, and when a call is
selected (that got worse with the last model/view patch and is "fixed"
in this patch with the caching layer. Note that the Flow sequence and
Play Streams dialog are not that useful when the file is closed).

Change-Id: Ib4daff9dc01a54863fe1d943bdbdb876418924ee
Reviewed-on: https://code.wireshark.org/review/20574
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-03-24 23:02:43 +00:00
Peter Wu b4bc6c72c7 Qt: refactor Voip Calls Dialog into Model/View
Functional improvements:

 - "Time of day" option is now propagated to the CSV/YAML export.
 - The sorting order is preserved in the CSV/YAML export.

Other changes:

 - Convert column name identifiers to enum.
 - CSV output will now always be quoted (previously numbers like packet
   count were not quoted, but since CSV has no numeric type it should
   be OK to add quotes). Side-effect of model design decision.
 - Instead of clearing the widgets and re-adding all calls, now it will
   add new calls to the model. Not tested with a live capture, if the
   column data can change, maybe a dataChanged signal is needed.

Due to this patch, it should be easier to add a filter for finding calls
easier (e.g. by From, IP, etc.).

Note: extra QList is used in the model to ensure a O(1) lookup of calls
(rather than O(n) for GQueue).

Change-Id: Ie08462aae038d9c3daf1cc7a152b948724689017
Reviewed-on: https://code.wireshark.org/review/20084
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-03-24 23:02:30 +00:00
Joerg Mayer c78c8dc842 Rename a few variables to look more similar to the qt implementation
Reset auth_str for each round of the loop.

Change-Id: Ib5be6a3d172c28d7b1634fdba3e72c83622405dd
Reviewed-on: https://code.wireshark.org/review/20698
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2017-03-24 13:46:18 +00:00
AndersBroman cf97b57ede [RTP Analysis] Remove check for duplicated MAC (duplicated packet
detection)

Bug: 11478
Change-Id: Ieff015e5bf55facc732beae6a40b76d2050a4aac
Reviewed-on: https://code.wireshark.org/review/20696
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-24 13:39:52 +00:00
Joerg Mayer ceeb757cd3 Remove the last HAVE_PCAP_REMOTE inside HAVE_PCAP_REMOTE for this file.
Change-Id: I8710c235ae5377c2064097b1d7163c4cb3544fd8
Reviewed-on: https://code.wireshark.org/review/20697
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2017-03-24 13:11:46 +00:00
Joerg Mayer 2ff5931287 Clean up gtk/capture_dlg.c insert_new_rows a bit.
Hopefully no semantic changes.

Change-Id: I1e43a971851ad944aa1e18c42131b6e180017656
Reviewed-on: https://code.wireshark.org/review/20689
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-24 07:21:01 +00:00
Joerg Mayer 383ba15d02 Clean up updateRemoteInterfaceList a bit more.
Add an #if-0'ed add_interface_to_remote_list because it is present in its
gtk pendant insert_new_rows in capture_dlg.c

Change-Id: I90e8f9eaafd3d3ca31140ec8bcd6a2eeb7c849ca
Reviewed-on: https://code.wireshark.org/review/20688
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2017-03-23 23:30:19 +00:00
Joerg Mayer cbea4c02c4 Split interface update code into its own routine
Change-Id: I568a0785978227924cc6c3b7e9f86f39fa777411
Reviewed-on: https://code.wireshark.org/review/20687
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2017-03-23 18:53:47 +00:00
Erik de Jong 9e35c0bc8b Fix QT UI bugs in RTP dialogs
- RTP analysis and player dialogs are modal whereas they were not modal in GTK
UI
Only fixed calling up the RTP analysis window being modal when called from the
RTP streams dialog as it is modeless when called from the menu in the main
window with a stream packet selected.

- Action 'Next problem packet' triggers an infinite loop when there are no
'problem packets' and first packet is selected when calling the action.

- Crosshairs not implemented in RTP player/crosshairs context menu item not
working.
Context menu item commented out.

bug: 13500
Change-Id: I0ba954f895b85605462c316e4426280ec4d437b2
Reviewed-on: https://code.wireshark.org/review/20660
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-03-23 11:53:03 +00:00
Peter Wu 40a5fb567a Restore interface selection after interface refresh
Remember which interfaces were selected for the next capture and restore
the selection (note that only active capture devices are stored in
"ifaces", so simply querying that list does not work).

The original change tried to fix duplicate devices (which were added
from "ifaces" to "all_ifaces") by clearing "ifaces", this patch tries to
fix that by ignoring all non-PIPE devices while preserving "ifaces".

Now after refreshing the interfaces list in Qt, the selection in the
Manage Interfaces dialog is preserved. Removal of the bluetooth0
interface+refresh does hide the interface. Read+refresh does add the
interface (and preserve the selected state).

Change-Id: I26a78982f0327c835dc96da9c813e38f31d6cd3d
Fixes: v1.99.0-rc1-879-g55733ea170 ("fix scan_local_interfaces()")
Reviewed-on: https://code.wireshark.org/review/20477
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-03-22 05:03:27 +00:00
Guy Harris 0fdbaa4f18 Make GTK compile with HAVE_PCAP_REMOTE on macOS with clang-800.0.42.1.
Change-Id: I36bf1e39541fc55bc315f12f56dfd7ed7e0cc207
Reviewed-on: https://code.wireshark.org/review/20632
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-03-19 18:01:43 +00:00
Alexis La Goutte 4db2d40ea9 response_time_delay_dialog (Qt): fix typo reponse -> response
Change-Id: Ib29cca71a4ffe4e44f341d9de5e3da603c7b3f15
Reviewed-on: https://code.wireshark.org/review/20627
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-03-19 16:50:08 +00:00
Joerg Mayer ed234da840 Make GTK compile with HAVE_PCAP_REMOTE on Linux with gcc6
Change-Id: I87cbe47d34b768cb50be6580f85e8175103686c0
Reviewed-on: https://code.wireshark.org/review/20620
Petri-Dish: Jörg Mayer <jmayer@loplof.de>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2017-03-19 16:18:46 +00:00
Gerald Combs 0bcd255a5b [Automatic update for 2017-03-19]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: I5d2807ce653df495722663def31164e2342b0d89
Reviewed-on: https://code.wireshark.org/review/20622
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-03-19 15:10:16 +00:00
Joerg Mayer 2890e415bb Fix various compile warnings turning error on Linux with gcc6 when
compiling with HAVE_PCAP_REMOTE (and ENABLE_ECHLD)

Change-Id: If5524f2d3dcacca9c82a46167480c8436dd8b1b2
Reviewed-on: https://code.wireshark.org/review/20615
Petri-Dish: Jörg Mayer <jmayer@loplof.de>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2017-03-19 12:27:12 +00:00
Joerg Mayer 2e76b58840 Fix warning turning error:
/home/jmayer/work/wireshark/git/ui/qt/manage_interfaces_dialog.cpp:273:33: error: variable ‘link_type_name’ set but not used [-Werror=unused-but-set-variable]
By commenting out all lines using this variable for now.

Change-Id: I8f074b24f86ee2063fc545cabd99d446b31a06ec
Reviewed-on: https://code.wireshark.org/review/20616
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2017-03-19 12:04:35 +00:00
Stig Bjørlykke 795b459443 Qt: Pluralize packet count in Size string
Change-Id: Ifb23f4d558aa30df4ec436e42a4e23b23c2af110
Reviewed-on: https://code.wireshark.org/review/20566
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-03-17 07:19:17 +00:00
Michael Mann 5e934d583f proto_dlg.c: Convert GSList into wmem_tree
Change-Id: Ice643361e91bded91547428d7fbb7cdff969664f
Reviewed-on: https://code.wireshark.org/review/20383
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-03-16 11:40:17 +00:00
Joerg Mayer c10788cbd5 g_assert on device.if_info.name to prevent undefined behaviour.
Change-Id: Id730eb0e846e557c2f5a47139b480362a0b2a777
Reviewed-on: https://code.wireshark.org/review/20561
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2017-03-16 06:35:49 +00:00
Stig Bjørlykke f190a92bc2 Qt: Disable "Show hidden interfaces"
Disable the "Show hidden interface" option until bug 13354 is fixed
because it's not possible to capture from hidden interfaces yet.

Ping-Bug: 13354
Change-Id: I428c2698485f0c7c2d9a8ab8408d7129af5fecf1
Reviewed-on: https://code.wireshark.org/review/20528
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-03-15 08:44:12 +00:00
Alexis La Goutte 39fd595b34 tap-iostat (cli): fix this statement may fall through [-Werror=implicit-fallthrough] found by gcc7
Change-Id: Idd8f4e2175d6575beecaccf2ee018457a25fd225
Reviewed-on: https://code.wireshark.org/review/20493
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-03-13 12:33:37 +00:00
Stig Bjørlykke 5d217530a1 Qt: Use em dash when hide the "Show" checkbox
Match the style used in "Capture Interfaces" table when elements
are N/A by using the em dash.  This item should also be disabled
using QPalette::Disabled to get a even better match.

Change-Id: I127ce309318df2c36515996df8584d1e4ce690c0
Reviewed-on: https://code.wireshark.org/review/20527
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-03-13 09:37:15 +00:00
Peter Wu e1d51475b5 Qt: hide the "Show" checkbox for default devices
When marking a previously hidden device as default (e.g. via wireshark
-ocapture.device:eth0), an unchecked checkbox is visible. This is just
confusing, just hide the checkbox completely.

Change-Id: I3f85cfcb659c351c72237dced52f0684733188c4
Reviewed-on: https://code.wireshark.org/review/20478
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-03-12 18:10:25 +00:00
Gerald Combs 5f789e3fe3 [Automatic update for 2017-03-12]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: I5718e7c7df8061f81eb01973f504ebbb0cfe1e44
Reviewed-on: https://code.wireshark.org/review/20511
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-03-12 15:12:38 +00:00
Stig Bjørlykke b0335359e5 Qt: Give discard button focus (but not as default)
Set focus to the discard button in the "Unsaved packet" and
"Unsaved comments" dialogs to enable spacebar for discard and
enter for save.

Bug: 13363
Change-Id: I576b02c4e3f0964aef56a0f1c06ed57c6ba683bf
Reviewed-on: https://code.wireshark.org/review/20485
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-03-12 07:15:19 +00:00
Alexis La Goutte 9e0251f218 io_graph_item: fix false positive array subscript is above array bounds [-Werror=array-bounds]
Change-Id: I14fc19f131782a9c85104ca2189b9452079d0013
Reviewed-on: https://code.wireshark.org/review/20454
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: Michael Mann <mmann78@netscape.net>
2017-03-10 02:48:09 +00:00
Erik de Jong e003908423 RTP streams dialog: Fix find reverse button
Fix find reverse button

Bug: 13462
Change-Id: I6e19fa38cd333285c9ca3cf01e4c06ff8de56b2a
Reviewed-on: https://code.wireshark.org/review/20462
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-03-09 23:15:28 +00:00
Stig Bjørlykke e781fdd180 Qt: Fix heap-use-after-free when deleting IO graph
Deleting a IO graph item while editing a field will use the IOGraph
object so ensure we delete in correct order to avoid heap-use-after-free.

Bug: 13234
Change-Id: I6d0de21684f842fbd67c9b38fc6b75b81aec5518
Reviewed-on: https://code.wireshark.org/review/20456
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-03-09 09:22:45 +00:00
Michael Mann 56aaa5b705 Switch conversations to use wmem_tree_t instead of (sorted) GSList.
Change-Id: Ifaf25ca5a7974f1d398ceebbb4c6733d4d3e001a
Reviewed-on: https://code.wireshark.org/review/20006
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-03-06 11:41:54 +00:00
Gerald Combs 509488b3bd [Automatic update for 2017-03-05]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: I074b964d75082adc6ab216514c36abf3d54c6a0a
Reviewed-on: https://code.wireshark.org/review/20395
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-03-05 17:03:16 +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
Roland Knall 807fe8ed99 pluginIF: Allow en-/disable of elements
Allow the enable/disable of an element

Change-Id: I9652e8d74b261ba259cebfba53e7bc7ef560d347
Reviewed-on: https://code.wireshark.org/review/20370
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-03-04 00:56:51 +00:00
Stig Bjørlykke f22964da50 Qt: Fix goto next/prev packet toolbar buttons
Use bitwise AND to check if a modifier bit is set.

Also changed from MetaModifier to AltModifier to match the comment
and the modifier key used in "Next/Previous Packet in History".

Change-Id: I89072a1dfdd14a2beb7344a672cbc18a3ace8924
Reviewed-on: https://code.wireshark.org/review/20359
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-03-03 19:35:28 +00:00
Peter Wu a539036339 Qt: reduce minimum window size requirement
Strip some padding from the main welcome screen and lower the minimum
width to allow the window to be shrinked. Even when a capture file was
open, the minimum dimensions from the main welcome screen would apply.

The minimum dimensions on Arch Linux with Qt 5.8.0-5 and Plasma 5.9.2
(with the default Breeze theme) for a window have changes as follows:
 - main screen/pcap loaded: 746x626 -> 702x590
 - with search bar opened:  826x658 -> 826x622
(These numbers exclude 35x10 window decoration.)

Change-Id: Iccc43ee55803abb8105c0d9664368aab09e8cfcf
Reviewed-on: https://code.wireshark.org/review/20343
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-03-03 16:18:56 +00:00
Roland Knall 85aa48cef2 pluginIf: Add/Remove single entries from selector
Allow to add and remove single items from a selector list and also
fixing the selection of items in a selector list

Change-Id: I0c69ea97db6ca1a6932939f0df9049c6fb720f77
Reviewed-on: https://code.wireshark.org/review/20363
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-03-03 15:13:13 +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
Peter Wu 8f35d6ff90 Qt: allow Packet Bytes view to be shrinked
Even if a packet has only one or two lines for the byte view, Qt
autoresizing insists to require a minimum of 5.5 lines (or 7.5 lines for
packets without multiple data sources). Remove this artificial
requirement and allow the packet bytes view to be resized to show
nothing (except for possible data sources tabs).

This makes it easier to fit more packets and details for screenshots.

Change-Id: I3ea997b9effa8292b396dc2ceb2ab1c35cead410
Reviewed-on: https://code.wireshark.org/review/20342
Reviewed-by: Gerald Combs <gerald@wireshark.org>
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-03-03 04:58:09 +00:00
AndersBroman 2f6ba75347 Use glib-compat
Change-Id: I510af18d433c4db360243dda72260e59eb84355f
Reviewed-on: https://code.wireshark.org/review/20336
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-03-02 15:20:05 +00:00
AndersBroman 2d0e4c3730 include <wsutil/glib-compat.h> to allow use of g_list_free_full() with
older glibs.

Change-Id: I3eb7e178dcb844ddbac47f53f221a98e2d32f413
Reviewed-on: https://code.wireshark.org/review/20334
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-03-02 11:37:50 +00:00
Stig Bjørlykke 26e62dfad0 Qt: Fix -Wshorten-64-to-32 warnings
Fix some warnings when building with -Wshorten-64-to-32 flag for
C++ code.

Fixes for warnings from QList, QTimer and QVector has been pushed
upstream, so some time we may be able to enable this flag for C++.

Change-Id: Iae7457f9afc469c63f3edbe23dbf272b5c6c9e5e
Reviewed-on: https://code.wireshark.org/review/20310
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-28 11:41:32 +00:00
Stig Bjørlykke 8b8a3b8d1a Qt: Avoid null pointer dereference (CID 1401573)
Change-Id: I638174a05c6275baf54e000d941f47f8ba572169
Reviewed-on: https://code.wireshark.org/review/20302
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2017-02-27 19:42:57 +00:00
Dario Lombardo a29fe9d76a print_stream: free memory on exit.
Change-Id: I6c4acaa9026cfdf1d4230c28c30bccfb6c025cef
Reviewed-on: https://code.wireshark.org/review/19920
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: Dario Lombardo <lomato@gmail.com>
2017-02-27 13:25:26 +00:00
Joerg Mayer 257359854a Fix error: extra ';' after member function definition [-Werror,-Wextra-semi]
Change-Id: I53aee8f259c3e855bf71160bbfd1d79254a5cdf4
Reviewed-on: https://code.wireshark.org/review/20290
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2017-02-26 19:40:39 +00:00
Gerald Combs dcfc288130 Qt: Enable/disable Capture Interfaces buttons consistently.
The "Compile BPFs" and "Start" buttons need to be enabled and disabled
at the same time and according to the same criteria. Make sure we do so.

Change-Id: I708886564dcf569cd71f936119195209ef6dcbd5
Reviewed-on: https://code.wireshark.org/review/20265
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-02-26 17:51:33 +00:00
Gerald Combs d8e16b79da [Automatic update for 2017-02-26]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: I3094033ff26c1d8da5abcc22a25e4075f6bc087f
Reviewed-on: https://code.wireshark.org/review/20285
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-02-26 16:11:56 +00:00
Alexis La Goutte b3539fdf86 apply_line_edit(.h): fix extra ';' inside a class [-Wextra-semi] (clang) / extra ‘;’ [-Wpedantic] (gcc)
Change-Id: Ie75da8de308a5fe3a063cf929d0bb2ab739ad96f
Reviewed-on: https://code.wireshark.org/review/20276
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-02-26 15:10:32 +00:00