This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/v4l-utils.git tree:

Subject: parse_tcpdump_log.pl: Add help and manual for the script
Author:  Mauro Carvalho Chehab <[email protected]>
Date:    Wed Mar 9 01:54:07 2011 -0300

Signed-off-by: Mauro Carvalho Chehab <[email protected]>

 contrib/parse_tcpdump_log.pl |   61 +++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 60 insertions(+), 1 deletions(-)

---

http://git.linuxtv.org/v4l-utils.git?a=commitdiff;h=c06eb242340667386e29ad07de7c89c79f228dd3

diff --git a/contrib/parse_tcpdump_log.pl b/contrib/parse_tcpdump_log.pl
index 183f54f..d3e7043 100755
--- a/contrib/parse_tcpdump_log.pl
+++ b/contrib/parse_tcpdump_log.pl
@@ -3,6 +3,7 @@
 use Net::TcpDumpLog;
 use strict;
 use Getopt::Long;
+use Pod::Usage;
 
 # Currently, accepts only one usbmon format:
 #      USB with padded Linux header (LINKTYPE_USB_LINUX_MMAPPED)
@@ -13,7 +14,15 @@ use Getopt::Long;
 #      2 - parsed frames
 #      4 - raw data
 my $debug = 0;
-GetOptions('debug=i' => \$debug);
+
+my $man = 0;
+my $help = 0;
+GetOptions('debug=i' => \$debug,
+          'help|?' => \$help,
+           man => \$man
+         ) or pod2usage(2);
+pod2usage(1) if $help;
+pod2usage(-exitstatus => 0, -verbose => 2) if $man;
 
 # Frame format as parsed by libpcap 1.0.0 and 1.1.1. Not sure if format
 # changed on different versions.
@@ -237,3 +246,53 @@ sub parse_file($)
 
 # Main program
 parse_file $filename;
+
+__END__
+
+=head1 NAME
+
+parse_tcpdump_log.pl - Parses a tcpdump log captured via usbmon.
+
+=head1 SYNOPSIS
+
+parse_tcpdump_log.pl [options] [file ...]
+
+Options:
+
+       --help                  brief help message
+
+       --man                   full documentation
+
+       --debug [log level]     enables debug
+
+=head1 OPTIONS
+
+=over 8
+
+=item B<--help>
+
+Print a brief help message and exits.
+
+=item B<--man>
+
+Prints the manual page and exits.
+
+=item B<--debug> [log level]
+
+Changes the debug log level.
+
+=back
+
+=head1 DESCRIPTION
+
+B<parse_tcpdump_log.pl> will parse a tcpdump log captured via usbmon.
+
+A typical usage is to call tcpdump with:
+
+       # tcpdump -i usbmon1 -w usb_device.tcpdump
+
+after finishing data collection, parse it with:
+
+       $ B<parse_tcpdump_log.pl> usb_device.tcpdump
+
+=cut

_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to