]> The Tcpdump Group git mirrors - tcpdump/commitdiff
print the id field in the echo/echo-reply message
authorhannes <hannes>
Fri, 1 Jul 2005 16:13:37 +0000 (16:13 +0000)
committerhannes <hannes>
Fri, 1 Jul 2005 16:13:37 +0000 (16:13 +0000)
print-icmp.c

index 598f3db9776b70e9ac35ac2cfaa0085f02553c58..8ac34d78d620e9594dbea25213bce508ccc2a928 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] _U_ =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-icmp.c,v 1.81.2.1 2005-06-22 13:44:24 hannes Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-icmp.c,v 1.81.2.2 2005-07-01 16:13:37 hannes Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -332,10 +332,11 @@ icmp_print(const u_char *bp, u_int plen, const u_char *bp2, int fragmented)
        case ICMP_ECHO:
        case ICMP_ECHOREPLY:
                TCHECK(dp->icmp_seq);
-               (void)snprintf(buf, sizeof(buf), "echo %s seq %u",
-                       dp->icmp_type == ICMP_ECHO ?
-                       "request" : "reply",
-                       EXTRACT_16BITS(&dp->icmp_seq));
+               (void)snprintf(buf, sizeof(buf), "echo %s, id %u, seq %u",
+                               dp->icmp_type == ICMP_ECHO ?
+                               "request" : "reply",
+                               EXTRACT_16BITS(&dp->icmp_id),
+                               EXTRACT_16BITS(&dp->icmp_seq));
                break;
 
        case ICMP_UNREACH: