diff options
Diffstat (limited to 'sys/netinet/icmp6.h')
-rw-r--r-- | sys/netinet/icmp6.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/netinet/icmp6.h b/sys/netinet/icmp6.h index 7dc22e5..c3a8ac7 100644 --- a/sys/netinet/icmp6.h +++ b/sys/netinet/icmp6.h @@ -600,8 +600,19 @@ struct icmp6stat { }; #ifdef _KERNEL +/* + * In-kernel consumers can use these accessor macros directly to update + * stats. + */ #define ICMP6STAT_ADD(name, val) V_icmp6stat.name += (val) #define ICMP6STAT_INC(name) ICMP6STAT_ADD(name, 1) + +/* + * Kernel module consumers must use this accessor macro. + */ +void kmod_icmp6stat_inc(int statnum); +#define KMOD_ICMP6STAT_INC(name) \ + kmod_icmp6stat_inc(offsetof(struct icmp6stat, name) / sizeof(u_quad_t)) #endif /* |