aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/udp.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/udp.h')
-rw-r--r--include/net/udp.h21
1 files changed, 11 insertions, 10 deletions
diff --git a/include/net/udp.h b/include/net/udp.h
index addcdc67234c..1e205095ea68 100644
--- a/include/net/udp.h
+++ b/include/net/udp.h
@@ -148,10 +148,9 @@ extern int udp_lib_setsockopt(struct sock *sk, int level, int optname,
148 char __user *optval, int optlen, 148 char __user *optval, int optlen,
149 int (*push_pending_frames)(struct sock *)); 149 int (*push_pending_frames)(struct sock *));
150 150
151DECLARE_SNMP_STAT(struct udp_mib, udp_stats_in6); 151extern struct sock *udp4_lib_lookup(struct net *net, __be32 saddr, __be16 sport,
152 152 __be32 daddr, __be16 dport,
153/* UDP-Lite does not have a standardized MIB yet, so we inherit from UDP */ 153 int dif);
154DECLARE_SNMP_STAT(struct udp_mib, udplite_stats_in6);
155 154
156/* 155/*
157 * SNMP statistics for UDP and UDP-Lite 156 * SNMP statistics for UDP and UDP-Lite
@@ -163,12 +162,14 @@ DECLARE_SNMP_STAT(struct udp_mib, udplite_stats_in6);
163 if (is_udplite) SNMP_INC_STATS_BH((net)->mib.udplite_statistics, field); \ 162 if (is_udplite) SNMP_INC_STATS_BH((net)->mib.udplite_statistics, field); \
164 else SNMP_INC_STATS_BH((net)->mib.udp_statistics, field); } while(0) 163 else SNMP_INC_STATS_BH((net)->mib.udp_statistics, field); } while(0)
165 164
166#define UDP6_INC_STATS_BH(net, field, is_udplite) do { (void)net; \ 165#define UDP6_INC_STATS_BH(net, field, is_udplite) do { \
167 if (is_udplite) SNMP_INC_STATS_BH(udplite_stats_in6, field); \ 166 if (is_udplite) SNMP_INC_STATS_BH((net)->mib.udplite_stats_in6, field);\
168 else SNMP_INC_STATS_BH(udp_stats_in6, field); } while(0) 167 else SNMP_INC_STATS_BH((net)->mib.udp_stats_in6, field); \
169#define UDP6_INC_STATS_USER(net, field, is_udplite) do { (void)net; \ 168} while(0)
170 if (is_udplite) SNMP_INC_STATS_USER(udplite_stats_in6, field); \ 169#define UDP6_INC_STATS_USER(net, field, __lite) do { \
171 else SNMP_INC_STATS_USER(udp_stats_in6, field); } while(0) 170 if (__lite) SNMP_INC_STATS_USER((net)->mib.udplite_stats_in6, field); \
171 else SNMP_INC_STATS_USER((net)->mib.udp_stats_in6, field); \
172} while(0)
172 173
173#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) 174#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
174#define UDPX_INC_STATS_BH(sk, field) \ 175#define UDPX_INC_STATS_BH(sk, field) \