From Edwin Groothuis via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8353...
authorcmaynard <cmaynard@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 20 Feb 2013 03:06:46 +0000 (03:06 +0000)
committercmaynard <cmaynard@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 20 Feb 2013 03:06:46 +0000 (03:06 +0000)
From me: Don't print an error message for "-z help".

(Only "http,stat," is suitable for backport to 1.8 and 1.6)

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@47763 f5534014-38df-0310-8fa8-9805f1628bb7

doc/tshark.pod
tshark.c

index a526f261a8e126862dacb2272d6649bf74f51040..dfbc97b5365d2a657daaca806582b143423c931f 100644 (file)
@@ -769,6 +769,10 @@ Currently implemented statistics are:
 
 =over 4
 
+=item B<-z help>
+
+Display all possible values for B<-z>.
+
 =item B<-z> afp,srt[,I<filter>]
 
 =item B<-z> camel,srt
@@ -976,6 +980,28 @@ and IPv6 addresses are dumped by default.
 Addresses are collected from a number of sources, including standard "hosts"
 files and captured traffic.
 
+=item B<-z> http,stat,
+
+Calculate the HTTP statistics distribution. Displayed values are
+the HTTP status codes and the HTTP request methods.
+
+=item B<-z> http,tree
+
+Calculate the HTTP packet distribution. Displayed values are the
+HTTP request modes and the HTTP status codes.
+
+=item B<-z> http_req,tree
+
+Calculate the HTTP requests by server. Displayed values are the
+server name and the URI path.
+
+=item B<-z> http_srv,tree
+
+Calculate the HTTP requests and responses by server. For the HTTP
+requests, displayed values are the server IP address and server
+hostname. For the HTTP responses, displayed values are the server
+IP address and status.
+
 =item B<-z> icmp,srt[,I<filter>]
 
 Compute total ICMP echo requests, replies, loss, and percent loss, as well as
index c6a42782ee4137ebc9e5240a9e9e343aa677df71..06954b01b44fde9586487c3b9630dd72c4dac299 100644 (file)
--- a/tshark.c
+++ b/tshark.c
@@ -1479,6 +1479,11 @@ main(int argc, char *argv[])
          part of a tap filter.  Instead, we just add the argument
          to a list of stat arguments. */
       if (!process_stat_cmd_arg(optarg)) {
+        if (strcmp("help", optarg)==0) {
+          fprintf(stderr, "tshark: The available statistics for the \"-z\" option are:\n");
+          list_stat_cmd_args();
+          return 0;
+        }
         cmdarg_err("Invalid -z argument \"%s\".", optarg);
         cmdarg_err_cont("  -z argument must be one of :");
         list_stat_cmd_args();