summaryrefslogtreecommitdiff
path: root/include/linux/udp.h
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2008-04-19 16:17:34 (GMT)
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-04-19 16:17:34 (GMT)
commitcf816ecb533ab96b883dfdc0db174598b5b5c4d2 (patch)
tree1b7705db288ae2917105e624b01fdf81e0882bf1 /include/linux/udp.h
parentadf6d34e460387ee3e8f1e1875d52bff51212c7d (diff)
parent15f7d677ccff6f0f5de8a1ee43a792567e9f9de9 (diff)
downloadlinux-fsl-qoriq-cf816ecb533ab96b883dfdc0db174598b5b5c4d2.tar.xz
Merge branch 'merge-fixes' into devel
Diffstat (limited to 'include/linux/udp.h')
-rw-r--r--include/linux/udp.h19
1 files changed, 8 insertions, 11 deletions
diff --git a/include/linux/udp.h b/include/linux/udp.h
index 8ec703f..581ca2c 100644
--- a/include/linux/udp.h
+++ b/include/linux/udp.h
@@ -26,15 +26,6 @@ struct udphdr {
__sum16 check;
};
-#ifdef __KERNEL__
-#include <linux/skbuff.h>
-
-static inline struct udphdr *udp_hdr(const struct sk_buff *skb)
-{
- return (struct udphdr *)skb_transport_header(skb);
-}
-#endif
-
/* UDP socket options */
#define UDP_CORK 1 /* Never send partially complete segments */
#define UDP_ENCAP 100 /* Set the socket to accept encapsulated packets */
@@ -45,9 +36,14 @@ static inline struct udphdr *udp_hdr(const struct sk_buff *skb)
#define UDP_ENCAP_L2TPINUDP 3 /* rfc2661 */
#ifdef __KERNEL__
-#include <linux/types.h>
-
#include <net/inet_sock.h>
+#include <linux/skbuff.h>
+
+static inline struct udphdr *udp_hdr(const struct sk_buff *skb)
+{
+ return (struct udphdr *)skb_transport_header(skb);
+}
+
#define UDP_HTABLE_SIZE 128
struct udp_sock {
@@ -82,6 +78,7 @@ static inline struct udp_sock *udp_sk(const struct sock *sk)
{
return (struct udp_sock *)sk;
}
+
#define IS_UDPLITE(__sk) (udp_sk(__sk)->pcflag)
#endif