]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
include: resynchronize headers with 2.6.29-rc5
authorJan Engelhardt <jengelh@medozas.de>
Sat, 21 Feb 2009 03:42:32 +0000 (04:42 +0100)
committerJan Engelhardt <jengelh@medozas.de>
Sat, 21 Feb 2009 03:42:32 +0000 (04:42 +0100)
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
20 files changed:
extensions/libipt_DNAT.c
extensions/libipt_MASQUERADE.c
extensions/libipt_NETMAP.c
extensions/libipt_REDIRECT.c
extensions/libipt_SAME.c
extensions/libipt_SNAT.c
include/linux/netfilter/nf_conntrack_common.h
include/linux/netfilter/xt_NFLOG.h
include/linux/netfilter/xt_connlimit.h
include/linux/netfilter/xt_conntrack.h
include/linux/netfilter/xt_quota.h
include/linux/netfilter/xt_sctp.h
include/linux/netfilter/xt_string.h
include/linux/netfilter_ipv4/ip_tables.h
include/linux/netfilter_ipv4/ipt_SAME.h
include/linux/netfilter_ipv6/ip6_tables.h
include/linux/netfilter_ipv6/ip6t_TCPMSS.h [deleted file]
include/linux/types.h
include/net/netfilter/nf_conntrack_tuple.h [moved from include/linux/netfilter/nf_conntrack_tuple.h with 77% similarity]
include/net/netfilter/nf_nat.h [moved from include/linux/netfilter/nf_nat.h with 62% similarity]

index f0a236925edf30c00cf3dc8e56a2fc0135b568b9..b3a3557fd26baff580b29cb57ce634047f580ce2 100644 (file)
@@ -7,7 +7,7 @@
 #include <xtables.h>
 #include <iptables.h> /* get_kernel_version */
 #include <linux/netfilter_ipv4/ip_tables.h>
-#include <linux/netfilter/nf_nat.h>
+#include <net/netfilter/nf_nat.h>
 
 #define IPT_DNAT_OPT_DEST 0x1
 #define IPT_DNAT_OPT_RANDOM 0x2
@@ -17,7 +17,7 @@
 struct ipt_natinfo
 {
        struct xt_entry_target t;
-       struct ip_nat_multi_range mr;
+       struct nf_nat_multi_range mr;
 };
 
 static void DNAT_help(void)
@@ -36,7 +36,7 @@ static const struct option DNAT_opts[] = {
 };
 
 static struct ipt_natinfo *
-append_range(struct ipt_natinfo *info, const struct ip_nat_range *range)
+append_range(struct ipt_natinfo *info, const struct nf_nat_range *range)
 {
        unsigned int size;
 
@@ -58,7 +58,7 @@ append_range(struct ipt_natinfo *info, const struct ip_nat_range *range)
 static struct xt_entry_target *
 parse_to(char *arg, int portok, struct ipt_natinfo *info)
 {
-       struct ip_nat_range range;
+       struct nf_nat_range range;
        char *colon, *dash, *error;
        const struct in_addr *ip;
 
@@ -189,7 +189,7 @@ static void DNAT_check(unsigned int flags)
                           "You must specify --to-destination");
 }
 
-static void print_range(const struct ip_nat_range *r)
+static void print_range(const struct nf_nat_range *r)
 {
        if (r->flags & IP_NAT_RANGE_MAP_IPS) {
                struct in_addr a;
@@ -242,8 +242,8 @@ static struct xtables_target dnat_tg_reg = {
        .name           = "DNAT",
        .version        = XTABLES_VERSION,
        .family         = NFPROTO_IPV4,
-       .size           = XT_ALIGN(sizeof(struct ip_nat_multi_range)),
-       .userspacesize  = XT_ALIGN(sizeof(struct ip_nat_multi_range)),
+       .size           = XT_ALIGN(sizeof(struct nf_nat_multi_range)),
+       .userspacesize  = XT_ALIGN(sizeof(struct nf_nat_multi_range)),
        .help           = DNAT_help,
        .parse          = DNAT_parse,
        .final_check    = DNAT_check,
index 0180bf6b0bcbb05d773525cf621d983e980d4c7e..b04a9f69b685abaca3e2c8924952c2a5b47c1563 100644 (file)
@@ -6,7 +6,7 @@
 #include <getopt.h>
 #include <xtables.h>
 #include <linux/netfilter_ipv4/ip_tables.h>
-#include <linux/netfilter/nf_nat.h>
+#include <net/netfilter/nf_nat.h>
 
 static void MASQUERADE_help(void)
 {
@@ -26,7 +26,7 @@ static const struct option MASQUERADE_opts[] = {
 
 static void MASQUERADE_init(struct xt_entry_target *t)
 {
-       struct ip_nat_multi_range *mr = (struct ip_nat_multi_range *)t->data;
+       struct nf_nat_multi_range *mr = (struct nf_nat_multi_range *)t->data;
 
        /* Actually, it's 0, but it's ignored at the moment. */
        mr->rangesize = 1;
@@ -35,7 +35,7 @@ static void MASQUERADE_init(struct xt_entry_target *t)
 
 /* Parses ports */
 static void
-parse_ports(const char *arg, struct ip_nat_multi_range *mr)
+parse_ports(const char *arg, struct nf_nat_multi_range *mr)
 {
        const char *dash;
        int port;
@@ -72,8 +72,8 @@ static int MASQUERADE_parse(int c, char **argv, int invert, unsigned int *flags,
 {
        const struct ipt_entry *entry = e;
        int portok;
-       struct ip_nat_multi_range *mr
-               = (struct ip_nat_multi_range *)(*target)->data;
+       struct nf_nat_multi_range *mr
+               = (struct nf_nat_multi_range *)(*target)->data;
 
        if (entry->ip.proto == IPPROTO_TCP
            || entry->ip.proto == IPPROTO_UDP
@@ -110,9 +110,9 @@ static void
 MASQUERADE_print(const void *ip, const struct xt_entry_target *target,
                  int numeric)
 {
-       struct ip_nat_multi_range *mr
-               = (struct ip_nat_multi_range *)target->data;
-       struct ip_nat_range *r = &mr->range[0];
+       struct nf_nat_multi_range *mr
+               = (struct nf_nat_multi_range *)target->data;
+       struct nf_nat_range *r = &mr->range[0];
 
        if (r->flags & IP_NAT_RANGE_PROTO_SPECIFIED) {
                printf("masq ports: ");
@@ -129,9 +129,9 @@ MASQUERADE_print(const void *ip, const struct xt_entry_target *target,
 static void
 MASQUERADE_save(const void *ip, const struct xt_entry_target *target)
 {
-       struct ip_nat_multi_range *mr
-               = (struct ip_nat_multi_range *)target->data;
-       struct ip_nat_range *r = &mr->range[0];
+       struct nf_nat_multi_range *mr
+               = (struct nf_nat_multi_range *)target->data;
+       struct nf_nat_range *r = &mr->range[0];
 
        if (r->flags & IP_NAT_RANGE_PROTO_SPECIFIED) {
                printf("--to-ports %hu", ntohs(r->min.tcp.port));
@@ -148,8 +148,8 @@ static struct xtables_target masquerade_tg_reg = {
        .name           = "MASQUERADE",
        .version        = XTABLES_VERSION,
        .family         = NFPROTO_IPV4,
-       .size           = XT_ALIGN(sizeof(struct ip_nat_multi_range)),
-       .userspacesize  = XT_ALIGN(sizeof(struct ip_nat_multi_range)),
+       .size           = XT_ALIGN(sizeof(struct nf_nat_multi_range)),
+       .userspacesize  = XT_ALIGN(sizeof(struct nf_nat_multi_range)),
        .help           = MASQUERADE_help,
        .init           = MASQUERADE_init,
        .parse          = MASQUERADE_parse,
index f718d2c853d3a300c15cb64c44503daa7afdd7a3..982023038bc8ba73384291df764fcf32d6a82b75 100644 (file)
@@ -8,7 +8,7 @@
 #include <stdlib.h>
 #include <getopt.h>
 #include <xtables.h>
-#include <linux/netfilter/nf_nat.h>
+#include <net/netfilter/nf_nat.h>
 
 #define MODULENAME "NETMAP"
 
@@ -53,7 +53,7 @@ netmask2bits(u_int32_t netmask)
 
 static void NETMAP_init(struct xt_entry_target *t)
 {
-       struct ip_nat_multi_range *mr = (struct ip_nat_multi_range *)t->data;
+       struct nf_nat_multi_range *mr = (struct nf_nat_multi_range *)t->data;
 
        /* Actually, it's 0, but it's ignored at the moment. */
        mr->rangesize = 1;
@@ -62,7 +62,7 @@ static void NETMAP_init(struct xt_entry_target *t)
 
 /* Parses network address */
 static void
-parse_to(char *arg, struct ip_nat_range *range)
+parse_to(char *arg, struct nf_nat_range *range)
 {
        char *slash;
        const struct in_addr *ip;
@@ -112,8 +112,8 @@ parse_to(char *arg, struct ip_nat_range *range)
 static int NETMAP_parse(int c, char **argv, int invert, unsigned int *flags,
                         const void *entry, struct xt_entry_target **target)
 {
-       struct ip_nat_multi_range *mr
-               = (struct ip_nat_multi_range *)(*target)->data;
+       struct nf_nat_multi_range *mr
+               = (struct nf_nat_multi_range *)(*target)->data;
 
        switch (c) {
        case '1':
@@ -140,9 +140,9 @@ static void NETMAP_check(unsigned int flags)
 static void NETMAP_print(const void *ip, const struct xt_entry_target *target,
                          int numeric)
 {
-       struct ip_nat_multi_range *mr
-               = (struct ip_nat_multi_range *)target->data;
-       struct ip_nat_range *r = &mr->range[0];
+       struct nf_nat_multi_range *mr
+               = (struct nf_nat_multi_range *)target->data;
+       struct nf_nat_range *r = &mr->range[0];
        struct in_addr a;
        int bits;
 
@@ -166,8 +166,8 @@ static struct xtables_target netmap_tg_reg = {
        .name           = MODULENAME,
        .version        = XTABLES_VERSION,
        .family         = NFPROTO_IPV4,
-       .size           = XT_ALIGN(sizeof(struct ip_nat_multi_range)),
-       .userspacesize  = XT_ALIGN(sizeof(struct ip_nat_multi_range)),
+       .size           = XT_ALIGN(sizeof(struct nf_nat_multi_range)),
+       .userspacesize  = XT_ALIGN(sizeof(struct nf_nat_multi_range)),
        .help           = NETMAP_help,
        .init           = NETMAP_init,
        .parse          = NETMAP_parse,
index 8fcb46a9477aa5743b6ae9e6175e67a791e8879d..7ddb35de26e0cca9ca84bf9025b0422c9aa142aa 100644 (file)
@@ -6,7 +6,7 @@
 #include <getopt.h>
 #include <xtables.h>
 #include <linux/netfilter_ipv4/ip_tables.h>
-#include <linux/netfilter/nf_nat.h>
+#include <net/netfilter/nf_nat.h>
 
 #define IPT_REDIRECT_OPT_DEST  0x01
 #define IPT_REDIRECT_OPT_RANDOM        0x02
@@ -27,7 +27,7 @@ static const struct option REDIRECT_opts[] = {
 
 static void REDIRECT_init(struct xt_entry_target *t)
 {
-       struct ip_nat_multi_range *mr = (struct ip_nat_multi_range *)t->data;
+       struct nf_nat_multi_range *mr = (struct nf_nat_multi_range *)t->data;
 
        /* Actually, it's 0, but it's ignored at the moment. */
        mr->rangesize = 1;
@@ -36,7 +36,7 @@ static void REDIRECT_init(struct xt_entry_target *t)
 
 /* Parses ports */
 static void
-parse_ports(const char *arg, struct ip_nat_multi_range *mr)
+parse_ports(const char *arg, struct nf_nat_multi_range *mr)
 {
        const char *dash;
        int port;
@@ -78,8 +78,8 @@ static int REDIRECT_parse(int c, char **argv, int invert, unsigned int *flags,
                           const void *e, struct xt_entry_target **target)
 {
        const struct ipt_entry *entry = e;
-       struct ip_nat_multi_range *mr
-               = (struct ip_nat_multi_range *)(*target)->data;
+       struct nf_nat_multi_range *mr
+               = (struct nf_nat_multi_range *)(*target)->data;
        int portok;
 
        if (entry->ip.proto == IPPROTO_TCP
@@ -123,9 +123,9 @@ static int REDIRECT_parse(int c, char **argv, int invert, unsigned int *flags,
 static void REDIRECT_print(const void *ip, const struct xt_entry_target *target,
                            int numeric)
 {
-       struct ip_nat_multi_range *mr
-               = (struct ip_nat_multi_range *)target->data;
-       struct ip_nat_range *r = &mr->range[0];
+       struct nf_nat_multi_range *mr
+               = (struct nf_nat_multi_range *)target->data;
+       struct nf_nat_range *r = &mr->range[0];
 
        if (r->flags & IP_NAT_RANGE_PROTO_SPECIFIED) {
                printf("redir ports ");
@@ -140,9 +140,9 @@ static void REDIRECT_print(const void *ip, const struct xt_entry_target *target,
 
 static void REDIRECT_save(const void *ip, const struct xt_entry_target *target)
 {
-       struct ip_nat_multi_range *mr
-               = (struct ip_nat_multi_range *)target->data;
-       struct ip_nat_range *r = &mr->range[0];
+       struct nf_nat_multi_range *mr
+               = (struct nf_nat_multi_range *)target->data;
+       struct nf_nat_range *r = &mr->range[0];
 
        if (r->flags & IP_NAT_RANGE_PROTO_SPECIFIED) {
                printf("--to-ports ");
@@ -159,8 +159,8 @@ static struct xtables_target redirect_tg_reg = {
        .name           = "REDIRECT",
        .version        = XTABLES_VERSION,
        .family         = NFPROTO_IPV4,
-       .size           = XT_ALIGN(sizeof(struct ip_nat_multi_range)),
-       .userspacesize  = XT_ALIGN(sizeof(struct ip_nat_multi_range)),
+       .size           = XT_ALIGN(sizeof(struct nf_nat_multi_range)),
+       .userspacesize  = XT_ALIGN(sizeof(struct nf_nat_multi_range)),
        .help           = REDIRECT_help,
        .init           = REDIRECT_init,
        .parse          = REDIRECT_parse,
index dabdb3f6172d441da3a28f2c64e08fcdc856a838..a07d9f48a3d94d8033acdb9195e41b258ef94ea4 100644 (file)
@@ -5,7 +5,7 @@
 #include <stdlib.h>
 #include <getopt.h>
 #include <xtables.h>
-#include <linux/netfilter/nf_nat.h>
+#include <net/netfilter/nf_nat.h>
 /* For 64bit kernel / 32bit userspace */
 #include <linux/netfilter_ipv4/ipt_SAME.h>
 
@@ -44,7 +44,7 @@ static void SAME_init(struct xt_entry_target *t)
 
 /* Parses range of IPs */
 static void
-parse_to(char *arg, struct ip_nat_range *range)
+parse_to(char *arg, struct nf_nat_range *range)
 {
        char *dash;
        const struct in_addr *ip;
@@ -145,7 +145,7 @@ static void SAME_print(const void *ip, const struct xt_entry_target *target,
        printf("same:");
        
        for (count = 0; count < mr->rangesize; count++) {
-               struct ip_nat_range *r = &mr->range[count];
+               struct nf_nat_range *r = &mr->range[count];
                struct in_addr a;
 
                a.s_addr = r->min_ip;
@@ -176,7 +176,7 @@ static void SAME_save(const void *ip, const struct xt_entry_target *target)
        int random_selection = 0;
 
        for (count = 0; count < mr->rangesize; count++) {
-               struct ip_nat_range *r = &mr->range[count];
+               struct nf_nat_range *r = &mr->range[count];
                struct in_addr a;
 
                a.s_addr = r->min_ip;
index fda03ea49bfc2b709986fcdfb510758c686ad297..cda7d15eb9cd3ff8a6db83e22ad0d2f4ca50f774 100644 (file)
@@ -7,7 +7,7 @@
 #include <xtables.h>
 #include <iptables.h>
 #include <linux/netfilter_ipv4/ip_tables.h>
-#include <linux/netfilter/nf_nat.h>
+#include <net/netfilter/nf_nat.h>
 
 #define IPT_SNAT_OPT_SOURCE 0x01
 #define IPT_SNAT_OPT_RANDOM 0x02
@@ -17,7 +17,7 @@
 struct ipt_natinfo
 {
        struct xt_entry_target t;
-       struct ip_nat_multi_range mr;
+       struct nf_nat_multi_range mr;
 };
 
 static void SNAT_help(void)
@@ -36,7 +36,7 @@ static const struct option SNAT_opts[] = {
 };
 
 static struct ipt_natinfo *
-append_range(struct ipt_natinfo *info, const struct ip_nat_range *range)
+append_range(struct ipt_natinfo *info, const struct nf_nat_range *range)
 {
        unsigned int size;
 
@@ -58,7 +58,7 @@ append_range(struct ipt_natinfo *info, const struct ip_nat_range *range)
 static struct xt_entry_target *
 parse_to(char *arg, int portok, struct ipt_natinfo *info)
 {
-       struct ip_nat_range range;
+       struct nf_nat_range range;
        char *colon, *dash, *error;
        const struct in_addr *ip;
 
@@ -190,7 +190,7 @@ static void SNAT_check(unsigned int flags)
                           "You must specify --to-source");
 }
 
-static void print_range(const struct ip_nat_range *r)
+static void print_range(const struct nf_nat_range *r)
 {
        if (r->flags & IP_NAT_RANGE_MAP_IPS) {
                struct in_addr a;
@@ -243,8 +243,8 @@ static struct xtables_target snat_tg_reg = {
        .name           = "SNAT",
        .version        = XTABLES_VERSION,
        .family         = NFPROTO_IPV4,
-       .size           = XT_ALIGN(sizeof(struct ip_nat_multi_range)),
-       .userspacesize  = XT_ALIGN(sizeof(struct ip_nat_multi_range)),
+       .size           = XT_ALIGN(sizeof(struct nf_nat_multi_range)),
+       .userspacesize  = XT_ALIGN(sizeof(struct nf_nat_multi_range)),
        .help           = SNAT_help,
        .parse          = SNAT_parse,
        .final_check    = SNAT_check,
index b887a990ad901a146d2db3daab59e32bb57e4087..d766ef18a11586cfe9bfaae6733f99b17bb6bcef 100644 (file)
@@ -122,7 +122,7 @@ enum ip_conntrack_events
        IPCT_NATINFO_BIT = 10,
        IPCT_NATINFO = (1 << IPCT_NATINFO_BIT),
 
-       /* Counter highest bit has been set */
+       /* Counter highest bit has been set, unused */
        IPCT_COUNTER_FILLING_BIT = 11,
        IPCT_COUNTER_FILLING = (1 << IPCT_COUNTER_FILLING_BIT),
 
index 4b36aeb46a102a14f7b261cbbd00819243e920da..cdcd0ed58f7aced31dd8f909452a9d7e2dcb1bd8 100644 (file)
@@ -2,7 +2,7 @@
 #define _XT_NFLOG_TARGET
 
 #define XT_NFLOG_DEFAULT_GROUP         0x1
-#define XT_NFLOG_DEFAULT_THRESHOLD     0
+#define XT_NFLOG_DEFAULT_THRESHOLD     1
 
 #define XT_NFLOG_MASK                  0x0
 
index 90ae8b474cb87cb9743069acf647b6fc81576662..9ba54e48acd2288b856714194ff2508cf9e3a615 100644 (file)
@@ -5,12 +5,15 @@ struct xt_connlimit_data;
 
 struct xt_connlimit_info {
        union {
-               u_int32_t v4_mask;
-               u_int32_t v6_mask[4];
+               union nf_inet_addr mask;
+               union {
+                       __be32 v4_mask;
+                       __be32 v6_mask[4];
+               };
        };
        unsigned int limit, inverse;
 
-       /* this needs to be at the end */
+       /* Used internally by the kernel */
        struct xt_connlimit_data *data __attribute__((aligned(8)));
 };
 
index f3fd83e46babdf422bf6952f0c21214fdac57d98..8f5345275393b61d652a0cd934f656770f0557a7 100644 (file)
@@ -5,6 +5,7 @@
 #ifndef _XT_CONNTRACK_H
 #define _XT_CONNTRACK_H
 
+#include <linux/types.h>
 #include <linux/netfilter/nf_conntrack_tuple_common.h>
 
 #define XT_CONNTRACK_STATE_BIT(ctinfo) (1 << ((ctinfo)%IP_CT_IS_REPLY+1))
index acd7fd77bbeeacec8eb60cc28c797b03d0394c06..4c8368d781e5d2f570ac19a74e8c68f633f768eb 100644 (file)
@@ -9,6 +9,8 @@ enum xt_quota_flags {
 struct xt_quota_info {
        u_int32_t               flags;
        u_int32_t               pad;
+
+       /* Used internally by the kernel */
        aligned_u64             quota;
        struct xt_quota_info    *master;
 };
index 62ffdcb0fffce0537319f61fec7964e9e48ec2ea..d41af8495d8270af8e7b4bbffa364c23e85f1b4e 100644 (file)
@@ -7,10 +7,6 @@
 
 #define XT_SCTP_VALID_FLAGS            0x07
 
-/* temporary */
-#define SCTP_ARRAY_SIZE(x) (sizeof(x) / sizeof(*(x)))
-
-
 struct xt_sctp_flag_info {
        u_int8_t chunktype;
        u_int8_t flag;
@@ -67,8 +63,8 @@ struct xt_sctp_info {
        memcpy((destmap), (srcmap), sizeof(srcmap))
 
 #define SCTP_CHUNKMAP_IS_CLEAR(chunkmap) \
-       __sctp_chunkmap_is_clear((chunkmap), SCTP_ARRAY_SIZE(chunkmap))
-static inline bool
+       __sctp_chunkmap_is_clear((chunkmap), ARRAY_SIZE(chunkmap))
+static __inline__ bool
 __sctp_chunkmap_is_clear(const u_int32_t *chunkmap, unsigned int n)
 {
        unsigned int i;
@@ -80,7 +76,7 @@ __sctp_chunkmap_is_clear(const u_int32_t *chunkmap, unsigned int n)
 
 #define SCTP_CHUNKMAP_IS_ALL_SET(chunkmap) \
        __sctp_chunkmap_is_all_set((chunkmap), ARRAY_SIZE(chunkmap))
-static inline bool
+static __inline__ bool
 __sctp_chunkmap_is_all_set(const u_int32_t *chunkmap, unsigned int n)
 {
        unsigned int i;
index f1c182fd149f01b9295fca785f2b442ff0277f8f..8a6ba7bbef9f18ff1c496f40b85a0cfff0ed0a16 100644 (file)
@@ -6,7 +6,7 @@
 
 enum {
        XT_STRING_FLAG_INVERT           = 0x01,
-       XT_STRING_FLAG_IGNORECASE       = 0x02
+       XT_STRING_FLAG_IGNORECASE       = 0x02
 };
 
 struct xt_string_info
@@ -18,11 +18,11 @@ struct xt_string_info
        u_int8_t  patlen;
        union {
                struct {
-                       u_int8_t invert;
+                       u_int8_t  invert;
                } v0;
 
                struct {
-                       u_int8_t flags;
+                       u_int8_t  flags;
                } v1;
        } u;
 
index fc64b97acb2c0f244d382c0960200a120563b577..a9f21c9b3097317ef08d6b8b4d51568c362a6af6 100644 (file)
@@ -15,6 +15,8 @@
 #ifndef _IPTABLES_H
 #define _IPTABLES_H
 
+#include <linux/types.h>
+
 #include <linux/netfilter_ipv4.h>
 
 #include <linux/netfilter/x_tables.h>
index cc4c0b2269afef65b364c077f88fb4842e4c76dd..be6e682a85eca2e7eaa4c68bb86c22ac6610b2d0 100644 (file)
@@ -13,7 +13,7 @@ struct ipt_same_info
        u_int32_t *iparray;
 
        /* hangs off end. */
-       struct ip_nat_range range[IPT_SAME_MAX_RANGE];
+       struct nf_nat_range range[IPT_SAME_MAX_RANGE];
 };
 
 #endif /*_IPT_SAME_H*/
index 68b22fc34fcf359fb5c369e5589388fcd2fd99ba..70ed8a16445b26b3773547b930f7320e6c488965 100644 (file)
@@ -15,6 +15,8 @@
 #ifndef _IP6_TABLES_H
 #define _IP6_TABLES_H
 
+#include <linux/types.h>
+
 #include <linux/netfilter_ipv6.h>
 
 #include <linux/netfilter/x_tables.h>
diff --git a/include/linux/netfilter_ipv6/ip6t_TCPMSS.h b/include/linux/netfilter_ipv6/ip6t_TCPMSS.h
deleted file mode 100644 (file)
index 412d1cb..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef _IP6T_TCPMSS_H
-#define _IP6T_TCPMSS_H
-
-struct ip6t_tcpmss_info {
-       u_int16_t mss;
-};
-
-#define IP6T_TCPMSS_CLAMP_PMTU 0xffff
-
-#endif /*_IP6T_TCPMSS_H*/
index d9e8c4f2ad8fd80b4ac2e77548b621b87cc87ced..eb6a9bec80927e2bb87c1e526d0976c9a2c52e35 100644 (file)
@@ -108,19 +108,14 @@ typedef           __s64           int64_t;
  *
  * Linux always considers sectors to be 512 bytes long independently
  * of the devices real block size.
+ *
+ * blkcnt_t is the type of the inode's block count.
  */
 #ifdef CONFIG_LBD
 typedef u64 sector_t;
-#else
-typedef unsigned long sector_t;
-#endif
-
-/*
- * The type of the inode's block count.
- */
-#ifdef CONFIG_LSF
 typedef u64 blkcnt_t;
 #else
+typedef unsigned long sector_t;
 typedef unsigned long blkcnt_t;
 #endif
 
@@ -154,19 +149,11 @@ typedef __u16 __bitwise __le16;
 typedef __u16 __bitwise __be16;
 typedef __u32 __bitwise __le32;
 typedef __u32 __bitwise __be32;
-#if defined(__GNUC__)
 typedef __u64 __bitwise __le64;
 typedef __u64 __bitwise __be64;
-#endif
+
 typedef __u16 __bitwise __sum16;
 typedef __u32 __bitwise __wsum;
 
 
-struct ustat {
-       __kernel_daddr_t        f_tfree;
-       __kernel_ino_t          f_tinode;
-       char                    f_fname[6];
-       char                    f_fpack[6];
-};
-
 #endif /* _LINUX_TYPES_H */
similarity index 77%
rename from include/linux/netfilter/nf_conntrack_tuple.h
rename to include/net/netfilter/nf_conntrack_tuple.h
index cd5044e2bf9d61c642106cdfaa98d6338c9a94b2..c40e0b400081a628702f38efe5fa4219fcb56d64 100644 (file)
@@ -1,3 +1,7 @@
+/* This file was manually copied from the Linux kernel source
+ * and manually stripped from __KERNEL__ sections and unused functions.
+ */
+
 /*
  * Definitions and Declarations for tuple.
  *
@@ -10,6 +14,7 @@
 #ifndef _NF_CONNTRACK_TUPLE_H
 #define _NF_CONNTRACK_TUPLE_H
 
+#include <linux/netfilter/x_tables.h>
 #include <linux/netfilter/nf_conntrack_tuple_common.h>
 
 /* A `tuple' is a structure containing the information to uniquely
   "non-manipulatable" lines, for the benefit of the NAT code.
 */
 
-#define NF_CT_TUPLE_L3SIZE     4
-
-/* The l3 protocol-specific manipulable parts of the tuple: always in
-   network order! */
-union nf_conntrack_address {
-       u_int32_t all[NF_CT_TUPLE_L3SIZE];
-       __be32 ip;
-       __be32 ip6[4];
-};
+#define NF_CT_TUPLE_L3SIZE     ARRAY_SIZE(((union nf_inet_addr *)NULL)->all)
 
 /* The protocol-specific manipulable parts of the tuple: always in
    network order! */
 union nf_conntrack_man_proto
 {
        /* Add other protocols here. */
-       u_int16_t all;
+       __be16 all;
 
        struct {
                __be16 port;
@@ -46,6 +43,9 @@ union nf_conntrack_man_proto
        struct {
                __be16 id;
        } icmp;
+       struct {
+               __be16 port;
+       } dccp;
        struct {
                __be16 port;
        } sctp;
@@ -57,7 +57,7 @@ union nf_conntrack_man_proto
 /* The manipulable part of the tuple. */
 struct nf_conntrack_man
 {
-       union nf_conntrack_address u3;
+       union nf_inet_addr u3;
        union nf_conntrack_man_proto u;
        /* Layer 3 protocol */
        u_int16_t l3num;
@@ -70,10 +70,10 @@ struct nf_conntrack_tuple
 
        /* These are the parts of the tuple which are fixed. */
        struct {
-               union nf_conntrack_address u3;
+               union nf_inet_addr u3;
                union {
                        /* Add other protocols here. */
-                       u_int16_t all;
+                       __be16 all;
 
                        struct {
                                __be16 port;
@@ -84,6 +84,9 @@ struct nf_conntrack_tuple
                        struct {
                                u_int8_t type, code;
                        } icmp;
+                       struct {
+                               __be16 port;
+                       } dccp;
                        struct {
                                __be16 port;
                        } sctp;
@@ -100,4 +103,12 @@ struct nf_conntrack_tuple
        } dst;
 };
 
+struct nf_conntrack_tuple_mask
+{
+       struct {
+               union nf_inet_addr u3;
+               union nf_conntrack_man_proto u;
+       } src;
+};
+
 #endif /* _NF_CONNTRACK_TUPLE_H */
similarity index 62%
rename from include/linux/netfilter/nf_nat.h
rename to include/net/netfilter/nf_nat.h
index 5d3b5e0de545fb28d3a4cc1cc55d393ecfcbea17..094473e4bf148f4ae7bb96dd9b3298561b41abb2 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef _NF_NAT_H
 #define _NF_NAT_H
 #include <linux/netfilter_ipv4.h>
-#include <linux/netfilter/nf_conntrack_tuple.h>
+#include <net/netfilter/nf_conntrack_tuple.h>
 
 #define NF_NAT_MAPPING_TYPE_MAX_NAMELEN 16
 
@@ -12,12 +12,22 @@ enum nf_nat_manip_type
 };
 
 /* SRC manip occurs POST_ROUTING or LOCAL_IN */
-#define HOOK2MANIP(hooknum) ((hooknum) != NF_IP_POST_ROUTING && (hooknum) != NF_IP_LOCAL_IN)
+#define HOOK2MANIP(hooknum) ((hooknum) != NF_INET_POST_ROUTING && \
+                            (hooknum) != NF_INET_LOCAL_IN)
 
 #define IP_NAT_RANGE_MAP_IPS 1
 #define IP_NAT_RANGE_PROTO_SPECIFIED 2
 #define IP_NAT_RANGE_PROTO_RANDOM 4
 
+/* NAT sequence number modifications */
+struct nf_nat_seq {
+       /* position of the last TCP sequence number modification (if any) */
+       u_int32_t correction_pos;
+
+       /* sequence number offset before and after last modification */
+       int16_t offset_before, offset_after;
+};
+
 /* Single range specification. */
 struct nf_nat_range
 {
@@ -40,6 +50,5 @@ struct nf_nat_multi_range_compat
        struct nf_nat_range range[1];
 };
 
-#define ip_nat_range nf_nat_range
-#define ip_nat_multi_range nf_nat_multi_range_compat
+#define nf_nat_multi_range nf_nat_multi_range_compat
 #endif