]> The Tcpdump Group git mirrors - tcpdump/commitdiff
supress printing of the L3 protoname if eflag is set
authorhannes <hannes>
Sat, 1 May 2004 10:15:33 +0000 (10:15 +0000)
committerhannes <hannes>
Sat, 1 May 2004 10:15:33 +0000 (10:15 +0000)
print-ip.c
print-ip6.c

index 2f0db62b5c4492f7cf884c41728d1757b9d3aff3..c1c1fda7a966bab4ca91d78972976d1ddb0f3755 100644 (file)
@@ -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) {
index f3767f5db1e1df2bfb5d1a0aefe2beaa1ebff411..d1a84985690d9cc8d8820e07c44a3e67d5d9442f 100644 (file)
@@ -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);