summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2007-03-13 14:28:48 -0300
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-25 22:25:22 -0700
commit4bedb45203eab92a87b4c863fe2d0cded633427f (patch)
treed46e43d0a08253cf85ee2db64df6aee5e4ff5a07 /include
parentd9edf9e2be0f7661558984c32bd53867a7037fd3 (diff)
[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')
-rw-r--r--include/linux/skbuff.h1
-rw-r--r--include/linux/udp.h9
-rw-r--r--include/net/udplite.h2
3 files changed, 10 insertions, 2 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 0a4a7ac034fa..cb1ac48cc808 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 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 */
diff --git a/include/net/udplite.h b/include/net/udplite.h
index 765032036657..635b0eafca95 100644
--- a/include/net/udplite.h
+++ b/include/net/udplite.h
@@ -101,7 +101,7 @@ static inline int udplite_sender_cscov(struct udp_sock *up, struct udphdr *uh)
static inline __wsum udplite_csum_outgoing(struct sock *sk, struct sk_buff *skb)
{
- int cscov = udplite_sender_cscov(udp_sk(sk), skb->h.uh);
+ int cscov = udplite_sender_cscov(udp_sk(sk), udp_hdr(skb));
__wsum csum = 0;
skb->ip_summed = CHECKSUM_NONE; /* no HW support for checksumming */