Fix compatibility back to Linux 2.6.15 and 2.4.32.
[sliver-openvswitch.git] / datapath / linux-2.6 / compat-2.6 / include / linux / skbuff.h
index 9430f52..a0111fb 100644 (file)
@@ -35,6 +35,11 @@ static inline unsigned char *skb_transport_header(const struct sk_buff *skb)
        return skb->h.raw;
 }
 
+static inline void skb_reset_transport_header(struct sk_buff *skb)
+{
+       skb->h.raw = skb->data;
+}
+
 static inline void skb_set_transport_header(struct sk_buff *skb,
                        const int offset)
 {
@@ -70,6 +75,18 @@ static inline int skb_transport_offset(const struct sk_buff *skb)
 {
     return skb_transport_header(skb) - skb->data;
 }
+
+static inline int skb_network_offset(const struct sk_buff *skb)
+{
+       return skb_network_header(skb) - skb->data;
+}
+
+static inline void skb_copy_to_linear_data(struct sk_buff *skb,
+                                          const void *from,
+                                          const unsigned int len)
+{
+       memcpy(skb->data, from, len);
+}
 #endif /* linux kernel < 2.6.22 */
 
 #endif