]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/ip.h
libata: add whitelist for devices with known good pata-sata bridges
[linux-2.6-omap-h63xx.git] / include / linux / ip.h
index ecee9bb27d0e6db993778bb6b82169fd5b8cf8d2..bd0a2a8631c60e6620578acc68c363540aea1755 100644 (file)
@@ -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 <linux/skbuff.h>
+
+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! */