Commit Graph

157 Commits

Author SHA1 Message Date
Gerald Combs 1d030928ef Remove some GTK+-only code.
Change-Id: Ic2498c7acd6a1a522be45094148402ee34a6b4d1
Reviewed-on: https://code.wireshark.org/review/26958
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-17 03:44:47 +00:00
Stig Bjørlykke 5e7cd2dfc6 Qt: Rename packet_list_enable_color
Rename packet_list_enable_color() to packet_list_recolor_packets()
to reflect what it does.

Remove the call from where it's not needed.

Change-Id: I55dd1a9af8f5b1dbd83b06136a5bbcfddea06cdb
Reviewed-on: https://code.wireshark.org/review/26959
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-16 20:16:00 +00:00
Joerg Mayer 10134e9453 glib-compat is no longer used - it provided only code for versions < 2.32
Change-Id: I17e2c221cc40dbe9328458db9f17480c05bdc276
Reviewed-on: https://code.wireshark.org/review/26972
Petri-Dish: Jörg Mayer <jmayer@loplof.de>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2018-04-16 17:47:08 +00:00
Roland Knall d347091da9 Qt: Fix MacOSX menu entries
Remove various menu items added automatically on Mac OS X. The following
menu items have been removed:

- Edit / Start Dictation
- Edit / Emoji & Symbols
- View / Enter Fullscreen Mode
- View / Show Tab Bar - Hide Tab Bar

Bug: 13366
Change-Id: I44deae7ee8ea7a43926820e4f5d0517ece246939
Reviewed-on: https://code.wireshark.org/review/26823
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-04-09 15:44:22 +00:00
Roland Knall 3a928f1f87 Qt: Remove checks for version below 5.2
This stops the main source from being buildable by Qt 4.x

Change-Id: I61edbae04ac2b3bf0ae8ee8e09d335083945c176
Reviewed-on: https://code.wireshark.org/review/26756
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2018-04-05 18:48:57 +00:00
Gerald Combs dbfd53cd60 epan: Ignore SIGPIPE.
We need to ignore SIGPIPE whenever we use maxmind_db. Do so in
epan_init.

Ping-Bug: 14494
Change-Id: I4372935e371a94c02a79050d59b2e3ee1ba04fee
Reviewed-on: https://code.wireshark.org/review/26369
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-03-08 18:24:45 +00:00
Dario Lombardo 92bb9ec9da Fix compilation without pcap.
Change-Id: Id9f6b9189c7663062ecc569a33ca2c30c4c86760
Reviewed-on: https://code.wireshark.org/review/26213
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-03-01 19:21:08 +00:00
Gerald Combs b5b5f08be1 Qt: Make we shut down cleanly when exiting early.
Add an exit_application() routine that calls wsApp->quit() + exit() in
the Qt UI and exit() in the GTK+ UI. Make sure we call it instead of
exit() when needed.

Bug: 14395
Change-Id: I171b5fd19ce4664db4a2ebb4b8c33e278dcec427
Reviewed-on: https://code.wireshark.org/review/26121
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-03-01 08:44:00 +00:00
Gerald Combs e73e3580f6 Rename airpdcap to dot11decrypt.
Our 802.11 decryption code isn't tied to any specific product. Change
the file and API names to dot11decrypt.

Change-Id: I14fd951be3ae9b656a4e1959067fc0bdcc681ee2
Reviewed-on: https://code.wireshark.org/review/26058
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-02-24 11:56:18 +00:00
Guy Harris c61b543e97 Get rid of more new_ prefixes for statistics functions and types.
There are no "old" versions of them that we're keeping around.

Change-Id: I3c76a14d0ec1a06df39c547da37f4dea9987df4d
Reviewed-on: https://code.wireshark.org/review/25892
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-19 00:12:51 +00:00
Dario Lombardo 8cd389e161 replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later.
The first is deprecated, as per https://spdx.org/licenses/.

Change-Id: I8e21e1d32d09b8b94b93a2dc9fbdde5ffeba6bed
Reviewed-on: https://code.wireshark.org/review/25661
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-08 14:57:36 +00:00
Peter Wu 9be01dc616 Qt 4.8 compatibility fixes
Add missing include headers, define Q_NULLPTR for all Qt objects (to
avoid having to include an ugly compat header), use old signal/slot
syntax (Q_SIGNALS are protected in Qt 4.8), disable Qt 5 log message
handler, etc.

Change-Id: I449beb0b74050fdfb0fc5828d8fb74eedb2b45bf
Reviewed-on: https://code.wireshark.org/review/25469
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-01-25 17:17:13 +00:00
Gerald Combs 686aad42e9 Minor wireshark-qt.cpp cleanups.
Remove duplicate and unneeded code. Remove placeholder markers left over
from the initial port from GTK+.

Change-Id: I4b372057c40cce53d0a00a54e490dec2097a7423
Reviewed-on: https://code.wireshark.org/review/25462
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-25 05:26:10 +00:00
Gerald Combs c9a89e29e8 Qt: Add back the "ready to go" startup message.
The stdin capture test and at least one external application depends
on the "Wireshark is up and ready to go" startup message, so we need to
print it even when DEBUG_STARTUP_TIME isn't defined. Print the startup
time in seconds.

Change-Id: Ic1683b751f9cce30b8ca8a6122eddff44fcda015
Reviewed-on: https://code.wireshark.org/review/25440
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-01-24 03:15:56 +00:00
Stig Bjørlykke 98f4122398 Qt: Put all startup time logs in DEBUG_STARTUP_TIME
Change-Id: I545674ecae45458860627f8cf430b6fa524274fd
Reviewed-on: https://code.wireshark.org/review/25299
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-13 13:45:58 +00:00
Pascal Quantin fc9af81a13 wiretap: add a parameter to wtap_init() indicating whether plugins must be loaded
g995812c5f1 moved wiretap plugins registration from applications to
wiretap library init function.
As we do not want to load plugins for all users of libwiretap, let's
make it configurable.

Bug: 14314
Change-Id: Id8fdcc484e2d0d31d3ab0bd357d3a6678570f700
Reviewed-on: https://code.wireshark.org/review/25194
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-09 21:25:06 +00:00
Guy Harris 7ec5dead2f Copy preferences to capture options after the preferences are initially loaded.
We copy them after, for example, switching profiles; we should do so
when they're initially loaded as well.

Change-Id: Iadd67d20b1be8cc14be1b19543f914f71e4c9c00
Reviewed-on: https://code.wireshark.org/review/25208
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-01-08 23:41:26 +00:00
Dario Lombardo e80b40adbe extcap: remove conditional compilation.
Change-Id: Ia54bba388755cf27a343fe6d69d244bf1ab897f9
Reviewed-on: https://code.wireshark.org/review/25186
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-08 05:50:15 +00:00
Alexis La Goutte 6bd539d51f wireshark-qt(.cpp): fix no previous declaration for ‘void g_log_message_handler(QtMsgType, const QMessageLogContext&, const QString&)’ [-Wmissing-declarations]
Change-Id: Ia08cf5a03be10b8553516196e24d51e5f48934a7
Reviewed-on: https://code.wireshark.org/review/25122
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-03 12:34:44 +00:00
Uli Heilmeier f6d5b5fc10 QT: Fix qUtf8Printable error
macro qUtf8Printable() has been defined with QT 5.4
therefore we need qt_ui_utils.h included

Change-Id: I6301d5eda124d2033033c6a91447b15736cdc8c2
Reviewed-on: https://code.wireshark.org/review/24870
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2017-12-17 19:31:48 +00:00
Gerald Combs 889aacae6e Qt: Update our recent status sooner at startup.
Update our recent file status as soon as we read recent_common.

Run recent stats updates in the global thread pool.

Revert 15a97b5986 since it's no longer needed.

Change-Id: If1b08ea640dfcad26affab5d20c80c90fbf133f2
Reviewed-on: https://code.wireshark.org/review/24862
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-17 08:04:03 +00:00
Gerald Combs 6a5e90f2d9 Log output updates.
Add a Qt message handler that calls g_log. Add milliseconds to the
g_log_message_handler timestamp.

Change-Id: I5b1c1d902b6b05cd8daa01741b19d6c2048dfb9a
Reviewed-on: https://code.wireshark.org/review/24865
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-12-17 02:30:40 +00:00
João Valverde 995812c5f1 Refactor plugin registration and loading
Put different types of plugins (libwiretap, libwireshark) in different
subdirectories, give libwiretap and libwireshark init routines that
load the plugins, and have them scan the appropriate subdirectories
so that we don't even *try* to, for example, load libwireshark plugins
in programs that only use libwiretap.

Compiled plugins are stored in subfolders of the plugin folders, with
the subfolder name being the Wireshark minor version number (X.Y). There is
another hierarchical level for each Wireshark library (libwireshark, libwscodecs
and libwiretap).

The folder names are respectively plugins/X.Y/{epan,codecs,wiretap}.

Currently we only distribute "epan" (libwireshark) plugins.

Change-Id: I3438787a6f45820d64ba4ca91cbe3c8864708acb
Reviewed-on: https://code.wireshark.org/review/23983
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2017-12-14 08:43:57 +00:00
Gerald Combs 34b62c60bf Revert "Move fill_in_local_interfaces to a thread."
Calling scan_local_interfaces ends up calling fork via extcap. Doing so
from a thread is ill-adivsed:

https://rachelbythebay.com/w/2014/08/16/forkenv/
http://www.linuxprogrammingblog.com/threads-and-fork-think-twice-before-using-them

This reverts commit 5b4894b795.

Revert "fix compilation without pcap." as well.
This reverts commit 51300b3c83.

Change-Id: Ic80582b52398c44af73c6d74dbb3216c4d1b37fc
Reviewed-on: https://code.wireshark.org/review/24772
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-12-11 23:29:00 +00:00
Dario Lombardo 51300b3c83 fix compilation without pcap.
Fix a regression introduced by I09beab751c9c2917f017b6c082166d86ca693544.

Change-Id: I57b971086470e836f4147500143c35494118e754
Reviewed-on: https://code.wireshark.org/review/24765
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-12-11 16:49:20 +00:00
Gerald Combs 5b4894b795 Move fill_in_local_interfaces to a thread.
Move fill_in_local_interfaces to a worker thread and start it as early
as possible. Add a mutex for global_capture_opts.

Change-Id: I09beab751c9c2917f017b6c082166d86ca693544
Reviewed-on: https://code.wireshark.org/review/24757
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-11 04:21:49 +00:00
João Valverde 5fc43fe63a Rewrite make-tap-reg.py in C
Change-Id: Ief5b1fffecc9712c01ff10292c403b7c84a5908a
Reviewed-on: https://code.wireshark.org/review/24756
Reviewed-by: João Valverde <j@v6e.pt>
2017-12-11 02:52:28 +00:00
Guy Harris ccc55bc80c Put the structure of a capture_file back in cfile.h.
The split isn't necessary now that epan no longer uses the capture_file
structure.

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

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

Never directly refer to struct _capture_file except when typedeffing
capture_file.

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

Change-Id: I7931c8039d75ff7c980b0f2a6e221f20e602a556
Reviewed-on: https://code.wireshark.org/review/24686
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-12-03 18:54:37 +00:00
Gerald Combs dd562b503f Qt: Move the MIME init thread to WiresharkApplication.
The Qt 4.8 "Starting a Thread" document at
http://doc.qt.io/qt-4.8/threads-starting.html says,

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

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

QMimeDatabase was added in Qt 5.0. Add version checks.

Change-Id: Ic80ebb8692e93b1e4aea7a8670f4fcf45e385b29
Reviewed-on: https://code.wireshark.org/review/24512
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-11-20 22:08:09 +00:00
Gerald Combs c2b9c90367 Qt: Use QThreadPool instead of QThread.
I'm not sure how many Qt worker threads we're going to create at
startup, but using a thread pool is simple enough.

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

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

Change-Id: I27e3d65d8ee1308a62d12d3ff7e1b95f82c2e75a
Reviewed-on: https://code.wireshark.org/review/24471
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-11-17 20:26:27 +00:00
Gerald Combs 775bbbcded Start using SPDX license identifiers.
A while back Graham pointed out the SPDX project (spdx.org), which is
working on standardizing license specifications:

https://www.wireshark.org/lists/wireshark-dev/201509/msg00119.html

Appendix V of the specification describes a short identifier
(SPDX-License-Identifier) that you can use in place of boilerplate in
your source files:

https://spdx.org/spdx-specification-21-web-version#h.twlc0ztnng3b

Start the conversion process with our top-level C and C++ files.

Change-Id: Iba1d835776714deb6285e2181e8ca17f95221878
Reviewed-on: https://code.wireshark.org/review/24302
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Balint Reczey <balint@balintreczey.hu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-11-09 20:03:51 +00:00
João Valverde 6e3133c41c AirPcap is Windows only, reflect that in about dialog
Change-Id: Iecde2ada76a63da47e80cf0188945dab2a7e5b89
Reviewed-on: https://code.wireshark.org/review/24023
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2017-10-22 22:28:21 +00:00
João Valverde a269ae1b6a Rename "ws_version_info.h", also .c
It's not installed so like most other files it doesn't need or benefit
from the prefix.

Change-Id: I01517e06f12b3101fee21b68cba3bc6842bbef5c
Reviewed-on: https://code.wireshark.org/review/23751
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
2017-09-26 17:32:08 +00:00
Mikael Kanstrup a8a3903e55 Qt: Free MainWindow at shutdown
MainWindow is allocated on heap on startup but not freed on shutdown.
Free the object at shutdown mainly to silent Valgrind.

When at it also fix two problems with the MainWindow destructor:
- Deleting main_ui_ triggers a currentChanged signal which in turn
  calls mainStackChanged that references the freed main_ui_ object.
  Prevent use after free error by disconnecting from the signal before
  freeing.

- Explicitly free file_set_dialog_ as no rparent perform the cleanup.

Bug: 14071
Change-Id: I9c1fbef04cf68bfffffea57ef298f4896d6583f9
Reviewed-on: https://code.wireshark.org/review/23739
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>
2017-09-25 23:37:56 +00:00
Mikael Kanstrup 3ce30eb1fd Fix leaks related to recent settings
Fix leaks related to recent settings reported by Valgrind simply after starting/stopping
application.

Bug: 14071
Change-Id: Ib4f205218945c8776724899c0dd99cc81b79a41d
Reviewed-on: https://code.wireshark.org/review/23599
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-09-20 05:47:25 +00:00
Mikael Kanstrup 8873c7e494 iface_lists: Access all_ifaces member by reference
Change access of all_ifaces elements from by val to by reference.
With this change unnecessary copying of the whole struct is avoided
but even more important is that elements no longer have to be
removed and inserted whenever data is updated.

This change aims to make it more clear that all_ifaces elements
shall never be removed from the array without freeing resources
via the capture_opts_free_interface_t function.

NOTE: Code for GTK UI not updated

Ping-Bug: 13864
Change-Id: I36742cb1d5c8daa136c9d3732a044a7c8e5c7fe7
Reviewed-on: https://code.wireshark.org/review/23201
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-08-28 14:41:43 +00:00
Dario Lombardo 7b44ff084a Qt: fix compilation without pcap.
Change-Id: I277059e018a41ea011043d255508db4c5f05f63d
Reviewed-on: https://code.wireshark.org/review/23162
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-08-22 16:44:25 +00:00
Ahmad Fatoum aca55a29f7 Add hardware timestamping support
pcap provides a pcap_set_tstamp_type function, which can be used to request
hardware timestamps from a supporting kernel.

This patch adds support for aforementioned function as well as two new
command line options to dumpcap, wireshark and tshark:

    --list-time-stamp-types
                             List time stamp types supported for the interface
    --time-stamp-type <type>
                             Change the interface's timestamp method

Name choice mimics those used by tcpdump(1), which already supports this
feature. However, unlike tcpdump, we provide both options unconditionally.
If Wireshark was configured without pcap_set_tstamp_type being available,
--list-time-stamp-types reports an empty list.

Change-Id: I418a4b2b84cb01949cd262aad0ad8427f5ac0652
Signed-off-by: Ahmad Fatoum <ahmad.fatoum@siemens.com>
Reviewed-on: https://code.wireshark.org/review/23113
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-08-22 07:55:26 +00:00
Gerald Combs 4053bde54b Qt: Restrict AA_EnableHighDpiScaling to Windows.
Setting Qt::AA_EnableHighDpiScaling on X11 causes problems:
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=13877#c20

Limit its use to Windows.

Change-Id: I8c11c575b2680402689644bcc5c224da876bba67
Ping-Bug: 13877
Reviewed-on: https://code.wireshark.org/review/22988
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-08-07 17:08:53 +00:00
Gerald Combs cf0870ad21 Qt: Set AA_EnableHighDpiScaling at startup.
Set Qt::AA_EnableHighDpiScaling before creating wsApp so that various UI
elements are scaled properly on Windows.

Change-Id: Iee4ff2d97b0834756c805fb3812d556ad3480436
Ping-Bug: 13877
Reviewed-on: https://code.wireshark.org/review/22826
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>
2017-07-28 02:13:10 +00:00
Roland Knall ddfc1d37cc Qt: Move utils to separate utils directory
Following the move for widgets directory, moving utils
to the utils directory. Guidelines for this directory are:

 - Generic use but not a widget
 - Utility functionality used by many classes
 
 Note: additionally all includes affected by this move have been changed
 to absolute path includes, instead of relative ones.

Change-Id: I019ae4b6e6f6d06a5745a63ed195edbd36fb936b
Reviewed-on: https://code.wireshark.org/review/22602
Petri-Dish: Roland Knall <rknall@gmail.com>
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-07-26 10:11:55 +00:00
Gerald Combs c6ed05ec73 Qt: Make SimpleDialog a plain, non-QObject class.
Don't assume that the application is initialized when we create a
SimpleDialog.

Bug: 13275
Change-Id: Ieeb52430500570db88463069833855c3789f686b
Reviewed-on: https://code.wireshark.org/review/22778
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-07-25 04:56:10 +00:00
Stig Bjørlykke 3b5c88ea4b wsutil: Back out profile_write_info_file
Change-Id: I89a9aaeeba1689cce04f239dafdc9003492aba16
Reviewed-on: https://code.wireshark.org/review/22346
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-06-22 14:59:45 +00:00
Stig Bjørlykke 7af770dfa7 wsutil: Return error from profile_write_info_file
Change-Id: I1d91cef01ced6cceaa75d1618ffcb59eae5b8e6f
Reviewed-on: https://code.wireshark.org/review/22325
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-06-22 02:41:59 +00:00
Stig Bjørlykke a14ef98540 Qt: Write a list of profile files at startup
This file will contain all personal config files which will be
fetched from a profile.

Change-Id: I430ca84ccefc17f0e21c8efb93a92602ab8d5661
Reviewed-on: https://code.wireshark.org/review/22303
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-06-21 15:23:58 +00:00
Stig Bjørlykke 4f1053c546 Qt: Create the user profiles dir at startup
Ensure the user profiles directory is created at startup so that
users can put downloaded profiles without creating the directory.

Change-Id: Ib06bb3055daef8fd9e78d7887ce56f8fe50e48bf
Reviewed-on: https://code.wireshark.org/review/22275
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-06-20 19:45:03 +00:00
Martin Mathieson 8638eb91c7 Add g_get_monotonic_time() to glib-compat and use
Change-Id: If41dab19692516270e8b4bcf1a8a954bb8dc3ccc
Reviewed-on: https://code.wireshark.org/review/21480
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-05-04 03:45:07 +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