aboutsummaryrefslogtreecommitdiffstats
path: root/ui/commandline.c
AgeCommit message (Collapse)AuthorFilesLines
2017-04-17Clean up documentation and help messages for protocol enabling/disabling.Guy Harris1-0/+2
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-05A bunch of "{Mac} OS X" -> "macOS" changes.Guy Harris1-1/+1
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-03-28Reflect new default value of snaplen in man pages.Martin Sehnoutka1-1/+1
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>
2016-12-24Add enabled protocol list for dissectors who are disabled by defaultMichael Mann1-0/+1
We save a list of dissectors that are disabled through the Enabled Protocols dialog. This is because we assume dissectors are enabled by default. For dissectors that are disabled by default, we have no way to keep them enabled through the Enabled Protocols dialog. A dissector that defaults to being disabled has to be reset to enabled each time Wireshark is launched. Add a list similar to the disabled list for enabling dissectors that are disabled by default. This mostly applies to post-dissectors. Change-Id: I31a8d97a9fdbc472fe2a8666384e0f8786bb8e9f Reviewed-on: https://code.wireshark.org/review/19405 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-12-23Initialize the dissection options along with the other command-line options.Guy Harris1-0/+1
Change-Id: I35ff8f36d12831d408666c3422444371a2ac0c25 Reviewed-on: https://code.wireshark.org/review/19391 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-10-31Handle -K, -n, -N, and -u in the common dissection option code.Guy Harris1-36/+5
Also update tfshark to use that code. Change-Id: Ic03fb8ff48c8bfc460298d180b436e53f0076cbe Reviewed-on: https://code.wireshark.org/review/18588 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-31Have the routine that handles dissection options not exit.Guy Harris1-1/+2
Have it return TRUE if the option is OK and FALSE if it isn't, and let its caller exit as appropriate. Also, rename it - it's not adding something to a collection, it's just handling the option. Change-Id: I41863cbb67b7c257d900d3011609891b9b4a7467 Reviewed-on: https://code.wireshark.org/review/18587 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-10-30Have routines for parsing options that affect dissection.Guy Harris1-48/+9
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-24Move --fullscreen out of LONGOPT_CAPTURE_COMMON.Guy Harris1-0/+12
It's not a capture option, so it doesn't belong there. Change-Id: I8aa6719a5a8e90c734c7acfc01b1ba2818498de3 Reviewed-on: https://code.wireshark.org/review/18427 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-10-23Qt: add fullscreen feature.Dario Lombardo1-0/+5
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-14UI: Free up the -m flag.Gerald Combs1-4/+0
The -m (monospace font) flag was deprecated in 2.2. Go ahead and remove it in 2.3 / 2.4. Change-Id: I6b4911174675cedec979621c2776353314e73eb1 Reviewed-on: https://code.wireshark.org/review/18193 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-09-11More signed vs. unsigned argument cleanups.Guy Harris1-1/+1
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-07-01Qt+Gtk: Fix the -t command line flag.Gerald Combs1-10/+11
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-06-28Global, not static.Guy Harris1-0/+2
Change-Id: I185a1786365f185f18f3ec492a8ef165d61595ed Reviewed-on: https://code.wireshark.org/review/16185 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-06-28Have commandline_other_options() directly fill in the global structure.Guy Harris1-32/+32
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-28Don't set quit_after_cap if no pcap, as it's not present.Guy Harris1-1/+1
Change-Id: I871f75394ba66967d7d7be203bd9e235575458e1 Reviewed-on: https://code.wireshark.org/review/16183 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-06-28Make quit_after_cap an item in commandline_param_info_t.Guy Harris1-4/+1
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-28Pull quit_after_cap out of the global capture options.Guy Harris1-0/+4
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-27We need global_capture_opts if we have extcap, even without pcap.Guy Harris1-1/+1
Change-Id: I16b778064c1cd2bbf281fb5192bf35da252e99dd Reviewed-on: https://code.wireshark.org/review/16179 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-06-23Qt: Support the -j, -J, and -l command line flagsGerald Combs1-1/+1
Add support for -j, -J, and -l. Mark the -m flag deprecated. Bug: 12546 Change-Id: Ic44b3997840018e5d571aa1813a1646bce11d4a6 Reviewed-on: https://code.wireshark.org/review/16083 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-06-20Pull the options structure initialization into commandline_other_options().Guy Harris1-0/+15
Change-Id: I931cde27a81566dfa0ce6e5c9307bfc1a4d5fe54 Reviewed-on: https://code.wireshark.org/review/16033 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-06-20Protect some code that's only for Wireshark-with-pcap.Guy Harris1-0/+2
Put that code inside #ifdef HAVE_LIBPCAP/#endif. Change-Id: I85768fd49a008341a95ac3c8656e96afa6741fbe Reviewed-on: https://code.wireshark.org/review/16030 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-06-19Move some option checking to common code.Guy Harris1-0/+48
Change-Id: Icff9dacd73ea933c59ed664db05098dd8cb3dbf5 Reviewed-on: https://code.wireshark.org/review/16029 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-06-19Pass the info strings directly to commandline_early_options().Guy Harris1-2/+3
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-19Handle capture options in pcap-less Wireshark in the commandline_ routines.Guy Harris1-16/+35
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-19Fix indentation.Guy Harris1-1/+1
Change-Id: I71332dc35047e7d8d32b428fb99b8b9368c41de6 Reviewed-on: https://code.wireshark.org/review/16020 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-06-19Those aren't capture options, they're the options we must process early.Guy Harris1-1/+1
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-19Ability to invoke "Decode As..." as command-line argument for GUIshark.Michael Mann1-2/+10
TShark has had the functionality for awhile. While the GUI version still has ways to change and persist Decode As functionality, adding command line functionality gives the Decode As from initial launch of the GUI. Was also an excuse to refactor a bunch of code out of tshark.c Bug: 5143 Change-Id: Ie67007d75e897bc06cc9afd9b84372a96b93778c Reviewed-on: https://code.wireshark.org/review/16008 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-06-19Get rid of an unused variable; set a structure member.Guy Harris1-0/+3
There's no need for the capture_option_specified variable, but we *do* need to initialize the capture_option_specified member of *param_info before parsing the flags. Change-Id: I89d0b8c338c2784742b21ba4e854f702ce491849 Reviewed-on: https://code.wireshark.org/review/16017 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-06-19Fix problems when compiling without pcap.Guy Harris1-2/+2
Change-Id: Id682a76ac561f92f65638bbdfcd4236eb92e46b7 Reviewed-on: https://code.wireshark.org/review/16010 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-06-19Refactor command-line handling of GUI options.Michael Mann1-0/+637
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>