X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=include%2Flinux%2Ficmp.h;h=474f2a51cf0af66474be229b626403975a36683c;hb=be3be8905854d2fcf6030f1da9ebc221e9e2c5f1;hp=878cfe4e587f29d0d5dd3129180227bed8bf8990;hpb=9a69d1aeccf169d9a1e442c07d3a6e87f06a7b49;p=linux-2.6-omap-h63xx.git diff --git a/include/linux/icmp.h b/include/linux/icmp.h index 878cfe4e587..474f2a51cf0 100644 --- a/include/linux/icmp.h +++ b/include/linux/icmp.h @@ -68,7 +68,7 @@ struct icmphdr { __u8 type; __u8 code; - __be16 checksum; + __sum16 checksum; union { struct { __be16 id; @@ -82,6 +82,15 @@ struct icmphdr { } un; }; +#ifdef __KERNEL__ +#include + +static inline struct icmphdr *icmp_hdr(const struct sk_buff *skb) +{ + return (struct icmphdr *)skb_transport_header(skb); +} +#endif + /* * constants for (set|get)sockopt */