]> err.no Git - linux-2.6/blobdiff - include/linux/tcp.h
[PATCH] zd1211rw: Extend RF layer
[linux-2.6] / include / linux / tcp.h
index 244ae0dacf4a4232c733a0674f53cad53f35a972..c6b9f92e8289949bde61f0ea384f48349d5a083f 100644 (file)
@@ -178,14 +178,19 @@ struct tcp_md5sig {
 #include <net/inet_connection_sock.h>
 #include <net/inet_timewait_sock.h>
 
+static inline struct tcphdr *tcp_hdr(const struct sk_buff *skb)
+{
+       return (struct tcphdr *)skb_transport_header(skb);
+}
+
 static inline unsigned int tcp_hdrlen(const struct sk_buff *skb)
 {
-       return skb->h.th->doff * 4;
+       return tcp_hdr(skb)->doff * 4;
 }
 
 static inline unsigned int tcp_optlen(const struct sk_buff *skb)
 {
-       return (skb->h.th->doff - 5) * 4;
+       return (tcp_hdr(skb)->doff - 5) * 4;
 }
 
 /* This defines a selective acknowledgement block. */