summaryrefslogtreecommitdiff
path: root/print-token.c
diff options
context:
space:
mode:
authorguy <guy>2005-07-07 01:22:15 +0000
committerguy <guy>2005-07-07 01:22:15 +0000
commitd953299b94043156cab202c486dc5b864f71c633 (patch)
treed9178547cd73d7a9716b8dd080f202b9b7218553 /print-token.c
parente085b97e4b488bfd158529331e20ebaeb2b79f0f (diff)
downloadtcpdump-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-token.c')
-rw-r--r--print-token.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/print-token.c b/print-token.c
index 1ef215d2..d17e9506 100644
--- a/print-token.c
+++ b/print-token.c
@@ -25,7 +25,7 @@
*/
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-token.c,v 1.25 2004-03-17 23:24:38 guy Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-token.c,v 1.26 2005-07-07 01:22:21 guy Exp $";
#endif
#ifdef HAVE_CONFIG_H
@@ -167,7 +167,7 @@ token_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 {
@@ -176,7 +176,7 @@ token_print(const u_char *p, u_int length, u_int caplen)
if (!eflag)
token_hdr_print(trp, length + TOKEN_HDRLEN + route_len,
ESRC(&ehdr), EDST(&ehdr));
- if (!xflag && !qflag)
+ if (!suppress_default_print)
default_print(p, caplen);
}
return (hdr_len);