summaryrefslogtreecommitdiff
path: root/sys/netinet6/raw_ip6.h
diff options
context:
space:
mode:
authorJeremie Courreges-Anglas <jca@cvs.openbsd.org>2017-02-09 15:23:36 +0000
committerJeremie Courreges-Anglas <jca@cvs.openbsd.org>2017-02-09 15:23:36 +0000
commit93353c70e288507c5e9d747dfbf7efbe3a95d142 (patch)
tree573e583759a7b0c075819c2c7d2a292aaebbf650 /sys/netinet6/raw_ip6.h
parent56f2e55e49aaf23d0837bf2acec5f2572233f640 (diff)
percpu counters for raw ipv6 and icmp6 stats
ok mpi@
Diffstat (limited to 'sys/netinet6/raw_ip6.h')
-rw-r--r--sys/netinet6/raw_ip6.h25
1 files changed, 23 insertions, 2 deletions
diff --git a/sys/netinet6/raw_ip6.h b/sys/netinet6/raw_ip6.h
index d81b1451b4d..d972e6a14e9 100644
--- a/sys/netinet6/raw_ip6.h
+++ b/sys/netinet6/raw_ip6.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: raw_ip6.h,v 1.3 2007/12/14 18:33:42 deraadt Exp $ */
+/* $OpenBSD: raw_ip6.h,v 1.4 2017/02/09 15:23:35 jca Exp $ */
/* $KAME: raw_ip6.h,v 1.2 2001/05/27 13:28:35 itojun Exp $ */
/*
@@ -59,7 +59,28 @@ struct rip6stat {
}
#ifdef _KERNEL
-extern struct rip6stat rip6stat;
+
+#include <sys/percpu.h>
+
+enum rip6stat_counters {
+ rip6s_ipackets,
+ rip6s_isum,
+ rip6s_badsum,
+ rip6s_nosock,
+ rip6s_nosockmcast,
+ rip6s_fullsock,
+ rip6s_opackets,
+ rip6s_ncounters,
+};
+
+extern struct cpumem *rip6counters;
+
+static inline void
+rip6stat_inc(enum rip6stat_counters c)
+{
+ counters_inc(rip6counters, c);
+}
+
#endif
#endif