diff options
author | guy <guy> | 2005-07-07 01:22:15 +0000 |
---|---|---|
committer | guy <guy> | 2005-07-07 01:22:15 +0000 |
commit | d953299b94043156cab202c486dc5b864f71c633 (patch) | |
tree | d9178547cd73d7a9716b8dd080f202b9b7218553 /print-lane.c | |
parent | e085b97e4b488bfd158529331e20ebaeb2b79f0f (diff) | |
download | tcpdump-d953299b94043156cab202c486dc5b864f71c633.tar.gz |
Add a flag to suppress the "default_print()" call made in various
link-layer print routines if no other print routine claimed the packet.
Test whether that flag is set rather than testing whether neither of -x
or -q were specified, and have -x, -q, *and* -X set that flag, so that
-X suppresses it just as -x does. That way you don't get those pckets
dumped twice if -X was specified.
Diffstat (limited to 'print-lane.c')
-rw-r--r-- | print-lane.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/print-lane.c b/print-lane.c index 03e5652d..ab03a44a 100644 --- a/print-lane.c +++ b/print-lane.c @@ -22,7 +22,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-lane.c,v 1.23 2004-03-17 23:24:37 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-lane.c,v 1.24 2005-07-07 01:22:19 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -146,7 +146,7 @@ lane_print(const u_char *p, u_int length, u_int caplen) printf("(LLC %s) ", etherproto_string(htons(extracted_ethertype))); } - if (!xflag && !qflag) + if (!suppress_default_print) default_print(p, caplen); } } else if (ether_encap_print(ether_type, p, length, caplen, @@ -154,7 +154,7 @@ lane_print(const u_char *p, u_int length, u_int caplen) /* ether_type not known, print raw packet */ if (!eflag) lane_hdr_print((u_char *)ep, length + sizeof(*ep)); - if (!xflag && !qflag) + if (!suppress_default_print) default_print(p, caplen); } } |