summaryrefslogtreecommitdiffstats
path: root/include/linux/udp.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo2007-03-13 18:28:48 +0100
committerDavid S. Miller2007-04-26 07:25:22 +0200
commit4bedb45203eab92a87b4c863fe2d0cded633427f (patch)
treed46e43d0a08253cf85ee2db64df6aee5e4ff5a07 /include/linux/udp.h
parent[SK_BUFF]: Introduce igmp_hdr() & friends, remove skb->h.igmph (diff)
downloadkernel-qcow2-linux-4bedb45203eab92a87b4c863fe2d0cded633427f.tar.gz
kernel-qcow2-linux-4bedb45203eab92a87b4c863fe2d0cded633427f.tar.xz
kernel-qcow2-linux-4bedb45203eab92a87b4c863fe2d0cded633427f.zip
[SK_BUFF]: Introduce udp_hdr(), remove skb->h.uh
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/udp.h')
-rw-r--r--include/linux/udp.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/udp.h b/include/linux/udp.h
index 7e08c07efe0f..1f58503af9a6 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 */