]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-icmp.c
When discussing the "gateway" keyword, don't say that the host must be
[tcpdump] / print-icmp.c
index fc83513371ea2ed3c9c54f23708e88f64fe7b082..1ae85482a37f31675bd5c46ce0a0026085cdd67d 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-icmp.c,v 1.57 2000-10-10 05:03:32 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-icmp.c,v 1.59 2001-06-15 22:17:32 fenner Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -283,12 +283,6 @@ icmp_print(register const u_char *bp, u_int plen, register const u_char *bp2)
        ip = (struct ip *)bp2;
        str = buf;
 
-#if 0
-        (void)printf("%s > %s: ",
-               ipaddr_string(&ip->ip_src),
-               ipaddr_string(&ip->ip_dst));
-#endif
-
        TCHECK(dp->icmp_code);
        switch (dp->icmp_type) {
 
@@ -339,12 +333,12 @@ icmp_print(register const u_char *bp, u_int plen, register const u_char *bp2)
                    {
                        register const struct mtu_discovery *mp;
                        mp = (struct mtu_discovery *)&dp->icmp_void;
-                        mtu = EXTRACT_16BITS(&mp->nexthopmtu);
-                        if (mtu) {
+                       mtu = EXTRACT_16BITS(&mp->nexthopmtu);
+                       if (mtu) {
                                (void)snprintf(buf, sizeof(buf),
                                    "%s unreachable - need to frag (mtu %d)",
                                    ipaddr_string(&dp->icmp_ip.ip_dst), mtu);
-                        } else {
+                       } else {
                                (void)snprintf(buf, sizeof(buf),
                                    "%s unreachable - need to frag",
                                    ipaddr_string(&dp->icmp_ip.ip_dst));
@@ -480,7 +474,7 @@ icmp_print(register const u_char *bp, u_int plen, register const u_char *bp2)
                str = tok2str(icmp2str, "type-#%d", dp->icmp_type);
                break;
        }
-        (void)printf("icmp: %s", str);
+       (void)printf("icmp: %s", str);
        if (vflag) {
                if (TTEST2(*bp, plen)) {
                        if (in_cksum((u_short*)dp, plen, 0))