From d953299b94043156cab202c486dc5b864f71c633 Mon Sep 17 00:00:00 2001 From: guy Date: Thu, 7 Jul 2005 01:22:15 +0000 Subject: 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. --- print-null.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'print-null.c') diff --git a/print-null.c b/print-null.c index 11f90ef3..6de6d489 100644 --- a/print-null.c +++ b/print-null.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-null.c,v 1.55 2005-05-19 07:25:49 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-null.c,v 1.56 2005-07-07 01:22:19 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -173,7 +173,7 @@ null_if_print(const struct pcap_pkthdr *h, const u_char *p) /* unknown AF_ value */ if (!eflag) null_hdr_print(family, length + NULL_HDRLEN); - if (!xflag && !qflag) + if (!suppress_default_print) default_print(p, caplen); } -- cgit v1.2.1