Compatibility fixes for 2.6.18 kernel
[openvswitch] / datapath / linux-2.6 / compat-2.6 / include / linux / skbuff.h
index 1b779ef7a407c9c90899a5b1474717902c950ae2..9430f5271124b84d2d0c785af2064ba9c61ca725 100644 (file)
@@ -56,11 +56,20 @@ static inline unsigned char *skb_mac_header(const struct sk_buff *skb)
        return skb->mac.raw;
 }
 
+static inline void skb_reset_mac_header(struct sk_buff *skb)
+{
+       skb->mac_header = skb->data;
+}
+
 static inline void skb_set_mac_header(struct sk_buff *skb, const int offset)
 {
        skb->mac.raw = skb->data + offset;
 }
 
+static inline int skb_transport_offset(const struct sk_buff *skb)
+{
+    return skb_transport_header(skb) - skb->data;
+}
 #endif /* linux kernel < 2.6.22 */
 
 #endif