summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/skbuff.h1
-rw-r--r--include/linux/udp.h9
2 files changed, 9 insertions, 1 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 0a4a7ac034f..cb1ac48cc80 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -238,7 +238,6 @@ struct sk_buff {
union {
struct tcphdr *th;
- struct udphdr *uh;
struct icmphdr *icmph;
struct iphdr *ipiph;
struct ipv6hdr *ipv6h;
diff --git a/include/linux/udp.h b/include/linux/udp.h
index 7e08c07efe0..1f58503af9a 100644
--- a/include/linux/udp.h
+++ b/include/linux/udp.h
@@ -26,6 +26,15 @@ 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->h.raw;
+}
+#endif
+
/* UDP socket options */
#define UDP_CORK 1 /* Never send partially complete segments */
#define UDP_ENCAP 100 /* Set the socket to accept encapsulated packets */