]> The Tcpdump Group git mirrors - tcpdump/commitdiff
From Nathaniel Couper-Noles <[email protected]>: print the
authorguy <guy>
Sat, 27 Oct 2001 07:21:34 +0000 (07:21 +0000)
committerguy <guy>
Sat, 27 Oct 2001 07:21:34 +0000 (07:21 +0000)
sequence number in ICMP echo requests and replies.

CREDITS
print-icmp.c

diff --git a/CREDITS b/CREDITS
index 835b83c92e5c4ccde46461d9265c0c7543c9d998..c017b3c9a348e2d5114f349cf61e67e14b7ddbd3 100644 (file)
--- a/CREDITS
+++ b/CREDITS
@@ -57,6 +57,7 @@ Additional people who have contributed patches:
        Monroe Williams                 <[email protected]>
        Motonori Shindo                 <[email protected]>
        Nathan J. Williams              <[email protected]>
+       Nathaniel Couper-Noles          <[email protected]>
        Nickolai Zeldovich              <[email protected]>
        Olaf Kirch                      <[email protected]>
        Onno van der Linden             <[email protected]>
index bc6cef3ee20b52faf69efc262a301c1d5a9d2a0a..34d175f1d008d986b9cdbb56910e9c268937abf8 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-icmp.c,v 1.62 2001-07-24 16:56:11 fenner Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-icmp.c,v 1.63 2001-10-27 07:21:34 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -285,6 +285,18 @@ icmp_print(const u_char *bp, u_int plen, const u_char *bp2)
 
        TCHECK(dp->icmp_code);
        switch (dp->icmp_type) {
+       
+       case ICMP_ECHO:
+               TCHECK(dp->icmp_seq);
+               (void)snprintf(buf, sizeof(buf), "echo request seq %u", 
+                       (unsigned)ntohs(dp->icmp_seq));
+               break;
+
+       case ICMP_ECHOREPLY:
+               TCHECK(dp->icmp_seq);
+               (void)snprintf(buf, sizeof(buf), "echo reply seq %u", 
+                       (unsigned)ntohs(dp->icmp_seq));
+               break;
 
        case ICMP_UNREACH:
                TCHECK(dp->icmp_ip.ip_dst);