aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/udp.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/udp.h b/include/linux/udp.h
index 581ca2c14c5..9c94312b2de 100644
--- a/include/linux/udp.h
+++ b/include/linux/udp.h
@@ -46,6 +46,11 @@ static inline struct udphdr *udp_hdr(const struct sk_buff *skb)
#define UDP_HTABLE_SIZE 128
+static inline int udp_hashfn(const unsigned num)
+{
+ return num & (UDP_HTABLE_SIZE - 1);
+}
+
struct udp_sock {
/* inet_sock has to be the first member */
struct inet_sock inet;