]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
Update to 2.6.37-rc8 headers
authorStephen Hemminger <stephen.hemminger@vyatta.com>
Wed, 29 Dec 2010 23:05:48 +0000 (15:05 -0800)
committerStephen Hemminger <stephen.hemminger@vyatta.com>
Wed, 29 Dec 2010 23:05:48 +0000 (15:05 -0800)
Use sanitized headers from 2.6.37-rc8

include/linux/if.h
include/linux/netfilter/x_tables.h
include/linux/netfilter_ipv4/ip_tables.h
include/linux/netlink.h
include/linux/tc_ematch/tc_em_meta.h
include/linux/types.h

index 352e2250aee294f31d2c6202289be25e878d10f0..547c55eb3c6f6168b6236916485f6f9b5f76c9dc 100644 (file)
@@ -75,6 +75,8 @@
 #define IFF_DISABLE_NETPOLL    0x2000  /* disable netpoll at run-time */
 #define IFF_MACVLAN_PORT       0x4000  /* device used as macvlan port */
 #define IFF_BRIDGE_PORT        0x8000          /* device used as bridge port */
+#define IFF_OVS_DATAPATH       0x10000 /* device used as Open vSwitch
+                                        * datapath port */
 
 #define IF_GET_IFACE   0x0001          /* for querying only */
 #define IF_GET_PROTO   0x0002
index fa2d9578d7d2ef4b19079464d2d2087e6a4baab5..4120970072771786b50469e5b40d5f65bda9883c 100644 (file)
@@ -66,6 +66,11 @@ struct xt_standard_target {
        int verdict;
 };
 
+struct xt_error_target {
+       struct xt_entry_target target;
+       char errorname[XT_FUNCTION_MAXNAMELEN];
+};
+
 /* The argument to IPT_SO_GET_REVISION_*.  Returns highest revision
  * kernel supports, if >= revision. */
 struct xt_get_revision {
index 735f4b1bb61dfd636c3570c6b8075c3dce411c80..57fd82a16b7da973a49c92221960ce10449b038e 100644 (file)
 #define ipt_target xt_target
 #define ipt_table xt_table
 #define ipt_get_revision xt_get_revision
+#define ipt_entry_match xt_entry_match
+#define ipt_entry_target xt_entry_target
+#define ipt_standard_target xt_standard_target
+#define ipt_error_target xt_error_target
+#define ipt_counters xt_counters
+#define IPT_CONTINUE XT_CONTINUE
+#define IPT_RETURN XT_RETURN
+
+/* This group is older than old (iptables < v1.4.0-rc1~89) */
+#include <linux/netfilter/xt_tcpudp.h>
+#define ipt_udp xt_udp
+#define ipt_tcp xt_tcp
+#define IPT_TCP_INV_SRCPT      XT_TCP_INV_SRCPT
+#define IPT_TCP_INV_DSTPT      XT_TCP_INV_DSTPT
+#define IPT_TCP_INV_FLAGS      XT_TCP_INV_FLAGS
+#define IPT_TCP_INV_OPTION     XT_TCP_INV_OPTION
+#define IPT_TCP_INV_MASK       XT_TCP_INV_MASK
+#define IPT_UDP_INV_SRCPT      XT_UDP_INV_SRCPT
+#define IPT_UDP_INV_DSTPT      XT_UDP_INV_DSTPT
+#define IPT_UDP_INV_MASK       XT_UDP_INV_MASK
+
+/* The argument to IPT_SO_ADD_COUNTERS. */
+#define ipt_counters_info xt_counters_info
+/* Standard return verdict, or do jump. */
+#define IPT_STANDARD_TARGET XT_STANDARD_TARGET
+/* Error verdict. */
+#define IPT_ERROR_TARGET XT_ERROR_TARGET
+
+/* fn returns 0 to continue iteration */
+#define IPT_MATCH_ITERATE(e, fn, args...) \
+       XT_MATCH_ITERATE(struct ipt_entry, e, fn, ## args)
+
+/* fn returns 0 to continue iteration */
+#define IPT_ENTRY_ITERATE(entries, size, fn, args...) \
+       XT_ENTRY_ITERATE(struct ipt_entry, entries, size, fn, ## args)
 
 /* Yes, Virginia, you have to zero the padding. */
 struct ipt_ip {
@@ -46,12 +81,6 @@ struct ipt_ip {
        u_int8_t invflags;
 };
 
-#define ipt_entry_match xt_entry_match
-#define ipt_entry_target xt_entry_target
-#define ipt_standard_target xt_standard_target
-
-#define ipt_counters xt_counters
-
 /* Values for "flag" field in struct ipt_ip (general ip structure). */
 #define IPT_F_FRAG             0x01    /* Set if rule is a fragment rule */
 #define IPT_F_GOTO             0x02    /* Set if jump is a goto */
@@ -110,23 +139,6 @@ struct ipt_entry {
 #define IPT_SO_GET_REVISION_TARGET     (IPT_BASE_CTL + 3)
 #define IPT_SO_GET_MAX                 IPT_SO_GET_REVISION_TARGET
 
-#define IPT_CONTINUE XT_CONTINUE
-#define IPT_RETURN XT_RETURN
-
-#include <linux/netfilter/xt_tcpudp.h>
-#define ipt_udp xt_udp
-#define ipt_tcp xt_tcp
-
-#define IPT_TCP_INV_SRCPT      XT_TCP_INV_SRCPT
-#define IPT_TCP_INV_DSTPT      XT_TCP_INV_DSTPT
-#define IPT_TCP_INV_FLAGS      XT_TCP_INV_FLAGS
-#define IPT_TCP_INV_OPTION     XT_TCP_INV_OPTION
-#define IPT_TCP_INV_MASK       XT_TCP_INV_MASK
-
-#define IPT_UDP_INV_SRCPT      XT_UDP_INV_SRCPT
-#define IPT_UDP_INV_DSTPT      XT_UDP_INV_DSTPT
-#define IPT_UDP_INV_MASK       XT_UDP_INV_MASK
-
 /* ICMP matching stuff */
 struct ipt_icmp {
        u_int8_t type;                          /* type to match */
@@ -140,7 +152,7 @@ struct ipt_icmp {
 /* The argument to IPT_SO_GET_INFO */
 struct ipt_getinfo {
        /* Which table: caller fills this in. */
-       char name[IPT_TABLE_MAXNAMELEN];
+       char name[XT_TABLE_MAXNAMELEN];
 
        /* Kernel fills these in. */
        /* Which hook entry points are valid: bitmask */
@@ -162,7 +174,7 @@ struct ipt_getinfo {
 /* The argument to IPT_SO_SET_REPLACE. */
 struct ipt_replace {
        /* Which table. */
-       char name[IPT_TABLE_MAXNAMELEN];
+       char name[XT_TABLE_MAXNAMELEN];
 
        /* Which hook entry points are valid: bitmask.  You can't
            change this. */
@@ -190,13 +202,10 @@ struct ipt_replace {
        struct ipt_entry entries[0];
 };
 
-/* The argument to IPT_SO_ADD_COUNTERS. */
-#define ipt_counters_info xt_counters_info
-
 /* The argument to IPT_SO_GET_ENTRIES. */
 struct ipt_get_entries {
        /* Which table: user fills this in. */
-       char name[IPT_TABLE_MAXNAMELEN];
+       char name[XT_TABLE_MAXNAMELEN];
 
        /* User fills this in: total entry size. */
        unsigned int size;
@@ -205,26 +214,13 @@ struct ipt_get_entries {
        struct ipt_entry entrytable[0];
 };
 
-/* Standard return verdict, or do jump. */
-#define IPT_STANDARD_TARGET XT_STANDARD_TARGET
-/* Error verdict. */
-#define IPT_ERROR_TARGET XT_ERROR_TARGET
-
 /* Helper functions */
-static __inline__ struct ipt_entry_target *
+static __inline__ struct xt_entry_target *
 ipt_get_target(struct ipt_entry *e)
 {
        return (void *)e + e->target_offset;
 }
 
-/* fn returns 0 to continue iteration */
-#define IPT_MATCH_ITERATE(e, fn, args...) \
-       XT_MATCH_ITERATE(struct ipt_entry, e, fn, ## args)
-
-/* fn returns 0 to continue iteration */
-#define IPT_ENTRY_ITERATE(entries, size, fn, args...) \
-       XT_ENTRY_ITERATE(struct ipt_entry, entries, size, fn, ## args)
-
 /*
  *     Main firewall chains definitions and global var's definitions.
  */
index eed51b063f35f58c06072e4f6989f8fac458a177..f55ed8c5fc0b6f929c588bcbf8369256694fe41d 100644 (file)
@@ -70,7 +70,7 @@ struct nlmsghdr {
    Check               NLM_F_EXCL
  */
 
-#define NLMSG_ALIGNTO  4
+#define NLMSG_ALIGNTO  4U
 #define NLMSG_ALIGN(len) ( ((len)+NLMSG_ALIGNTO-1) & ~(NLMSG_ALIGNTO-1) )
 #define NLMSG_HDRLEN    ((int) NLMSG_ALIGN(sizeof(struct nlmsghdr)))
 #define NLMSG_LENGTH(len) ((len)+NLMSG_ALIGN(NLMSG_HDRLEN))
index 0864206ec1a331b2aadacef8fa4a7fae4f3aa47e..7138962664f81912b974c29c12900606ae07306a 100644 (file)
@@ -79,6 +79,7 @@ enum {
        TCF_META_ID_SK_SENDMSG_OFF,
        TCF_META_ID_SK_WRITE_PENDING,
        TCF_META_ID_VLAN_TAG,
+       TCF_META_ID_RXHASH,
        __TCF_META_ID_MAX
 };
 #define TCF_META_ID_MAX (__TCF_META_ID_MAX - 1)
index 1bf5e5abec9427e394c6ce41e808dbcee7ddf705..630cd3bb01f0a2913ca4fc9f006cf126df47a4f0 100644 (file)
@@ -34,7 +34,15 @@ typedef __u64 __bitwise __be64;
 typedef __u16 __bitwise __sum16;
 typedef __u32 __bitwise __wsum;
 
-/* this is a special 64bit data type that is 8-byte aligned */
+/*
+ * aligned_u64 should be used in defining kernel<->userspace ABIs to avoid
+ * common 32/64-bit compat problems.
+ * 64-bit values align to 4-byte boundaries on x86_32 (and possibly other
+ * architectures) and to 8-byte boundaries on 64-bit architetures.  The new
+ * aligned_64 type enforces 8-byte alignment so that structs containing
+ * aligned_64 values have the same alignment on 32-bit and 64-bit architectures.
+ * No conversions are necessary between 32-bit user-space and a 64-bit kernel.
+ */
 #define __aligned_u64 __u64 __attribute__((aligned(8)))
 #define __aligned_be64 __be64 __attribute__((aligned(8)))
 #define __aligned_le64 __le64 __attribute__((aligned(8)))