aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/ipv6.h
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2006-11-04 06:11:37 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-03 00:22:08 -0500
commita11d206d0f88e092419877c7f706cafb5e1c2e57 (patch)
treeed96428bb52765198d5c5b7ccbc1f1b6516ffb3f /include/net/ipv6.h
parent7a3025b1b3a0173be5de6ced18754b909da27b38 (diff)
[IPV6]: Per-interface statistics support.
For IP MIB (RFC4293). Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Diffstat (limited to 'include/net/ipv6.h')
-rw-r--r--include/net/ipv6.h21
1 files changed, 18 insertions, 3 deletions
diff --git a/include/net/ipv6.h b/include/net/ipv6.h
index 0b8c9b990ac4..3c266ad99a02 100644
--- a/include/net/ipv6.h
+++ b/include/net/ipv6.h
@@ -113,9 +113,24 @@ extern int sysctl_mld_max_msf;
113 113
114/* MIBs */ 114/* MIBs */
115DECLARE_SNMP_STAT(struct ipstats_mib, ipv6_statistics); 115DECLARE_SNMP_STAT(struct ipstats_mib, ipv6_statistics);
116#define IP6_INC_STATS(field) SNMP_INC_STATS(ipv6_statistics, field) 116#define IP6_INC_STATS(idev,field) ({ \
117#define IP6_INC_STATS_BH(field) SNMP_INC_STATS_BH(ipv6_statistics, field) 117 struct inet6_dev *_idev = (idev); \
118#define IP6_INC_STATS_USER(field) SNMP_INC_STATS_USER(ipv6_statistics, field) 118 if (likely(_idev != NULL)) \
119 SNMP_INC_STATS(_idev->stats.ipv6, field); \
120 SNMP_INC_STATS(ipv6_statistics, field); \
121})
122#define IP6_INC_STATS_BH(idev,field) ({ \
123 struct inet6_dev *_idev = (idev); \
124 if (likely(_idev != NULL)) \
125 SNMP_INC_STATS_BH(_idev->stats.ipv6, field); \
126 SNMP_INC_STATS_BH(ipv6_statistics, field); \
127})
128#define IP6_INC_STATS_USER(idev,field) ({ \
129 struct inet6_dev *_idev = (idev); \
130 if (likely(_idev != NULL)) \
131 SNMP_INC_STATS_USER(_idev->stats.ipv6, field); \
132 SNMP_INC_STATS_USER(ipv6_statistics, field); \
133})
119DECLARE_SNMP_STAT(struct icmpv6_mib, icmpv6_statistics); 134DECLARE_SNMP_STAT(struct icmpv6_mib, icmpv6_statistics);
120#define ICMP6_INC_STATS(idev, field) ({ \ 135#define ICMP6_INC_STATS(idev, field) ({ \
121 struct inet6_dev *_idev = (idev); \ 136 struct inet6_dev *_idev = (idev); \