same command line related changes as recently done with editcap
authorulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 11 Jan 2006 01:38:16 +0000 (01:38 +0000)
committerulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 11 Jan 2006 01:38:16 +0000 (01:38 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16996 f5534014-38df-0310-8fa8-9805f1628bb7

capinfos.c
doc/capinfos.pod

index 0a27f0cd80c7ca267631b8d460ffa2d6d02d69af..865e8d4f23394ca58a8e749fed6bcba13088e7ae 100644 (file)
@@ -210,22 +210,38 @@ static void usage(gboolean is_error)
     output = stderr;
   }
 
-
-  fprintf(output, "Usage: capinfos [-t] [-c] [-s] [-d] [-u] [-a] [-e] [-y]\n");
-  fprintf(output, "                [-i] [-z] [-h] <capfile>\n");
-  fprintf(output, "  where\t-t display the capture type of <capfile>\n");
-  fprintf(output, "       \t-c count the number of packets\n");
-  fprintf(output, "       \t-s display the size of the file \n");
-  fprintf(output, "       \t-d display the total length of all packets in the file\n");
-  fprintf(output, "       \t   (in bytes)\n");
-  fprintf(output, "       \t-u display the capture duration (in seconds) \n");
-  fprintf(output, "       \t-a display the capture start time\n");
-  fprintf(output, "       \t-e display the capture end time\n");
-  fprintf(output, "       \t-y display average data rate (in bytes)\n");
-  fprintf(output, "       \t-i display average data rate (in bits)\n");
-  fprintf(output, "       \t-z display average packet size (in bytes)\n");
-  fprintf(output, "       \t-h produces this help listing.\n");
-  fprintf(output, "\n      \t    If no data flags are given, default is to display all statistics\n");
+  fprintf(output, "Capinfos %s"
+#ifdef SVNVERSION
+         " (" SVNVERSION ")"
+#endif
+         "\n", VERSION);
+  fprintf(output, "Prints information about capture files.\n");
+  fprintf(output, "See http://www.ethereal.com for more information.\n");
+  fprintf(output, "\n");
+  fprintf(output, "Usage: capinfos [options] <infile> ...\n");
+  fprintf(output, "\n");
+  fprintf(output, "General:\n");
+  fprintf(output, "  -t display the capture file type\n");
+  fprintf(output, "\n");
+  fprintf(output, "Size:\n");
+  fprintf(output, "  -c display the number of packets\n");
+  fprintf(output, "  -s display the size of the file (in bytes)\n");
+  fprintf(output, "  -d display the total length of all packets (in bytes)\n");
+  fprintf(output, "\n");
+  fprintf(output, "Time:\n");
+  fprintf(output, "  -u display the capture duration (in seconds) \n");
+  fprintf(output, "  -a display the capture start time\n");
+  fprintf(output, "  -e display the capture end time\n");
+  fprintf(output, "\n");
+  fprintf(output, "Statistic:\n");
+  fprintf(output, "  -y display average data rate (in bytes/s)\n");
+  fprintf(output, "  -i display average data rate (in bits/s)\n");
+  fprintf(output, "  -z display average packet size (in bytes)\n");
+  fprintf(stderr, "\n");
+  fprintf(stderr, "Miscellaneous:\n");
+  fprintf(stderr, "  -h display this help and exit\n");
+  fprintf(output, "\n");
+  fprintf(output, "If no options are given, default is to display all infos\n");
 }
 
 int main(int argc, char *argv[])
index 6f476dbdbe19d76ddbdfcadd2ad20d2b5c719746..68933891ef479a78083e3b62c199487bb6630ae0 100644 (file)
@@ -1,7 +1,7 @@
 
 =head1 NAME
 
-capinfos - Prints information about binary capture files
+capinfos - Prints information about capture files
 
 =head1 SYNOPSYS
 
@@ -17,108 +17,25 @@ S<[ B<-y> ]>
 S<[ B<-i> ]>
 S<[ B<-z> ]>
 S<[ B<-h> ]>
-I<capfile>
+E<lt>I<infile>E<gt>
 I<...>
 
 =head1 DESCRIPTION
 
-B<Capinfos> is a program that reads one or more saved capture files and
-returns any or all of several statistics about each file.  B<Capinfos> is
-able to detect and read any capture supported by the B<Ethereal> package.
-
-B<Capinfos> can read the following file formats:
-
-=over 4
-
-=item *
-libpcap/WinPcap, tcpdump and various other tools using tcpdump's capture format
-
-=item *
-B<snoop> and B<atmsnoop>
-
-=item *
-Shomiti/Finisar B<Surveyor> captures
-
-=item *
-Novell B<LANalyzer> captures
-
-=item *
-Microsoft B<Network Monitor> captures
-
-=item *
-AIX's B<iptrace> captures
-
-=item *
-Cinco Networks B<NetXRay> captures
-
-=item *
-Network Associates Windows-based B<Sniffer> captures
-
-=item *
-Network General/Network Associates DOS-based B<Sniffer> (compressed or uncompressed) captures
-
-=item *
-AG Group/WildPackets B<EtherPeek>/B<TokenPeek>/B<AiroPeek>/B<EtherHelp>/B<PacketGrabber> captures
-
-=item *
-B<RADCOM>'s WAN/LAN analyzer captures
-
-=item *
-Network Instruments B<Observer> version 9 captures
-
-=item *
-B<Lucent/Ascend> router debug output
-
-=item *
-files from HP-UX's B<nettl>
-
-=item *
-B<Toshiba's> ISDN routers dump output
-
-=item *
-the output from B<i4btrace> from the ISDN4BSD project
-
-=item *
-traces from the B<EyeSDN> USB S0.
-
-=item *
-the output in B<IPLog> format from the Cisco Secure Intrusion Detection System
-
-=item *
-B<pppd logs> (pppdump format)
-
-=item *
-the output from VMS's B<TCPIPtrace>/B<TCPtrace>/B<UCX$TRACE> utilities
-
-=item *
-the text output from the B<DBS Etherwatch> VMS utility
-
-=item *
-Visual Networks' B<Visual UpTime> traffic capture
-
-=item *
-the output from B<CoSine> L2 debug
-
-=item *
-the output from Accellent's B<5Views> LAN agents
-
-=item *
-Endace Measurement Systems' ERF format captures 
-
-=item *
-Linux Bluez Bluetooth stack B<hcidump -w> traces
-
-=back
-
-There is no need to tell B<Capinfos> what type of
-file you are reading; it will determine the file type by itself. 
-B<Capinfos> is also capable of reading any of these file formats if they
-are compressed using gzip.  B<Capinfos> recognizes this directly from the
-file; the '.gz' extension is not required for this purpose.
+B<Capinfos> is a program that reads one or more capture files and
+returns some or all available statistics of each E<lt>I<infile>E<gt>.
 
 The user specifies which statistics to report by specifying flags 
-corresponding to the statistic.  If no flags are specified, B<Capinfos> will
-report all statistics available.
+corresponding to the statistic.  If no flags are specified, B<Capinfos> 
+will report all statistics available.
+
+B<Capinfos> is able to detect and read the same capture files that are 
+supported by B<Ethereal>.
+The input file doesn't need a specific filename extension, the file 
+format and an optional gzip compression will be automatically detected.
+The I<capture file format> section of I<ethereal(1)> or
+I<http://www.ethereal.com/docs/man-pages/ethereal.1.html>
+provides a detailed description.
 
 =head1 OPTIONS
 
@@ -196,6 +113,9 @@ I<tcpdump(8)>, I<pcap(3)>, I<ethereal(1)>, I<mergecap(1)>, I<editcap(1)>, I<teth
 B<Capinfos> is part of the B<Ethereal> distribution.  The latest version
 of B<Ethereal> can be found at B<http://www.ethereal.com>.
 
+HTML versions of the Ethereal project man pages are available at:
+http://www.ethereal.com/docs/man-pages
+
 =head1 AUTHORS
 
   Original Author