datapath: Rename linux-2.6 and compat-2.6 directories.
[sliver-openvswitch.git] / datapath / linux / compat / include / linux / icmp.h
diff --git a/datapath/linux/compat/include/linux/icmp.h b/datapath/linux/compat/include/linux/icmp.h
new file mode 100644 (file)
index 0000000..89b354e
--- /dev/null
@@ -0,0 +1,13 @@
+#ifndef __LINUX_ICMP_WRAPPER_H
+#define __LINUX_ICMP_WRAPPER_H 1
+
+#include_next <linux/icmp.h>
+
+#ifndef HAVE_SKBUFF_HEADER_HELPERS
+static inline struct icmphdr *icmp_hdr(const struct sk_buff *skb)
+{
+        return (struct icmphdr *)skb_transport_header(skb);
+}
+#endif
+
+#endif