Commit Graph

13 Commits

Author SHA1 Message Date
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
Guy Harris 03c6937e62 Have routines for parsing options that affect dissection.
Have them handle -d, -t, --disable-protocol, --disable-heuristic, and
--enable-heuristic for TShark and both flavors of Wireshark.

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

Change-Id: I01906b494d0a13ce70d27c00ebbe03e6ec87cbd7
Reviewed-on: https://code.wireshark.org/review/18332
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
2016-10-23 23:25:49 +00:00
Guy Harris 8629e60922 More signed vs. unsigned argument cleanups.
Use the get.*guint32 routines to get unsigned values.

Change-Id: I75e83b2d21bdf08c7c995e36e4deb3b1c6d6959d
Reviewed-on: https://code.wireshark.org/review/17651
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-09-11 20:49:05 +00:00
Gerald Combs 5cf7fcdf0f Qt+Gtk: Fix the -t command line flag.
Add the time format to commandline_param_info_t and apply it when we've
finished application initialization.

Bug: 12489
Change-Id: Ice626198a610567e945a8e53c0c1093797e8208e
Reviewed-on: https://code.wireshark.org/review/16232
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-07-01 02:10:22 +00:00
Guy Harris f0e676496d Global, not static.
Change-Id: I185a1786365f185f18f3ec492a8ef165d61595ed
Reviewed-on: https://code.wireshark.org/review/16185
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-06-28 02:58:46 +00:00
Guy Harris 3ebac2babb Have commandline_other_options() directly fill in the global structure.
Other code looks at the global structure, so there won't be other
structures; just fill in the global structure directly.

Change-Id: I4dc87b79168c5a7c9ab1f085aa2d78cc6d2c9019
Reviewed-on: https://code.wireshark.org/review/16184
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-06-28 02:55:38 +00:00
Guy Harris 5d019cfb13 Make quit_after_cap an item in commandline_param_info_t.
And make the commandline_info structure global, so all the places that
look at quit_after_cap can get at it.

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

Change-Id: I0276dee2be48bae3498a819d8c0c2747fe1352e7
Reviewed-on: https://code.wireshark.org/review/16180
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-06-28 00:21:53 +00:00
Guy Harris 234d8eacec Pass the info strings directly to commandline_early_options().
Just pass them directly as arguments, don't stuff them into a structure.

Change-Id: Iac84226f54898bc953011bca64795e9049762905
Reviewed-on: https://code.wireshark.org/review/16022
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-06-19 21:12:41 +00:00
Guy Harris 85c805d60e Handle capture options in pcap-less Wireshark in the commandline_ routines.
Get rid of the capture_option_specified and arg_error members of the
commandline_capture_param_info_t and commandline_param_info_t
structures, and have them be local variables in
commandline_early_options() and commandline_other_options().  Have
commandline_early_options() print the "sorry, Wireshark wasn't built
with pcap" and exit if -D was specified but Wireshark wasn't built with
pcap.

Change-Id: I0efcdea89d9585af8f3c0a28aee060f33d3ec5fd
Reviewed-on: https://code.wireshark.org/review/16021
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-06-19 20:21:30 +00:00
Guy Harris 42985f4f17 Those aren't capture options, they're the options we must process early.
The only one of those options that has anything to do with packet
capture is -i, and all we do there is check for an argument of "-"; the
rest are either

	1) options that affect your preference settings (-C to select
	   the profile, -P to set the personal file directory path);

	2) options that just print something to the standard output or
	   error and exit, before firing up the GUI;

	3) extension command line options (-X).

Change-Id: Iba9b8b14fe468e2ca9d4c67e1a9b8103603678d9
Reviewed-on: https://code.wireshark.org/review/16019
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-06-19 19:56:04 +00:00
Michael Mann 9b5b4443cf Refactor command-line handling of GUI options.
Both GTK and Qt both use the same command-line options, so refactor
the parsing and (possibly) applying of those arguments to a single
location.

Ping-Bug: 12546
Change-Id: Ib31e576c509c5d3d21c33d3247640d9f9c68661b
Reviewed-on: https://code.wireshark.org/review/16006
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>
2016-06-19 05:56:45 +00:00