aboutsummaryrefslogtreecommitdiff
path: root/include/linux/icmp.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/icmp.h')
-rw-r--r--include/linux/icmp.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/icmp.h b/include/linux/icmp.h
index 24da4fbc1a2f..474f2a51cf0a 100644
--- a/include/linux/icmp.h
+++ b/include/linux/icmp.h
@@ -82,6 +82,15 @@ struct icmphdr {
} un;
};
+#ifdef __KERNEL__
+#include <linux/skbuff.h>
+
+static inline struct icmphdr *icmp_hdr(const struct sk_buff *skb)
+{
+ return (struct icmphdr *)skb_transport_header(skb);
+}
+#endif
+
/*
* constants for (set|get)sockopt
*/