diff options
Diffstat (limited to 'include/linux/udp.h')
-rw-r--r-- | include/linux/udp.h | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/include/linux/udp.h b/include/linux/udp.h index 8ec703f462da..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 { |
@@ -82,6 +78,7 @@ static inline struct udp_sock *udp_sk(const struct sock *sk) | |||
82 | { | 78 | { |
83 | return (struct udp_sock *)sk; | 79 | return (struct udp_sock *)sk; |
84 | } | 80 | } |
81 | |||
85 | #define IS_UDPLITE(__sk) (udp_sk(__sk)->pcflag) | 82 | #define IS_UDPLITE(__sk) (udp_sk(__sk)->pcflag) |
86 | 83 | ||
87 | #endif | 84 | #endif |