]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-ppp.c
print L2 protocol type only if -e is specified (sync with other L2 behaviors).
[tcpdump] / print-ppp.c
index 24369abb5c054a6fc81d14df2231136a2728ea79..1dd2a98f78397305d41d3ee4a65be0afef986da0 100644 (file)
@@ -31,7 +31,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-ppp.c,v 1.60 2001-03-17 04:41:49 itojun Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-ppp.c,v 1.61 2001-06-11 10:33:03 itojun Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -1014,7 +1014,8 @@ ppp_print(register const u_char *p, u_int length)
                length -= 2;
        }
 
-       printf("%s %d: ", ppp_protoname(proto), full_length);
+       if (eflag)
+               printf("%s %d: ", ppp_protoname(proto), full_length);
 
        handle_ppp(proto, p, length);
        return;
@@ -1142,7 +1143,8 @@ ppp_hdlc_if_print(u_char *user, const struct pcap_pkthdr *h,
                proto = EXTRACT_16BITS(p);
                p += 2;
                length -= 2;
-               printf("%s: ", ppp_protoname(proto));
+               if (eflag)
+                       printf("%s: ", ppp_protoname(proto));
 
                handle_ppp(proto, p, length);
                break;