summaryrefslogtreecommitdiff
path: root/include/linux/udp.h
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2008-03-23 22:06:51 -0700
committerDavid S. Miller <davem@davemloft.net>2008-03-23 22:06:51 -0700
commit310afe86af8ddd96a06b75aa61ef1af233f80e89 (patch)
treef0ce0387b079a69a6bfef396001389dacab41d35 /include/linux/udp.h
parentcc32e05416b4023a5466a2f66e3c02236a771c5b (diff)
[NET]: include/linux/udp.h - remove duplicate include
Remove duplicate #include <linux/types.h> Combine #ifdef __KERNEL__ blocks Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/udp.h')
-rw-r--r--include/linux/udp.h18
1 files changed, 7 insertions, 11 deletions
diff --git a/include/linux/udp.h b/include/linux/udp.h
index 1e7b7cb5703b..581ca2c14c52 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 {