X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=include%2Flinux%2Fip.h;h=bd0a2a8631c60e6620578acc68c363540aea1755;hb=728f08934b087b96aacb00467f5551e0a5593fca;hp=ecee9bb27d0e6db993778bb6b82169fd5b8cf8d2;hpb=fefd26b3b8597a11a422d950c0d4424ff33a70ad;p=linux-2.6-omap-h63xx.git diff --git a/include/linux/ip.h b/include/linux/ip.h index ecee9bb27d0..bd0a2a8631c 100644 --- a/include/linux/ip.h +++ b/include/linux/ip.h @@ -98,12 +98,26 @@ struct iphdr { __be16 frag_off; __u8 ttl; __u8 protocol; - __be16 check; + __sum16 check; __be32 saddr; __be32 daddr; /*The options start here. */ }; +#ifdef __KERNEL__ +#include + +static inline struct iphdr *ip_hdr(const struct sk_buff *skb) +{ + return (struct iphdr *)skb_network_header(skb); +} + +static inline struct iphdr *ipip_hdr(const struct sk_buff *skb) +{ + return (struct iphdr *)skb_transport_header(skb); +} +#endif + struct ip_auth_hdr { __u8 nexthdr; __u8 hdrlen; /* This one is measured in 32 bit units! */