aboutsummaryrefslogtreecommitdiffstats
path: root/tethereal.c
diff options
context:
space:
mode:
authorLuis Ontanon <luis.ontanon@gmail.com>2006-02-07 22:08:12 +0000
committerLuis Ontanon <luis.ontanon@gmail.com>2006-02-07 22:08:12 +0000
commitb5f22bf8a82eac162550d248e182add5edcb9cc4 (patch)
treedf15e06d1e44d84ced83537305176acca86a51df /tethereal.c
parent3cb23ec4f80d5eae31c3331863ea0213967cfdb6 (diff)
eXtenstion options access to the -X command line options
svn path=/trunk/; revision=17207
Diffstat (limited to 'tethereal.c')
-rw-r--r--tethereal.c11
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