netfilter: xt_LOG: don't use xchg() for simple assignment
[pandora-kernel.git] / include / linux / ip.h
index 6b25d36..bd0a2a8 100644 (file)
@@ -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,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! */
@@ -123,4 +139,11 @@ struct ip_comp_hdr {
        __be16 cpi;
 };
 
+struct ip_beet_phdr {
+       __u8 nexthdr;
+       __u8 hdrlen;
+       __u8 padlen;
+       __u8 reserved;
+};
+
 #endif /* _LINUX_IP_H */