diff options
author | rwatson <rwatson@FreeBSD.org> | 2009-04-12 13:41:13 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2009-04-12 13:41:13 +0000 |
commit | b6c3ef293c21db10fb7caf37450826d242c15794 (patch) | |
tree | 969e89a360d1b4bfc67729494c6f5f4ad8a390ed /sys/netinet/igmp_var.h | |
parent | 4801e9aee9baec5543d3d78abf1d7432044173fe (diff) | |
download | FreeBSD-src-b6c3ef293c21db10fb7caf37450826d242c15794.zip FreeBSD-src-b6c3ef293c21db10fb7caf37450826d242c15794.tar.gz |
Update stats in struct igmpstat using two new macros:
IGMPSTAT_ADD() and IGMPSTAT_INC(), rather than directly
manipulating the fields of the structure. This will make it
easier to change the implementation of these statistics,
such as using per-CPU versions of the data structures.
MFC after: 3 days
Diffstat (limited to 'sys/netinet/igmp_var.h')
-rw-r--r-- | sys/netinet/igmp_var.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/netinet/igmp_var.h b/sys/netinet/igmp_var.h index 9c9c7d4..ca17158 100644 --- a/sys/netinet/igmp_var.h +++ b/sys/netinet/igmp_var.h @@ -106,6 +106,11 @@ struct igmpstat { #define IGPS_VERSION_3 3 /* as of FreeBSD 8.x */ #define IGPS_VERSION3_LEN 168 +#ifdef _KERNEL +#define IGMPSTAT_ADD(name, val) V_igmpstat.name += (val) +#define IGMPSTAT_INC(name) IGMPSTAT_ADD(name, 1) +#endif + #ifdef CTASSERT CTASSERT(sizeof(struct igmpstat) == 168); #endif |