diff options
author | lego <lego@f5534014-38df-0310-8fa8-9805f1628bb7> | 2006-02-07 22:08:12 +0000 |
---|---|---|
committer | lego <lego@f5534014-38df-0310-8fa8-9805f1628bb7> | 2006-02-07 22:08:12 +0000 |
commit | 52b4929269904fb5dad6979f8f6b98e88d2c5390 (patch) | |
tree | df15e06d1e44d84ced83537305176acca86a51df /tethereal.c | |
parent | 6415fa3dc14f94f0892a6187d578697cfb70d676 (diff) |
eXtenstion options access to the -X command line options
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17207 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'tethereal.c')
-rw-r--r-- | tethereal.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/tethereal.c b/tethereal.c index 5d0cdb8666..27ea607b45 100644 --- a/tethereal.c +++ b/tethereal.c @@ -89,6 +89,7 @@ #include <epan/tap.h> #include <epan/stat_cmd_args.h> #include <epan/timestamp.h> +#include <epan/ex-opt.h> #ifdef HAVE_LIBPCAP #include <pcap.h> @@ -268,6 +269,7 @@ print_usage(gboolean print_ver) fprintf(output, " -t ad|a|r|d output format of time stamps (def: r: rel. to first)\n"); fprintf(output, " -l flush output after each packet\n"); fprintf(output, " -q be more quiet on stdout (e.g. when using statistics)\n"); + fprintf(output, " -X <key>:<value> eXtension options, see the man page for details\n"); fprintf(output, " -z <statistics> various statistics, see the man page for details\n"); fprintf(output, "\n"); @@ -682,7 +684,7 @@ main(int argc, char *argv[]) char badopt; GLogLevelFlags log_flags; -#define OPTSTRING_INIT "a:b:c:d:Df:F:hi:lLnN:o:pqr:R:s:St:T:vVw:xy:z:" +#define OPTSTRING_INIT "a:b:c:d:Df:F:hi:lLnN:o:pqr:R:s:St:T:vVw:xX:y:z:" #ifdef HAVE_LIBPCAP #ifdef _WIN32 #define OPTSTRING_WIN32 "B:" @@ -1032,8 +1034,11 @@ main(int argc, char *argv[]) verbose = TRUE; break; case 'x': /* Print packet data in hex (and ASCII) */ - print_hex = TRUE; - break; + print_hex = TRUE; + break; + case 'X': + ex_opt_add(optarg); + break; case 'z': /* We won't call the init function for the stat this soon as it would disallow MATE's fields (which are registered |