Permalink
Browse files

print stats on SPD cache lookups

  • Loading branch information...
1 parent 8538509 commit ca63a144e8b184d7d7a0d096b16aacc0646b39d8 itojun committed Aug 5, 2001
Showing with 7 additions and 1 deletion.
  1. +7 −1 kame/kame/netstat/ipsec.c
@@ -1,5 +1,5 @@
/* $NetBSD: inet.c,v 1.35.2.1 1999/04/29 14:57:08 perry Exp $ */
-/* $KAME: ipsec.c,v 1.25 2001/03/12 09:04:39 itojun Exp $ */
+/* $KAME: ipsec.c,v 1.26 2001/08/05 20:23:10 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project.
@@ -97,6 +97,7 @@ __RCSID("$NetBSD: inet.c,v 1.35.2.1 1999/04/29 14:57:08 perry Exp $");
*/
#ifdef __bsdi__
#define plural(x) PLURAL(x)
+#define plurales(x) PLURALES(x)
#endif
/*
* XXX see PORTABILITY for the twist
@@ -231,6 +232,8 @@ print_ipsecstats()
{
#define p(f, m) if (ipsecstat.f || sflag <= 1) \
printf(m, (CAST)ipsecstat.f, plural(ipsecstat.f))
+#define pes(f, m) if (ipsecstat.f || sflag <= 1) \
+ printf(m, (CAST)ipsecstat.f, plurales(ipsecstat.f))
#define hist(f, n, t) \
ipsec_hist((f), sizeof(f)/sizeof(f[0]), (n), sizeof(n)/sizeof(n[0]), (t));
@@ -259,7 +262,10 @@ print_ipsecstats()
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
}

0 comments on commit ca63a14

Please sign in to comment.