From: hannes Date: Sat, 1 May 2004 10:15:33 +0000 (+0000) Subject: supress printing of the L3 protoname if eflag is set X-Git-Tag: tcpdump-3.9.1~359 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/b41f0d1ca30515b474af73bea9ae6975fd111256 supress printing of the L3 protoname if eflag is set --- diff --git a/print-ip.c b/print-ip.c index 2f0db62b..c1c1fda7 100644 --- a/print-ip.c +++ b/print-ip.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-ip.c,v 1.139 2004-04-30 22:22:05 hannes Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-ip.c,v 1.140 2004-05-01 10:15:33 hannes Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -388,7 +388,7 @@ ip_print(register const u_char *bp, register u_int length) if (IP_V(ip) == 6) printf(", wrong link-layer encapsulation"); } - else + else if (!eflag) printf("IP "); if ((u_char *)(ip + 1) > snapend) { diff --git a/print-ip6.c b/print-ip6.c index f3767f5d..d1a84985 100644 --- a/print-ip6.c +++ b/print-ip6.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-ip6.c,v 1.42 2004-04-26 17:59:37 hannes Exp $"; + "@(#) $Header: /tcpdump/master/tcpdump/print-ip6.c,v 1.43 2004-05-01 10:15:33 hannes Exp $"; #endif #ifdef HAVE_CONFIG_H @@ -67,7 +67,8 @@ ip6_print(register const u_char *bp, register u_int length) return; } - printf("IP6 "); + if (!eflag) + printf("IP6 "); payload_len = EXTRACT_16BITS(&ip6->ip6_plen); len = payload_len + sizeof(struct ip6_hdr);