diff options
author | Joe Perches <joe@perches.com> | 2008-03-24 01:06:51 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-03-24 01:06:51 -0400 |
commit | 310afe86af8ddd96a06b75aa61ef1af233f80e89 (patch) | |
tree | f0ce0387b079a69a6bfef396001389dacab41d35 | |
parent | cc32e05416b4023a5466a2f66e3c02236a771c5b (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>
-rw-r--r-- | include/linux/udp.h | 18 |
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 { | |||
26 | __sum16 check; | 26 | __sum16 check; |
27 | }; | 27 | }; |
28 | 28 | ||
29 | #ifdef __KERNEL__ | ||
30 | #include <linux/skbuff.h> | ||
31 | |||
32 | static inline struct udphdr *udp_hdr(const struct sk_buff *skb) | ||
33 | { | ||
34 | return (struct udphdr *)skb_transport_header(skb); | ||
35 | } | ||
36 | #endif | ||
37 | |||
38 | /* UDP socket options */ | 29 | /* UDP socket options */ |
39 | #define UDP_CORK 1 /* Never send partially complete segments */ | 30 | #define UDP_CORK 1 /* Never send partially complete segments */ |
40 | #define UDP_ENCAP 100 /* Set the socket to accept encapsulated packets */ | 31 | #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) | |||
45 | #define UDP_ENCAP_L2TPINUDP 3 /* rfc2661 */ | 36 | #define UDP_ENCAP_L2TPINUDP 3 /* rfc2661 */ |
46 | 37 | ||
47 | #ifdef __KERNEL__ | 38 | #ifdef __KERNEL__ |
48 | #include <linux/types.h> | ||
49 | |||
50 | #include <net/inet_sock.h> | 39 | #include <net/inet_sock.h> |
40 | #include <linux/skbuff.h> | ||
41 | |||
42 | static inline struct udphdr *udp_hdr(const struct sk_buff *skb) | ||
43 | { | ||
44 | return (struct udphdr *)skb_transport_header(skb); | ||
45 | } | ||
46 | |||
51 | #define UDP_HTABLE_SIZE 128 | 47 | #define UDP_HTABLE_SIZE 128 |
52 | 48 | ||
53 | struct udp_sock { | 49 | struct udp_sock { |