]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-icmp.c
Fix a typo.
[tcpdump] / print-icmp.c
index eb0ca7dfeff8bbf27bd0601a08f3c3425f8fb9fd..f7b1b2b904b0b2381a4330ec46fec3bb5f968669 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-icmp.c,v 1.46 2000-05-15 00:59:41 assar Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-icmp.c,v 1.48 2000-07-01 03:39:03 assar Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -32,10 +32,8 @@ static const char rcsid[] =
 #include <sys/time.h>
 #include <sys/socket.h>
 
-#if __STDC__
 struct mbuf;
 struct rtentry;
-#endif
 #include <net/if.h>
 
 #include <netinet/in.h>
@@ -352,7 +350,24 @@ icmp_print(register const u_char *bp, u_int plen, register const u_char *bp2)
        case ICMP_MASKREPLY:
                TCHECK(dp->icmp_mask);
                (void)snprintf(buf, sizeof(buf), "address mask is 0x%08x",
-                   (u_int32_t)ntohl(dp->icmp_mask));
+                   (unsigned)ntohl(dp->icmp_mask));
+               break;
+
+       case ICMP_TSTAMP:
+               TCHECK(dp->icmp_seq);
+               (void)sprintf(buf, "time stamp query id %u seq %u",
+                   (unsigned)ntohs(dp->icmp_id),
+                   (unsigned)ntohs(dp->icmp_seq));
+               break;
+
+       case ICMP_TSTAMPREPLY:
+               TCHECK(dp->icmp_ttime);
+               (void)sprintf(buf, "time stamp reply id %u seq %u : org 0x%lx recv 0x%lx xmit 0x%lx",
+                   (unsigned)ntohs(dp->icmp_id),
+                   (unsigned)ntohs(dp->icmp_seq),
+                   (unsigned long)ntohl(dp->icmp_otime),
+                   (unsigned long)ntohl(dp->icmp_rtime),
+                   (unsigned long)ntohl(dp->icmp_ttime));
                break;
 
        default: