Commit Graph

4973 Commits

Author SHA1 Message Date
Guy Harris d0865fd619 Allow bigger snapshot lengths for D-Bus captures.
Use WTAP_MAX_PACKET_SIZE_STANDARD, set to 256KB, for everything except
for D-Bus captures.  Use WTAP_MAX_PACKET_SIZE_DBUS, set to 128MB, for
them, because that's the largest possible D-Bus message size.  See

	https://bugs.freedesktop.org/show_bug.cgi?id=100220

for an example of the problems caused by limiting the snapshot length to
256KB for D-Bus.

Have a snapshot length of 0 in a capture_file structure mean "there is
no snapshot length for the file"; we don't need the has_snap field in
that case, a value of 0 mean "no, we don't have a snapshot length".

In dumpcap, start out with a pipe buffer size of 2KB, and grow it as
necessary.  When checking for a too-big packet from a pipe, check
against the appropriate maximum - 128MB for DLT_DBUS, 256KB for
everything else.

Change-Id: Ib2ce7a0cf37b971fbc0318024fd011e18add8b20
Reviewed-on: https://code.wireshark.org/review/21952
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>
2017-06-05 05:28:26 +00:00
Gerald Combs 916f1a6cf0 [Automatic update for 2017-06-04]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: I95d3c8d0ce5c4215730d461f00812d48fd697892
Reviewed-on: https://code.wireshark.org/review/21932
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-06-04 08:09:33 +00:00
Michael Mann 0c166f947e Bugfix GTK Decode As
Current layer number needs to be unconditionally saved after v2.3.0rc0-3740-ge1f84f985e,
which increased the number of dissectors that use current layer number to
determine Decode As value.

Change-Id: Ib82370af94ea00613a337890369e228cffa1ed81
Reviewed-on: https://code.wireshark.org/review/21928
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-06-04 01:50:30 +00:00
Guy Harris 30c86f8b34 Don't keep the pcap/pcapng link-layer header type as interface data.
Either 1) it can be determined from the libwiretap encapsulation type,
in which case it's redundant information or 2) there *is* no pcap/pcapng
link-layer header type for that encapsulation type, in which case you
need to check for the attempt to determine it failing and handle that
failure appropriately.

Change-Id: Ie9557b513365c1fc8c6df74b9c8239e29aad46bc
Reviewed-on: https://code.wireshark.org/review/21924
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-06-03 19:59:08 +00:00
Stig Bjørlykke e4c15408de Qt: Add version check for setTextInteractionFlags
This property was introduced in Qt 5.1.

Change-Id: I3446886d65fbeaf011a69071b605b044e5205b60
Reviewed-on: https://code.wireshark.org/review/21895
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-06-02 11:56:03 +00:00
Stig Bjørlykke 6751928e9c Qt: Enable unhiding all interfaces.
When having hidden interfaces it was not possible to unhide all
in the "Manage Interfaces" dialog because prefs.capture_devices_hide
was not updated when not having any hidden interfaces.

This bug was introduced in g6eee29bf.

Change-Id: If94c2e592eea60e6f1ef1ce2107ff9b2b27c3176
Reviewed-on: https://code.wireshark.org/review/21869
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-06-01 08:57:18 +00:00
Gerald Combs 6a37b542e4 Qt+prefs: Add a dark theme check and default colors.
Add prefs_set_gui_theme_is_dark and call it in the WiresharkApplication
constructor. Add a set of dark syntax color defaults.

We could alternatively add a preference for the syntax foreground color,
but that would imply adding a preference for the background color as
well.

Bug: 11131
Bug: 13738
Change-Id: Iefe135ed04e63372ed434c5b9759647c9f4046e3
Reviewed-on: https://code.wireshark.org/review/21827
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-06-01 08:07:05 +00:00
Stig Bjørlykke dc7b9cdb41 Qt: Disable -Wframe-larger-than= for ui_main_window.h
The generated Ui_MainWindow::setupUi() can grow larger than our configured
limit, so turn off -Wframe-larger-than= for ui_main_window.h.

Change-Id: I550ff30ebe566b711c63f7a9d0276e5b06244407
Reviewed-on: https://code.wireshark.org/review/21866
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-06-01 07:27:05 +00:00
Stig Bjørlykke 7f96ffe5d4 Qt: Capitalize "Select SACKs" in tcptrace graph.
Change-Id: I2d0b433fec482431f6ccfe6f8fe6576193fc7773
Reviewed-on: https://code.wireshark.org/review/21863
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-05-31 18:54:05 +00:00
Stig Bjørlykke 152996652d Qt: Add cast to QByteArray.resize()
Change-Id: I651cf6e625b8c757820a1e879f3fbde99746ba88
Reviewed-on: https://code.wireshark.org/review/21860
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-05-31 17:10:46 +00:00
Michael Mann 6c44f2017c Qt: Add support to verify extcap capture filter
Bug: 11668
Change-Id: Ib218d87c1905e53ffdab4e3dd6f93ba2c3d07c8b
Reviewed-on: https://code.wireshark.org/review/21770
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-05-30 18:10:03 +00:00
Michael Mann 4e05adcfb2 GTK: Bugfix not allowing extcap capture filters to be verified.
Matches Id45052f21ebb290bf92c201370584156a65f2e19

Change-Id: I2b097d176ec3ce0637af95d66d2f58b834c79ea2
Reviewed-on: https://code.wireshark.org/review/21783
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-05-29 17:00:45 +00:00
Stig Bjørlykke 10d7e391b3 Qt: Fix capture filter verification for non-extcap interfaces.
Change-Id: Id45052f21ebb290bf92c201370584156a65f2e19
Reviewed-on: https://code.wireshark.org/review/21777
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-05-29 15:33:02 +00:00
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
Jaap Keuter 2023f419f4 Qt: About dialog fails when configured without plugins
The about dialog compilation fails when plugins and LUA are disabled.
Add the missing preprocessor statements.
Also make the plugin tab really empty when there's nothing to report.

Change-Id: Idba0dc86e7110e56b2d949f517c966a121d28e47
Reviewed-on: https://code.wireshark.org/review/21768
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-05-27 12:20:02 +00:00
Peter Wu c9b0e9c813 Report syntax errors in UAT prefs parsing
Add the cause for a syntax error while parsing UATs. Example output:

    $ tshark -ouat:ssl_keys:,
    tshark: Invalid -o flag "uat:ssl_keys:,": ssl_keys:1: No IP address given.
    $ tshark -ouat:unknown:,
    tshark: Invalid -o flag "uat:unknown:,": Unknown preference

Change-Id: I549406c4e31a81d29f487ef47bdb3c22da084947
Reviewed-on: https://code.wireshark.org/review/21748
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-05-26 17:31:01 +00:00
Michael Mann d14b8f6fc5 GTK: Don't allow extcap capture filters to be verified.
There isn't an API to do it and if WinPcap isn't present it can
cause a crash.

Change-Id: I5338f854acb26f0822ac027e6c853a550da3f7b1
Reviewed-on: https://code.wireshark.org/review/21758
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-05-25 22:18:52 +00:00
Michael Mann 9bd2b63968 Don't try to compile capture filter if pcap_compile isn't available.
This is most likely due to WinPcap not being installed.

Bug: 13672
Change-Id: Ic7069f98c7f8068cdc5045204c2e23ab56b3f7eb
Reviewed-on: https://code.wireshark.org/review/21757
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-05-25 22:14:45 +00:00
Gerald Combs 333711430a [Automatic update for 2017-05-21]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: I4a0774a6aa3ecb101b7ca0a87571544dc936012d
Reviewed-on: https://code.wireshark.org/review/21723
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-05-21 08:15:14 +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 4424a8e862 Qt: Check for no tvb in Show Packet Bytes
Bug: 13723
Change-Id: I145fe93fc05a9cfdc6c0fc949274a1e88dcf2f1e
Reviewed-on: https://code.wireshark.org/review/21709
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:23 +00:00
Jakub Zawadzki 400bff055f sharkd: export uat records.
Move gtk's fld_tostr() to epan API as uat_fld_tostr.

Change-Id: I01e3b66ca9ea3cd1e2e06e2122190ee42b9ad44b
Reviewed-on: https://code.wireshark.org/review/21664
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-05-16 04:27:05 +00:00
Gerald Combs d8df8415af [Automatic update for 2017-05-14]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: Ia7833dc62cb4f4687da664b66eba6c5f31437f9a
Reviewed-on: https://code.wireshark.org/review/21630
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-05-14 08:14:09 +00:00
Guy Harris 635ae3d147 Don't include pcap headers if you don't have pcap.
Don't try to compile code that uses pcap if you don't have it.

Change-Id: Ifa98b4ff47783f5347cb6e1129bbf4e5cac35aab
Reviewed-on: https://code.wireshark.org/review/21611
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-05-12 02:24:45 +00:00
Guy Harris 7321183716 Put the HAVE_REMOTE hack into wsutil/wspcap.h, and include that file.
Have a header file that defines HAVE_REMOTE if HAVE_PCAP_REMOTE is
defined, and then includes pcap.h.  Replace all other includes of
pcap.h, and the definition of HAVE_REMOTE, with includes of that file.
Check for anything other than wspcap.h including pcap.h in checkAPIs.pl.

Change-Id: I3cbee8208944ad6f006f568b3fe3134e10b2a883
Reviewed-on: https://code.wireshark.org/review/21605
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-05-11 19:58:15 +00:00
Guy Harris 79eab8ca07 Force HAVE_REMOTE to be defined when including pcap.h with remote support.
WinPcap made the mistake of having stuff in its public header fines
depend on a configuration #define, HAVE_REMOTE; this means that we need
to forcibly define it when building with remote capture support.

The tip of the libpcap master branch does not have that botch; hopefully
future versions of libpcap-for-Windows will be based on that libpcap and
thus lack that botch as well.

Defining HAVE_REMOTE in config.h is not the right fix, as it makes it
look like a *Wireshark* configuration option that code in Wireshark
should test, rather than a *WinPcap* configuration option that the
pcap.h that ships with the WinPcap SDK should have been changed, as part
of the build process, to correctly define or not, so that users of
WinPcap don't have to define it themselves.

Change-Id: I62d1eca6d3c900d0dcc9fbc011db77f595a86313
Reviewed-on: https://code.wireshark.org/review/21593
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-05-11 10:57:22 +00:00
Peter Wu ab504191fc Qt: try harder to find a working monospace font
QFont::toString returned the default font (which might be unavailable),
leading to use of non-monospace fonts in the bytes view. Detect the
effective font instead and apply it to avoid this issue.

Add additional logic to invoke font detection when the configured font
is bad (for example, because of the bug or because a font has been
removed in meantime).

Bug: 13638
Change-Id: I8a625cf365c90119caebe8c4deada0df7426e53a
Reviewed-on: https://code.wireshark.org/review/21551
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
Petri-Dish: Jörg Mayer <jmayer@loplof.de>
Tested-by: Jörg Mayer <jmayer@loplof.de>
Reviewed-by: Ahmad Fatoum <ahmad@a3f.at>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-05-08 03:07:43 +00:00
Gerald Combs 2aa3adf559 [Automatic update for 2017-05-07]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: Iae34b6ae74e4b6f891756732107aa1fdfa9ffa51
Reviewed-on: https://code.wireshark.org/review/21541
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-05-07 15:19:29 +00:00
Jaap Keuter 8e52cfb891 Qt: Inhibit Disable Protocol when applicable
The packet details context menu allows you, through the Protocol
Preferences sub menu to manipulate (disable) the protocol dissection
through the Disable <protocol>... option. This opens up the appropriate
dialog and select the applicable protocol.
This fails for protocols which have their can_toggle flag reset (e.g.
the frame protocol). The dialog opens, but the protocol can't be found,
hence the top item is selected.

Instead disable the menu option for protocols which can't have their
enabled state toggled.

Change-Id: Ifa83f656a8ab747f379d3ca0114520e5efed4b67
Reviewed-on: https://code.wireshark.org/review/21494
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
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-05-04 21:20:42 +00:00
Stig Bjørlykke 527c31fdc9 Qt: Fix build without extcap
Change-Id: Ibfcdb719408c0172ae78bf3b2761ff551ff6313c
Reviewed-on: https://code.wireshark.org/review/21461
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-05-02 12:37:04 +00:00
Stig Bjørlykke 741d4f5898 Qt: Interface Toolbar improvements
- Select one of the capturing interfaces when start capture
- Only send user changed control values when start capture
- Don't show hidden interfaces
- Allow a toolbar with no interfaces
- Renamed button role "reset" to "restore"
- Improved control number validation
- Updated documentation

Change-Id: Icc8d04043c95c1f3ef8d7cdc3b251be4471cba0a
Reviewed-on: https://code.wireshark.org/review/21445
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-02 09:34:01 +00:00
Gerald Combs 5de615c0a7 [Automatic update for 2017-04-30]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: I491517d8801f9b5d3d3084102ed35b418460e4b6
Reviewed-on: https://code.wireshark.org/review/21427
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-04-30 15:16:57 +00:00
Stig Bjørlykke 8012dcc712 Qt: Remove semicolon behind Q_UNUSED macro
Change-Id: Ief5f7bca5d110df8958307b58fc11bf740787dfd
Reviewed-on: https://code.wireshark.org/review/21349
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-04-26 06:30:21 +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
Stig Bjørlykke 3b5cfa9a77 Qt: Don't use _U_ for unused parameters in C++
Change-Id: If7acab5f438bb20b053fdcfef86b2f06765b5321
Reviewed-on: https://code.wireshark.org/review/21341
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-04-26 06:11:20 +00:00
Guy Harris f493bad8a2 Fix no-extcap build.
Change-Id: I9f01264bf5f0c28a4d871f6d983e9efed1c23259
Reviewed-on: https://code.wireshark.org/review/21347
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-26 04:48:42 +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 f9f2b84e65 Qt: Make text in SimpleDialog selectable by mouse
This makes it easier to copy error messages.

Change-Id: I39284d9b2d716336c6fc4b211e5346abcebf0aee
Reviewed-on: https://code.wireshark.org/review/21326
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 08:06:21 +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
Guy Harris e52c95c6c8 Move UI-only stuff out of libwireshark.
Packet ranges are used only in the UI; move the packet range stuff into
libui.

Don't pass a print_args_t structure to libwireshark packet-printing
routines, just pass the few parameters they need.  Move the declaration
of print_args_t into file.h.

Change-Id: Icff5991eea7d7d56f33b4716105895263d275bcf
Reviewed-on: https://code.wireshark.org/review/21308
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>
2017-04-24 03:38:21 +00:00
Gerald Combs 69762f5d1c [Automatic update for 2017-04-23]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: If8e6efa61c4c2808c51c585b0c61fd76a321c3fd
Reviewed-on: https://code.wireshark.org/review/21298
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-04-23 15:17:54 +00:00
Guy Harris 804d3f6245 Use cfile_write_failure_message() in the randpkt code.
Change-Id: I32ef7ff85f854782e5dd02c3e7f12436a120bc13
Reviewed-on: https://code.wireshark.org/review/21259
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-20 21:07:35 +00:00
Guy Harris 64ec2b2e5e Take the error message generation out of the merge_files routines.
Have them just return the information needed for the caller to produce
an error message, and have the callers use the new cfile_ routines for
reporting errors.

This requires that the "write failure alert box" routine take the
*input* file name as an argument, so that, on a merge, if the problem is
that a record from a given input file can't be written out to the type
of output file we're generating, the input file name can be given, along
with the record number in that file.

Change-Id: If5a5e00539e7e652008a523dec92c0b359a48e71
Reviewed-on: https://code.wireshark.org/review/21257
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-20 20:25:59 +00:00
Guy Harris d97ce76161 cf_open() pops up a dialog box on errors; its callers shouldn't do so.
Change-Id: I1c65854b5bde1c64d70cb17a13080829f0faa27b
Reviewed-on: https://code.wireshark.org/review/21253
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-20 18:47:34 +00:00
Guy Harris 9e9d284d91 Have separate routines for open-for-reading and open-for-writing errors.
Expand comments while we're at it.

Change-Id: I6dcc791eab1c9e323a9572f3d54720d223bdd64b
Reviewed-on: https://code.wireshark.org/review/21252
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-20 18:24:20 +00:00
Guy Harris d09ef61459 Make the command-line and alert-box failure messages more similar.
Change-Id: I94af221a0ce8b6b3ff8e0e1b94d5379351ac0962
Reviewed-on: https://code.wireshark.org/review/21251
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-20 17:15:22 +00:00
Peter Wu 9b0b2c3d59 Qt: show relative time for the IO Graph in an appropriate unit
The GTK+ UI performs automatic formatting of the units (us, ms, s) based
on the magnitude of the value (for MIN/MAX/SUM calculations). Internally
the numbers are stored as integers (microseconds).

The Qt UI did not have this formatting feature yet and would therefore
display the values as-is (in microseconds). This patch rescales the Y
value and appends an appropriate label (s, ms or us).

With multiple graphs, rescaling is disabled completely for simplicity
(GTK+ would still try to find an appropriate unit prefix if there are
multiple time graphs).

Bug: 12828
Change-Id: I26ed68fc3497e06ac283a618fee8b673b1b0cf71
Reviewed-on: https://code.wireshark.org/review/21062
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-20 15:18:36 +00:00
Peter Wu 691d803037 Qt: Prevent moving other columns on drag and drop
This workaround prevents moving around other columns during drag and
drop and also transfers the sorting order to the new position.

Bug: 13183
Ping-Bug: 13540
Change-Id: I4609c63557bf3abf06ba417ac1b40cac22a82abc
Reviewed-on: https://code.wireshark.org/review/21022
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-20 15:06:19 +00:00
Max Dmitrichenko ba3fbc5adb memory leak: Qt code doesn't pass 'parent' argument to some Qt class constructors
found with valgrind

Change-Id: I2d73bd50a6f0e13b1817c8a518189c0e56558f72
Reviewed-on: https://code.wireshark.org/review/21227
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-04-20 11:24:20 +00:00