summaryrefslogtreecommitdiffstats
path: root/usr.bin/netstat
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2004-02-05 12:01:39 +0000
committerume <ume@FreeBSD.org>2004-02-05 12:01:39 +0000
commite16990c4c0beb8e3b03b0fd1d32ee5e8f1c2fff0 (patch)
tree4271f0ce9be1421565a38840a8bd56f98a2f208e /usr.bin/netstat
parentb52bf20b5bfa797405ebab3dac9abbb1804889c7 (diff)
downloadFreeBSD-src-e16990c4c0beb8e3b03b0fd1d32ee5e8f1c2fff0.zip
FreeBSD-src-e16990c4c0beb8e3b03b0fd1d32ee5e8f1c2fff0.tar.gz
print stats on SPD cache lookups.
Obtained from: KAME
Diffstat (limited to 'usr.bin/netstat')
-rw-r--r--usr.bin/netstat/ipsec.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/usr.bin/netstat/ipsec.c b/usr.bin/netstat/ipsec.c
index 2b1a56a..3a5638c 100644
--- a/usr.bin/netstat/ipsec.c
+++ b/usr.bin/netstat/ipsec.c
@@ -187,6 +187,8 @@ print_ipsecstats(void)
{
#define p(f, m) if (ipsecstat.f || sflag <= 1) \
printf(m, (unsigned long long)ipsecstat.f, plural(ipsecstat.f))
+#define pes(f, m) if (ipsecstat.f || sflag <= 1) \
+ printf(m, (unsigned long long)ipsecstat.f, plurales(ipsecstat.f))
#define hist(f, n, t) \
ipsec_hist((f), sizeof(f)/sizeof(f[0]), (n), (t));
@@ -215,7 +217,10 @@ print_ipsecstats(void)
hist(ipsecstat.out_ahhist, ipsec_ahnames, "AH output");
hist(ipsecstat.out_esphist, ipsec_espnames, "ESP output");
hist(ipsecstat.out_comphist, ipsec_compnames, "IPComp output");
+ p(spdcachelookup, "\t%llu SPD cache lookup%s\n");
+ pes(spdcachemiss, "\t%llu SPD cache miss%s\n");
#undef p
+#undef pes
#undef hist
}
OpenPOWER on IntegriCloud