diff options
author | Pavel Emelyanov <xemul@openvz.org> | 2008-07-18 07:03:45 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-18 07:03:45 -0400 |
commit | 386019d3514b3ed9de8d0b05b67e638a7048375b (patch) | |
tree | 6447cb5bfe73788abab98f4835b95af258bfeeff /include/net | |
parent | 2f275f91a438abd8eec5321798d66a4ffe6869fa (diff) |
mib: put udplite statistics on struct net
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/netns/mib.h | 1 | ||||
-rw-r--r-- | include/net/udp.h | 5 |
2 files changed, 3 insertions, 3 deletions
diff --git a/include/net/netns/mib.h b/include/net/netns/mib.h index 738c87ce183d..23e699fdb5cc 100644 --- a/include/net/netns/mib.h +++ b/include/net/netns/mib.h | |||
@@ -8,6 +8,7 @@ struct netns_mib { | |||
8 | DEFINE_SNMP_STAT(struct ipstats_mib, ip_statistics); | 8 | DEFINE_SNMP_STAT(struct ipstats_mib, ip_statistics); |
9 | DEFINE_SNMP_STAT(struct linux_mib, net_statistics); | 9 | DEFINE_SNMP_STAT(struct linux_mib, net_statistics); |
10 | DEFINE_SNMP_STAT(struct udp_mib, udp_statistics); | 10 | DEFINE_SNMP_STAT(struct udp_mib, udp_statistics); |
11 | DEFINE_SNMP_STAT(struct udp_mib, udplite_statistics); | ||
11 | }; | 12 | }; |
12 | 13 | ||
13 | #endif | 14 | #endif |
diff --git a/include/net/udp.h b/include/net/udp.h index ba5544152708..addcdc67234c 100644 --- a/include/net/udp.h +++ b/include/net/udp.h | |||
@@ -151,17 +151,16 @@ extern int udp_lib_setsockopt(struct sock *sk, int level, int optname, | |||
151 | DECLARE_SNMP_STAT(struct udp_mib, udp_stats_in6); | 151 | DECLARE_SNMP_STAT(struct udp_mib, udp_stats_in6); |
152 | 152 | ||
153 | /* UDP-Lite does not have a standardized MIB yet, so we inherit from UDP */ | 153 | /* UDP-Lite does not have a standardized MIB yet, so we inherit from UDP */ |
154 | DECLARE_SNMP_STAT(struct udp_mib, udplite_statistics); | ||
155 | DECLARE_SNMP_STAT(struct udp_mib, udplite_stats_in6); | 154 | DECLARE_SNMP_STAT(struct udp_mib, udplite_stats_in6); |
156 | 155 | ||
157 | /* | 156 | /* |
158 | * SNMP statistics for UDP and UDP-Lite | 157 | * SNMP statistics for UDP and UDP-Lite |
159 | */ | 158 | */ |
160 | #define UDP_INC_STATS_USER(net, field, is_udplite) do { \ | 159 | #define UDP_INC_STATS_USER(net, field, is_udplite) do { \ |
161 | if (is_udplite) SNMP_INC_STATS_USER(udplite_statistics, field); \ | 160 | if (is_udplite) SNMP_INC_STATS_USER((net)->mib.udplite_statistics, field); \ |
162 | else SNMP_INC_STATS_USER((net)->mib.udp_statistics, field); } while(0) | 161 | else SNMP_INC_STATS_USER((net)->mib.udp_statistics, field); } while(0) |
163 | #define UDP_INC_STATS_BH(net, field, is_udplite) do { \ | 162 | #define UDP_INC_STATS_BH(net, field, is_udplite) do { \ |
164 | if (is_udplite) SNMP_INC_STATS_BH(udplite_statistics, field); \ | 163 | if (is_udplite) SNMP_INC_STATS_BH((net)->mib.udplite_statistics, field); \ |
165 | else SNMP_INC_STATS_BH((net)->mib.udp_statistics, field); } while(0) | 164 | else SNMP_INC_STATS_BH((net)->mib.udp_statistics, field); } while(0) |
166 | 165 | ||
167 | #define UDP6_INC_STATS_BH(net, field, is_udplite) do { (void)net; \ | 166 | #define UDP6_INC_STATS_BH(net, field, is_udplite) do { (void)net; \ |