X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=include%2Flinux%2Fip.h;h=bd0a2a8631c60e6620578acc68c363540aea1755;hb=63eae0ccacd67fd5ee238c6ba68f83f0ab91a1df;hp=2f4600146f833a509e3d7cac68b97013142c9e09;hpb=a4c12d6c5dde48c69464baf7c703e425ee511433;p=linux-2.6-omap-h63xx.git diff --git a/include/linux/ip.h b/include/linux/ip.h index 2f4600146f8..bd0a2a8631c 100644 --- a/include/linux/ip.h +++ b/include/linux/ip.h @@ -80,6 +80,8 @@ #define IPOPT_TS_TSANDADDR 1 /* timestamps and addresses */ #define IPOPT_TS_PRESPEC 3 /* specified modules only */ +#define IPV4_BEET_PHMAXLEN 8 + struct iphdr { #if defined(__LITTLE_ENDIAN_BITFIELD) __u8 ihl:4, @@ -96,31 +98,52 @@ struct iphdr { __be16 frag_off; __u8 ttl; __u8 protocol; - __u16 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! */ - __u16 reserved; - __u32 spi; - __u32 seq_no; /* Sequence number */ + __be16 reserved; + __be32 spi; + __be32 seq_no; /* Sequence number */ __u8 auth_data[0]; /* Variable len but >=4. Mind the 64 bit alignment! */ }; struct ip_esp_hdr { - __u32 spi; - __u32 seq_no; /* Sequence number */ + __be32 spi; + __be32 seq_no; /* Sequence number */ __u8 enc_data[0]; /* Variable len but >=8. Mind the 64 bit alignment! */ }; struct ip_comp_hdr { __u8 nexthdr; __u8 flags; - __u16 cpi; + __be16 cpi; +}; + +struct ip_beet_phdr { + __u8 nexthdr; + __u8 hdrlen; + __u8 padlen; + __u8 reserved; }; #endif /* _LINUX_IP_H */