Compatibility fixes for 2.6.18 kernel
[openvswitch] / datapath / linux-2.6 / compat-2.6 / include / linux / tcp.h
index 528f16afa229e43fd088806d79d37d7609790a04..e8b519771a14222bd6ffb3e5d12b7a3172cb7b49 100644 (file)
@@ -11,6 +11,11 @@ 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 tcp_hdr(skb)->doff * 4;
+}
 #endif /* __KERNEL__ */
 
 #endif /* linux kernel < 2.6.22 */