aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/netstat
diff options
context:
space:
mode:
authorMunechika SUMIKAWA <sumikawa@FreeBSD.org>2001-06-21 08:27:09 +0000
committerMunechika SUMIKAWA <sumikawa@FreeBSD.org>2001-06-21 08:27:09 +0000
commitfd5556399e351423e119aba76bc91404f0a806ac (patch)
tree75545602d7cadec898fc55d247aa43be8551a981 /usr.bin/netstat
parenta96c00661ac7b09738d4ec785a2319164ef1849f (diff)
Notes
Diffstat (limited to 'usr.bin/netstat')
-rw-r--r--usr.bin/netstat/inet6.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/usr.bin/netstat/inet6.c b/usr.bin/netstat/inet6.c
index c89c09f9d8fb..7d432d5a924e 100644
--- a/usr.bin/netstat/inet6.c
+++ b/usr.bin/netstat/inet6.c
@@ -686,8 +686,8 @@ static char *icmp6names[] = {
"router renumbering",
"node information request",
"node information reply",
- "#141",
- "#142",
+ "inverse neighbor solicitation",
+ "inverse neighbor advertisement",
"#143",
"#144",
"#145",
@@ -826,7 +826,8 @@ icmp6_stats(u_long off __unused, char *name, int af __unused)
"\t%llu error%s not generated because old message was icmp error or so\n");
p(icp6s_toofreq,
"\t%llu error%s not generated because rate limitation\n");
- for (first = 1, i = 0; i < 256; i++)
+#define NELEM (sizeof(icmp6stat.icp6s_outhist)/sizeof(icmp6stat.icp6s_outhist[0]))
+ for (first = 1, i = 0; i < NELEM; i++)
if (icmp6stat.icp6s_outhist[i] != 0) {
if (first) {
printf("\tOutput histogram:\n");
@@ -835,11 +836,13 @@ icmp6_stats(u_long off __unused, char *name, int af __unused)
printf("\t\t%s: %llu\n", icmp6names[i],
(unsigned long long)icmp6stat.icp6s_outhist[i]);
}
+#undef NELEM
p(icp6s_badcode, "\t%llu message%s with bad code fields\n");
p(icp6s_tooshort, "\t%llu message%s < minimum length\n");
p(icp6s_checksum, "\t%llu bad checksum%s\n");
p(icp6s_badlen, "\t%llu message%s with bad length\n");
- for (first = 1, i = 0; i < ICMP6_MAXTYPE; i++)
+#define NELEM (sizeof(icmp6stat.icp6s_inhist)/sizeof(icmp6stat.icp6s_inhist[0]))
+ for (first = 1, i = 0; i < NELEM; i++)
if (icmp6stat.icp6s_inhist[i] != 0) {
if (first) {
printf("\tInput histogram:\n");
@@ -848,6 +851,7 @@ icmp6_stats(u_long off __unused, char *name, int af __unused)
printf("\t\t%s: %llu\n", icmp6names[i],
(unsigned long long)icmp6stat.icp6s_inhist[i]);
}
+#undef NELEM
printf("\tHistogram of error messages to be generated:\n");
p_5(icp6s_odst_unreach_noroute, "\t\t%llu no route\n");
p_5(icp6s_odst_unreach_admin, "\t\t%llu administratively prohibited\n");