aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@openvz.org>2008-07-18 07:02:42 -0400
committerDavid S. Miller <davem@davemloft.net>2008-07-18 07:02:42 -0400
commita20f5799ca7ceb24d63c74b6fdad4b0c0ee91f4f (patch)
tree0262e4a674c611044d78c9f62f378473df0ce0f1 /include/net
parent57ef42d59d1c1d79be59fc3c6380ae14234e38c3 (diff)
mib: put ip statistics on struct net
Similar to tcp one. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/ip.h7
-rw-r--r--include/net/netns/mib.h1
2 files changed, 4 insertions, 4 deletions
diff --git a/include/net/ip.h b/include/net/ip.h
index 02924fb4bdbf..ff2535ada02e 100644
--- a/include/net/ip.h
+++ b/include/net/ip.h
@@ -156,10 +156,9 @@ struct ipv4_config
156}; 156};
157 157
158extern struct ipv4_config ipv4_config; 158extern struct ipv4_config ipv4_config;
159DECLARE_SNMP_STAT(struct ipstats_mib, ip_statistics); 159#define IP_INC_STATS(net, field) SNMP_INC_STATS((net)->mib.ip_statistics, field)
160#define IP_INC_STATS(net, field) do { (void)net; SNMP_INC_STATS(ip_statistics, field); } while (0) 160#define IP_INC_STATS_BH(net, field) SNMP_INC_STATS_BH((net)->mib.ip_statistics, field)
161#define IP_INC_STATS_BH(net, field) do { (void)net; SNMP_INC_STATS_BH(ip_statistics, field); } while (0) 161#define IP_ADD_STATS_BH(net, field, val) SNMP_ADD_STATS_BH((net)->mib.ip_statistics, field, val)
162#define IP_ADD_STATS_BH(net, field, val) SNMP_ADD_STATS_BH(ip_statistics, field, val)
163DECLARE_SNMP_STAT(struct linux_mib, net_statistics); 162DECLARE_SNMP_STAT(struct linux_mib, net_statistics);
164#define NET_INC_STATS(net, field) do { (void)net; SNMP_INC_STATS(net_statistics, field); } while (0) 163#define NET_INC_STATS(net, field) do { (void)net; SNMP_INC_STATS(net_statistics, field); } while (0)
165#define NET_INC_STATS_BH(net, field) do { (void)net; SNMP_INC_STATS_BH(net_statistics, field); } while (0) 164#define NET_INC_STATS_BH(net, field) do { (void)net; SNMP_INC_STATS_BH(net_statistics, field); } while (0)
diff --git a/include/net/netns/mib.h b/include/net/netns/mib.h
index 8f96079bf0e3..1094ebbf0b42 100644
--- a/include/net/netns/mib.h
+++ b/include/net/netns/mib.h
@@ -5,6 +5,7 @@
5 5
6struct netns_mib { 6struct netns_mib {
7 DEFINE_SNMP_STAT(struct tcp_mib, tcp_statistics); 7 DEFINE_SNMP_STAT(struct tcp_mib, tcp_statistics);
8 DEFINE_SNMP_STAT(struct ipstats_mib, ip_statistics);
8}; 9};
9 10
10#endif 11#endif