Add --print as an alias for -P, to match tcpdump.

tcpdump just got a --print option, which causes packet information to be
printed even if the raw packets are being saved to a file with -w.  We
have -P for the same purpose; make --print another name for it.

While we're at it:

	document --help and --version;

	just speak of -P/--print as causing printing even of the packet
	details, even though -V forces printing with -w, for consistency
	with how --print is documented for tcpdump;

	fix the description of -h/--help.

Change-Id: Idf650a202a09a2d1682edbd9d76123f1b1412b55
Reviewed-on: https://code.wireshark.org/review/23888
Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
Guy Harris 2017-10-11 12:31:16 -07:00
parent b2467fddb1
commit 9551aca9a6
2 changed files with 10 additions and 3 deletions

View File

@ -500,7 +500,9 @@ the type of record.
=item -h
Print the version and options and exits.
=item --help
Print the version and options and exit.
=item -H E<lt>input hosts fileE<gt>
@ -659,8 +661,10 @@ promiscuous mode.
=item -P
Decode and display the packet summary, even if writing raw packet data using
the B<-w> option.
=item --print
Decode and display the packet summary or details, even if writing raw
packet data using the B<-w> option.
=item -q
@ -835,6 +839,8 @@ Enter an empty tap name "" to get a list of available names.
=item -v
=item --version
Print the version and exit.
=item -V

View File

@ -676,6 +676,7 @@ main(int argc, char *argv[])
{"version", no_argument, NULL, 'v'},
LONGOPT_CAPTURE_COMMON
LONGOPT_DISSECT_COMMON
{"print", no_argument, NULL, 'P'},
{"export-objects", required_argument, NULL, LONGOPT_EXPORT_OBJECTS},
{"color", no_argument, NULL, LONGOPT_COLOR},
{"no-duplicate-keys", no_argument, NULL, LONGOPT_NO_DUPLICATE_KEYS},