Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sbin ping, ping6: fix comment about ID field



details:   https://anonhg.NetBSD.org/src/rev/3ce3c400ff32
branches:  trunk
changeset: 983845:3ce3c400ff32
user:      rillig <rillig%NetBSD.org@localhost>
date:      Fri Jun 11 18:47:56 2021 +0000

description:
ping, ping6: fix comment about ID field

Since ping.c 1.76 and ping6.c 1.58 from 2004-04-22, the ID field
contains random bits instead of a process ID.

diffstat:

 sbin/ping/ping.c   |  8 ++++----
 sbin/ping6/ping6.c |  8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)

diffs (72 lines):

diff -r a81cf12c3ba6 -r 3ce3c400ff32 sbin/ping/ping.c
--- a/sbin/ping/ping.c  Fri Jun 11 14:52:03 2021 +0000
+++ b/sbin/ping/ping.c  Fri Jun 11 18:47:56 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ping.c,v 1.117 2017/10/02 10:08:11 maya Exp $  */
+/*     $NetBSD: ping.c,v 1.118 2021/06/11 18:47:56 rillig Exp $        */
 
 /*
  * Copyright (c) 1989, 1993
@@ -58,7 +58,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: ping.c,v 1.117 2017/10/02 10:08:11 maya Exp $");
+__RCSID("$NetBSD: ping.c,v 1.118 2021/06/11 18:47:56 rillig Exp $");
 #endif
 
 #include <stdio.h>
@@ -187,7 +187,7 @@
 static int npackets;                           /* total packets to send */
 static int preload;                            /* number of packets to "preload" */
 static int ntransmitted;                       /* output sequence # = #sent */
-static int ident;                              /* our ID, in network byte order */
+static int ident;                              /* 16 random bits to identify our packets */
 
 static int nreceived;                          /* # of packets we got back */
 
@@ -884,7 +884,7 @@
 
 /*
  * Compose and transmit an ICMP ECHO REQUEST packet.  The IP packet
- * will be added on by the kernel.  The ID field is our UNIX process ID,
+ * will be added on by the kernel.  The ID field is random,
  * and the sequence number is an ascending integer.  The first phdrlen bytes
  * of the data portion are used to hold a UNIX "timeval" struct in VAX
  * byte-order, to compute the round-trip time, or a UNIX "timespec" in native
diff -r a81cf12c3ba6 -r 3ce3c400ff32 sbin/ping6/ping6.c
--- a/sbin/ping6/ping6.c        Fri Jun 11 14:52:03 2021 +0000
+++ b/sbin/ping6/ping6.c        Fri Jun 11 18:47:56 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ping6.c,v 1.105 2021/06/07 22:13:34 dholland Exp $     */
+/*     $NetBSD: ping6.c,v 1.106 2021/06/11 18:47:56 rillig Exp $       */
 /*     $KAME: ping6.c,v 1.164 2002/11/16 14:05:37 itojun Exp $ */
 
 /*
@@ -77,7 +77,7 @@
 #else
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: ping6.c,v 1.105 2021/06/07 22:13:34 dholland Exp $");
+__RCSID("$NetBSD: ping6.c,v 1.106 2021/06/11 18:47:56 rillig Exp $");
 #endif
 #endif
 
@@ -205,7 +205,7 @@
 static char BSPACE = '\b';             /* characters written for flood */
 static char DOT = '.';
 static char *hostname;
-static int ident;                      /* process id to identify our packets */
+static int ident;                      /* 16 random bits to identify our packets */
 static u_int8_t nonce[8];              /* nonce field for node information */
 static int hoplimit = -1;              /* hoplimit */
 
@@ -1055,7 +1055,7 @@
 /*
  * pinger --
  *     Compose and transmit an ICMP ECHO REQUEST packet.  The IP packet
- * will be added on by the kernel.  The ID field is our UNIX process ID,
+ * will be added on by the kernel.  The ID field is random,
  * and the sequence number is an ascending integer.  The first 8 bytes
  * of the data portion are used to hold a UNIX "timeval" struct in VAX
  * byte-order, to compute the round-trip time.



Home | Main Index | Thread Index | Old Index