Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/netstat Add names of a few more ICMPv6 messages, fro...



details:   https://anonhg.NetBSD.org/src/rev/305484b8d7e2
branches:  trunk
changeset: 358268:305484b8d7e2
user:      kre <kre%NetBSD.org@localhost>
date:      Tue Dec 19 17:05:15 2017 +0000

description:
Add names of a few more ICMPv6 messages, from RFC6275 (Mobile IPv6)
and RFC4286 (Multicast Router Discovery.) and as shown in the IANA
parameters page available at:
  https://www.ietf.org/assignments/icmpv6-parameters/icmpv6-parameters.txt

Also make the array be explicitly 256 entries long, one for each possible
code, which will detect attempts to insert names without deleting the
place holder (and mean a good solid NULL de-ref if too many place holders
are deleted, rather than just random results.)

diffstat:

 usr.bin/netstat/inet6.c |  22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)

diffs (53 lines):

diff -r 49aea6feef44 -r 305484b8d7e2 usr.bin/netstat/inet6.c
--- a/usr.bin/netstat/inet6.c   Tue Dec 19 16:04:27 2017 +0000
+++ b/usr.bin/netstat/inet6.c   Tue Dec 19 17:05:15 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: inet6.c,v 1.69 2016/12/17 09:12:22 mlelstv Exp $       */
+/*     $NetBSD: inet6.c,v 1.70 2017/12/19 17:05:15 kre Exp $   */
 /*     BSDI inet.c,v 2.3 1995/10/24 02:19:29 prb Exp   */
 
 /*
@@ -64,7 +64,7 @@
 #if 0
 static char sccsid[] = "@(#)inet.c     8.4 (Berkeley) 4/20/94";
 #else
-__RCSID("$NetBSD: inet6.c,v 1.69 2016/12/17 09:12:22 mlelstv Exp $");
+__RCSID("$NetBSD: inet6.c,v 1.70 2017/12/19 17:05:15 kre Exp $");
 #endif
 #endif /* not lint */
 
@@ -860,7 +860,7 @@
 #undef p_5
 }
 
-static const char *icmp6names[] = {
+static const char *icmp6names[256] = {
        "#0",
        "unreach",
        "packet too big",
@@ -1004,17 +1004,17 @@
        "node information reply",
        "#141",
        "#142",
-       "#143",
-       "#144",
-       "#145",
-       "#146",
-       "#147",
+       "multicast listener report (v2)",
+       "home agent discovery request",
+       "home agent discovery reply",
+       "mobile prefix solicitation",
+       "mobile prefix advertisement",
        "#148",
        "#149", 
        "#150",
-       "#151",
-       "#152",
-       "#153",
+       "multicast router advertisement",
+       "multicast router solicitation",
+       "multicast router termination",
        "#154",
        "#155",
        "#156",



Home | Main Index | Thread Index | Old Index