summaryrefslogtreecommitdiffstats
path: root/usr.bin/netstat
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2001-11-30 10:40:28 +0000
committerru <ru@FreeBSD.org>2001-11-30 10:40:28 +0000
commitcfe5212a8b36139b260e85fe117efef6bbbc5a4b (patch)
tree82b53760121aef4c5d76f4488915d6330e0edb1b /usr.bin/netstat
parentdedc5f403f182feca669fb72974226b658f334af (diff)
downloadFreeBSD-src-cfe5212a8b36139b260e85fe117efef6bbbc5a4b.zip
FreeBSD-src-cfe5212a8b36139b260e85fe117efef6bbbc5a4b.tar.gz
- Make ip_rtaddr() global, and use it to look up the correct source
address in icmp_reflect(). - Two new "struct icmpstat" members: icps_badaddr and icps_noroute. PR: kern/31575 Obtained from: BSD/OS MFC after: 1 week
Diffstat (limited to 'usr.bin/netstat')
-rw-r--r--usr.bin/netstat/inet.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/usr.bin/netstat/inet.c b/usr.bin/netstat/inet.c
index beb227e..b95bad7 100644
--- a/usr.bin/netstat/inet.c
+++ b/usr.bin/netstat/inet.c
@@ -624,6 +624,8 @@ icmp_stats(u_long off __unused, char *name, int af __unused)
printf(m, icmpstat.f, plural(icmpstat.f))
#define p1a(f, m) if (icmpstat.f || sflag <= 1) \
printf(m, icmpstat.f)
+#define p2(f, m) if (icmpstat.f || sflag <= 1) \
+ printf(m, icmpstat.f, plurales(icmpstat.f))
p(icps_error, "\t%lu call%s to icmp_error\n");
p(icps_oldicmp,
@@ -653,8 +655,11 @@ icmp_stats(u_long off __unused, char *name, int af __unused)
icmpstat.icps_inhist[i]);
}
p(icps_reflect, "\t%lu message response%s generated\n");
+ p2(icps_badaddr, "\t%lu invalid return address%s\n");
+ p(icps_badaddr, "\t%lu no return route%s\n");
#undef p
#undef p1a
+#undef p2
mib[3] = ICMPCTL_MASKREPL;
len = sizeof i;
if (sysctl(mib, 4, &i, &len, (void *)0, 0) < 0)
OpenPOWER on IntegriCloud