diff options
Diffstat (limited to 'include/linux/udp.h')
-rw-r--r-- | include/linux/udp.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/udp.h b/include/linux/udp.h index 7e08c07efe0f..6de445c31a64 100644 --- a/include/linux/udp.h +++ b/include/linux/udp.h | |||
@@ -26,6 +26,15 @@ 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 | |||
29 | /* UDP socket options */ | 38 | /* UDP socket options */ |
30 | #define UDP_CORK 1 /* Never send partially complete segments */ | 39 | #define UDP_CORK 1 /* Never send partially complete segments */ |
31 | #define UDP_ENCAP 100 /* Set the socket to accept encapsulated packets */ | 40 | #define UDP_ENCAP 100 /* Set the socket to accept encapsulated packets */ |