]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
Remove old functions, constants
authorJan Engelhardt <jengelh@medozas.de>
Tue, 15 Apr 2008 09:48:25 +0000 (11:48 +0200)
committerPatrick McHardy <kaber@trash.net>
Tue, 15 Apr 2008 12:01:06 +0000 (14:01 +0200)
97 files changed:
configure.ac
extensions/libip6t_HL.c
extensions/libip6t_LOG.c
extensions/libip6t_REJECT.c
extensions/libip6t_ah.c
extensions/libip6t_dst.c
extensions/libip6t_eui64.c
extensions/libip6t_frag.c
extensions/libip6t_hbh.c
extensions/libip6t_hl.c
extensions/libip6t_icmp6.c
extensions/libip6t_ipv6header.c
extensions/libip6t_mh.c
extensions/libip6t_policy.c
extensions/libip6t_rt.c
extensions/libipt_CLUSTERIP.c
extensions/libipt_DNAT.c
extensions/libipt_ECN.c
extensions/libipt_LOG.c
extensions/libipt_MASQUERADE.c
extensions/libipt_MIRROR.c
extensions/libipt_NETMAP.c
extensions/libipt_REDIRECT.c
extensions/libipt_REJECT.c
extensions/libipt_SAME.c
extensions/libipt_SET.c
extensions/libipt_SNAT.c
extensions/libipt_TTL.c
extensions/libipt_ULOG.c
extensions/libipt_addrtype.c
extensions/libipt_ah.c
extensions/libipt_ecn.c
extensions/libipt_icmp.c
extensions/libipt_policy.c
extensions/libipt_realm.c
extensions/libipt_recent.c
extensions/libipt_set.c
extensions/libipt_ttl.c
extensions/libipt_unclean.c
extensions/libxt_CLASSIFY.c
extensions/libxt_CONNMARK.c
extensions/libxt_CONNSECMARK.c
extensions/libxt_DSCP.c
extensions/libxt_MARK.c
extensions/libxt_NFLOG.c
extensions/libxt_NFQUEUE.c
extensions/libxt_NOTRACK.c
extensions/libxt_RATEEST.c
extensions/libxt_SECMARK.c
extensions/libxt_TCPMSS.c
extensions/libxt_TCPOPTSTRIP.c
extensions/libxt_TOS.c
extensions/libxt_TRACE.c
extensions/libxt_comment.c
extensions/libxt_connbytes.c
extensions/libxt_connlimit.c
extensions/libxt_connmark.c
extensions/libxt_conntrack.c
extensions/libxt_dccp.c
extensions/libxt_dscp.c
extensions/libxt_esp.c
extensions/libxt_hashlimit.c
extensions/libxt_helper.c
extensions/libxt_iprange.c
extensions/libxt_length.c
extensions/libxt_limit.c
extensions/libxt_mac.c
extensions/libxt_mark.c
extensions/libxt_multiport.c
extensions/libxt_owner.c
extensions/libxt_physdev.c
extensions/libxt_pkttype.c
extensions/libxt_quota.c
extensions/libxt_rateest.c
extensions/libxt_sctp.c
extensions/libxt_standard.c
extensions/libxt_state.c
extensions/libxt_statistic.c
extensions/libxt_string.c
extensions/libxt_tcp.c
extensions/libxt_tcpmss.c
extensions/libxt_time.c
extensions/libxt_tos.c
extensions/libxt_u32.c
extensions/libxt_udp.c
include/ip6tables.h
include/iptables.h
ip6tables-restore.c
ip6tables-save.c
ip6tables-standalone.c
ip6tables.c
iptables-restore.c
iptables-save.c
iptables-standalone.c
iptables-xml.c
iptables.c
libiptc/libiptc.c

index b6afa349aba877e21e32dd40f771b961f052a271..6a1cae04aa026321e8c9d7b9463b2ba35ea96bae 100644 (file)
@@ -41,7 +41,7 @@ AM_CONDITIONAL([ENABLE_LIBIPQ], [test "$enable_libipq" == "yes"])
 regular_CFLAGS="-D_LARGEFILE_SOURCE=1 -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 \
        -D_REENTRANT -Wall -Waggregate-return -Wmissing-declarations \
        -Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes \
-       -Winline -pipe -DIPTABLES_VERSION=\\\"$PACKAGE_VERSION\\\" \
+       -Winline -pipe \
        -DXTABLES_LIBDIR=\\\"\${xtlibdir}\\\" -DXTABLES_INTERNAL";
 kinclude_CFLAGS="";
 if [[ -n "$kbuilddir" ]]; then
index c20147bdde16009690444f595a78278b79e8dd51..e726a945205480137cc20c82bcf06b6c70c3af01 100644 (file)
 static void HL_help(void)
 {
        printf(
-"HL target v%s options\n"
+"HL target options\n"
 "  --hl-set value              Set HL to <value 0-255>\n"
 "  --hl-dec value              Decrement HL by <value 1-255>\n"
-"  --hl-inc value              Increment HL by <value 1-255>\n"
-, IPTABLES_VERSION);
+"  --hl-inc value              Increment HL by <value 1-255>\n");
 }
 
 static int HL_parse(int c, char **argv, int invert, unsigned int *flags,
@@ -139,11 +138,12 @@ static const struct option HL_opts[] = {
        { .name = NULL }
 };
 
-static struct ip6tables_target hl_target6 = {
+static struct xtables_target hl_tg6_reg = {
        .name           = "HL",
-       .version        = IPTABLES_VERSION,
-       .size           = IP6T_ALIGN(sizeof(struct ip6t_HL_info)),
-       .userspacesize  = IP6T_ALIGN(sizeof(struct ip6t_HL_info)),
+       .version        = XTABLES_VERSION,
+       .family         = PF_INET6,
+       .size           = XT_ALIGN(sizeof(struct ip6t_HL_info)),
+       .userspacesize  = XT_ALIGN(sizeof(struct ip6t_HL_info)),
        .help           = HL_help,
        .parse          = HL_parse,
        .final_check    = HL_check,
@@ -154,5 +154,5 @@ static struct ip6tables_target hl_target6 = {
 
 void _init(void)
 {
-       register_target6(&hl_target6);
+       xtables_register_target(&hl_tg6_reg);
 }
index 6fd4c0b2c2b67f8a22793b833acfad50db9b1b3b..53efae33f9adc8da6c858b0a44d16a586a079cf8 100644 (file)
 static void LOG_help(void)
 {
        printf(
-"LOG v%s options:\n"
+"LOG target options:\n"
 " --log-level level            Level of logging (numeric or see syslog.conf)\n"
-" --log-prefix prefix          Prefix log messages with this prefix.\n\n"
-" --log-tcp-sequence           Log TCP sequence numbers.\n\n"
-" --log-tcp-options            Log TCP options.\n\n"
-" --log-ip-options             Log IP options.\n\n"
-" --log-uid                    Log UID owning the local socket.\n\n",
-IPTABLES_VERSION);
+" --log-prefix prefix          Prefix log messages with this prefix.\n"
+" --log-tcp-sequence           Log TCP sequence numbers.\n"
+" --log-tcp-options            Log TCP options.\n"
+" --log-ip-options             Log IP options.\n"
+" --log-uid                    Log UID owning the local socket.\n");
 }
 
 static const struct option LOG_opts[] = {
@@ -256,11 +255,12 @@ static void LOG_save(const void *ip, const struct xt_entry_target *target)
                printf("--log-uid ");
 }
 
-static struct ip6tables_target log_target6 = {
+static struct xtables_target log_tg6_reg = {
     .name          = "LOG",
-    .version       = IPTABLES_VERSION,
-    .size          = IP6T_ALIGN(sizeof(struct ip6t_log_info)),
-    .userspacesize = IP6T_ALIGN(sizeof(struct ip6t_log_info)),
+    .version       = XTABLES_VERSION,
+    .family        = PF_INET6,
+    .size          = XT_ALIGN(sizeof(struct ip6t_log_info)),
+    .userspacesize = XT_ALIGN(sizeof(struct ip6t_log_info)),
     .help          = LOG_help,
     .init          = LOG_init,
     .parse         = LOG_parse,
@@ -271,5 +271,5 @@ static struct ip6tables_target log_target6 = {
 
 void _init(void)
 {
-       register_target6(&log_target6);
+       xtables_register_target(&log_tg6_reg);
 }
index 000096ec4a0b5a6654c18ab91af72c304aef4e21..d4245e53f16b5d0e7ec3936d841dba076554d2be 100644 (file)
@@ -57,7 +57,7 @@ print_reject_types(void)
 static void REJECT_help(void)
 {
        printf(
-"REJECT options:\n"
+"REJECT target options:\n"
 "--reject-with type              drop input packet and send back\n"
 "                                a reply packet according to type:\n");
 
@@ -138,11 +138,12 @@ static void REJECT_save(const void *ip, const struct xt_entry_target *target)
        printf("--reject-with %s ", reject_table[i].name);
 }
 
-static struct ip6tables_target reject_target6 = {
+static struct xtables_target reject_tg6_reg = {
        .name = "REJECT",
-       .version        = IPTABLES_VERSION,
-       .size           = IP6T_ALIGN(sizeof(struct ip6t_reject_info)),
-       .userspacesize  = IP6T_ALIGN(sizeof(struct ip6t_reject_info)),
+       .version        = XTABLES_VERSION,
+       .family         = PF_INET6,
+       .size           = XT_ALIGN(sizeof(struct ip6t_reject_info)),
+       .userspacesize  = XT_ALIGN(sizeof(struct ip6t_reject_info)),
        .help           = REJECT_help,
        .init           = REJECT_init,
        .parse          = REJECT_parse,
@@ -153,5 +154,5 @@ static struct ip6tables_target reject_target6 = {
 
 void _init(void)
 {
-       register_target6(&reject_target6);
+       xtables_register_target(&reject_tg6_reg);
 }
index 46469eafd83676db2b2e7922fb0d2141d846c88e..ce2d7fc11a91e8d83a1c10fd4cf0bf402a747875 100644 (file)
 static void ah_help(void)
 {
        printf(
-"AH v%s options:\n"
+"ah match options:\n"
 " --ahspi [!] spi[:spi]         match spi (range)\n"
 " --ahlen [!] length            total length of this header\n"
-" --ahres                       check the reserved filed, too\n",
-IPTABLES_VERSION);
+" --ahres                       check the reserved filed, too\n");
 }
 
 static const struct option ah_opts[] = {
@@ -193,11 +192,12 @@ static void ah_save(const void *ip, const struct xt_entry_match *match)
                printf("--ahres ");
 }
 
-static struct ip6tables_match ah_match6 = {
+static struct xtables_match ah_mt6_reg = {
        .name          = "ah",
-       .version       = IPTABLES_VERSION,
-       .size          = IP6T_ALIGN(sizeof(struct ip6t_ah)),
-       .userspacesize = IP6T_ALIGN(sizeof(struct ip6t_ah)),
+       .version       = XTABLES_VERSION,
+       .family        = PF_INET6,
+       .size          = XT_ALIGN(sizeof(struct ip6t_ah)),
+       .userspacesize = XT_ALIGN(sizeof(struct ip6t_ah)),
        .help          = ah_help,
        .init          = ah_init,
        .parse         = ah_parse,
@@ -209,5 +209,5 @@ static struct ip6tables_match ah_match6 = {
 void
 _init(void)
 {
-       register_match6(&ah_match6);
+       xtables_register_match(&ah_mt6_reg);
 }
index 5b060334409661d32cbec002697ec9f42ca7e110..d3c54dd5c2635e0bf36b98cd30b27e9534b311e8 100644 (file)
 static void dst_help(void)
 {
        printf(
-"dst v%s options:\n"
+"dst match options:\n"
 "  --dst-len [!] length          total length of this header\n"
 "  --dst-opts TYPE[:LEN][,TYPE[:LEN]...]\n"
 "                                Options and its length (list, max: %d)\n",
-IPTABLES_VERSION, IP6T_OPTS_OPTSNR);
+IP6T_OPTS_OPTSNR);
 }
 
 static const struct option dst_opts[] = {
@@ -227,11 +227,12 @@ static void dst_save(const void *ip, const struct xt_entry_match *match)
                printf("--dst-not-strict ");
 }
 
-static struct ip6tables_match dst_match6 = {
+static struct xtables_match dst_mt6_reg = {
        .name          = "dst",
-       .version       = IPTABLES_VERSION,
-       .size          = IP6T_ALIGN(sizeof(struct ip6t_opts)),
-       .userspacesize = IP6T_ALIGN(sizeof(struct ip6t_opts)),
+       .version       = XTABLES_VERSION,
+       .family        = PF_INET6,
+       .size          = XT_ALIGN(sizeof(struct ip6t_opts)),
+       .userspacesize = XT_ALIGN(sizeof(struct ip6t_opts)),
        .help          = dst_help,
        .init          = dst_init,
        .parse         = dst_parse,
@@ -243,5 +244,5 @@ static struct ip6tables_match dst_match6 = {
 void
 _init(void)
 {
-       register_match6(&dst_match6);
+       xtables_register_match(&dst_mt6_reg);
 }
index 45988c4614382d7b590757d161dd6705fceb2874..b93d12156227b13ba4a2fda27f1364a52f5467ae 100644 (file)
 static void eui64_help(void)
 {
        printf(
-"eui64 v%s options:\n"
+"eui64 match options:\n"
 " This module hasn't got any option\n"
-" This module checks for EUI64 IPv6 addresses\n"
-"\n", IPTABLES_VERSION);
+" This module checks for EUI64 IPv6 addresses\n");
 }
 
 /* Function which parses command options; returns true if it
@@ -29,16 +28,17 @@ static int eui64_parse(int c, char **argv, int invert, unsigned int *flags,
        return 0;
 }
 
-static struct ip6tables_match eui64_target6 = {
+static struct xtables_match eui64_mt6_reg = {
        .name           = "eui64",
-       .version        = IPTABLES_VERSION,
-       .size           = IP6T_ALIGN(sizeof(int)),
-       .userspacesize  = IP6T_ALIGN(sizeof(int)),
+       .version        = XTABLES_VERSION,
+       .family         = PF_INET6,
+       .size           = XT_ALIGN(sizeof(int)),
+       .userspacesize  = XT_ALIGN(sizeof(int)),
        .help           = eui64_help,
        .parse          = eui64_parse,
 };
 
 void _init(void)
 {
-       register_match6(&eui64_target6);
+       xtables_register_match(&eui64_mt6_reg);
 }
index 86f40f4208b352f09ab728e01edf946b26335367..64e110d3da0c18c2550d019c5bc340ead2202a2d 100644 (file)
 static void frag_help(void)
 {
        printf(
-"FRAG v%s options:\n"
+"frag match options:\n"
 " --fragid [!] id[:id]          match the id (range)\n"
 " --fraglen [!] length          total length of this header\n"
 " --fragres                     check the reserved filed, too\n"
 " --fragfirst                   matches on the first fragment\n"
 " [--fragmore|--fraglast]       there are more fragments or this\n"
-"                               is the last one\n",
-IPTABLES_VERSION);
+"                               is the last one\n");
 }
 
 static const struct option frag_opts[] = {
@@ -238,11 +237,12 @@ static void frag_save(const void *ip, const struct xt_entry_match *match)
                printf("--fraglast ");
 }
 
-static struct ip6tables_match frag_match6 = {
+static struct xtables_match frag_mt6_reg = {
        .name          = "frag",
-       .version       = IPTABLES_VERSION,
-       .size          = IP6T_ALIGN(sizeof(struct ip6t_frag)),
-       .userspacesize = IP6T_ALIGN(sizeof(struct ip6t_frag)),
+       .version       = XTABLES_VERSION,
+       .family        = PF_INET6,
+       .size          = XT_ALIGN(sizeof(struct ip6t_frag)),
+       .userspacesize = XT_ALIGN(sizeof(struct ip6t_frag)),
        .help          = frag_help,
        .init          = frag_init,
        .parse         = frag_parse,
@@ -254,5 +254,5 @@ static struct ip6tables_match frag_match6 = {
 void
 _init(void)
 {
-       register_match6(&frag_match6);
+       xtables_register_match(&frag_mt6_reg);
 }
index ad12547ae09062da92cad57149302c453a7399b6..e12fe4ed6a579f95378103d93fc8b88cd665f462 100644 (file)
 static void hbh_help(void)
 {
        printf(
-"hbh v%s options:\n"
+"hbh match options:\n"
 "  --hbh-len [!] length          total length of this header\n"
 "  --hbh-opts TYPE[:LEN][,TYPE[:LEN]...] \n"
 "                                Options and its length (list, max: %d)\n",
-IPTABLES_VERSION, IP6T_OPTS_OPTSNR);
+IP6T_OPTS_OPTSNR);
 }
 
 static const struct option hbh_opts[] = {
@@ -214,11 +214,12 @@ static void hbh_save(const void *ip, const struct xt_entry_match *match)
                printf("--hbh-not-strict ");
 }
 
-static struct ip6tables_match hbh_match6 = {
+static struct xtables_match hbh_mt6_reg = {
        .name           = "hbh",
-       .version        = IPTABLES_VERSION,
-       .size           = IP6T_ALIGN(sizeof(struct ip6t_opts)),
-       .userspacesize  = IP6T_ALIGN(sizeof(struct ip6t_opts)),
+       .version        = XTABLES_VERSION,
+       .family         = PF_INET6,
+       .size           = XT_ALIGN(sizeof(struct ip6t_opts)),
+       .userspacesize  = XT_ALIGN(sizeof(struct ip6t_opts)),
        .help           = hbh_help,
        .init           = hbh_init,
        .parse          = hbh_parse,
@@ -230,5 +231,5 @@ static struct ip6tables_match hbh_match6 = {
 void
 _init(void)
 {
-       register_match6(&hbh_match6);
+       xtables_register_match(&hbh_mt6_reg);
 }
index 7f995988cdb64ee1459178b092c39999d6d098af..2af9a20694e8f66c692973cf8421035feaa740eb 100644 (file)
 static void hl_help(void)
 {
        printf(
-"HL match v%s options:\n"
+"hl match options:\n"
 "  --hl-eq [!] value   Match hop limit value\n"
 "  --hl-lt value       Match HL < value\n"
-"  --hl-gt value       Match HL > value\n"
-, IPTABLES_VERSION);
+"  --hl-gt value       Match HL > value\n");
 }
 
 static int hl_parse(int c, char **argv, int invert, unsigned int *flags,
@@ -125,11 +124,12 @@ static const struct option hl_opts[] = {
        { .name = NULL }
 };
 
-static struct ip6tables_match hl_match6 = {
+static struct xtables_match hl_mt6_reg = {
        .name          = "hl",
-       .version       = IPTABLES_VERSION,
-       .size          = IP6T_ALIGN(sizeof(struct ip6t_hl_info)),
-       .userspacesize = IP6T_ALIGN(sizeof(struct ip6t_hl_info)),
+       .version       = XTABLES_VERSION,
+       .family        = PF_INET6,
+       .size          = XT_ALIGN(sizeof(struct ip6t_hl_info)),
+       .userspacesize = XT_ALIGN(sizeof(struct ip6t_hl_info)),
        .help          = hl_help,
        .parse         = hl_parse,
        .final_check   = hl_check,
@@ -141,5 +141,5 @@ static struct ip6tables_match hl_match6 = {
 
 void _init(void) 
 {
-       register_match6(&hl_match6);
+       xtables_register_match(&hl_mt6_reg);
 }
index 8c9653f7d6a73fb112a2d3c307deb655c0c5d4de..caecc4f2185c607afb769cbc13f4ff4bde5bfae0 100644 (file)
@@ -77,10 +77,9 @@ print_icmpv6types(void)
 static void icmp6_help(void)
 {
        printf(
-"ICMPv6 v%s options:\n"
+"icmpv6 match options:\n"
 " --icmpv6-type [!] typename   match icmpv6 type\n"
-"                              (or numeric type or type/code)\n"
-"\n", IPTABLES_VERSION);
+"                              (or numeric type or type/code)\n");
        print_icmpv6types();
 }
 
@@ -251,11 +250,12 @@ static void icmp6_check(unsigned int flags)
                           "icmpv6 match: You must specify `--icmpv6-type'");
 }
 
-static struct ip6tables_match icmp6_match6 = {
+static struct xtables_match icmp6_mt6_reg = {
        .name           = "icmp6",
-       .version        = IPTABLES_VERSION,
-       .size           = IP6T_ALIGN(sizeof(struct ip6t_icmp)),
-       .userspacesize  = IP6T_ALIGN(sizeof(struct ip6t_icmp)),
+       .version        = XTABLES_VERSION,
+       .family         = PF_INET6,
+       .size           = XT_ALIGN(sizeof(struct ip6t_icmp)),
+       .userspacesize  = XT_ALIGN(sizeof(struct ip6t_icmp)),
        .help           = icmp6_help,
        .init           = icmp6_init,
        .parse          = icmp6_parse,
@@ -267,5 +267,5 @@ static struct ip6tables_match icmp6_match6 = {
 
 void _init(void)
 {
-       register_match6(&icmp6_match6);
+       xtables_register_match(&icmp6_mt6_reg);
 }
index c20fb94b299624148806010e4ddea6f8e50bf47a..55978726cb99b7ce8963c9d14c37301154ab2e0c 100644 (file)
@@ -137,14 +137,13 @@ add_proto_to_mask(int proto){
 static void ipv6header_help(void)
 {
        printf(
-"ipv6header v%s match options:\n"
+"ipv6header match options:\n"
 "--header [!] headers     Type of header to match, by name\n"
 "                         names: hop,dst,route,frag,auth,esp,none,proto\n"
 "                    long names: hop-by-hop,ipv6-opts,ipv6-route,\n"
 "                                ipv6-frag,ah,esp,ipv6-nonxt,protocol\n"
 "                       numbers: 0,60,43,44,51,50,59\n"
-"--soft                    The header CONTAINS the specified extensions\n",
-       IPTABLES_VERSION);
+"--soft                    The header CONTAINS the specified extensions\n");
 }
 
 static const struct option ipv6header_opts[] = {
@@ -286,11 +285,12 @@ static void ipv6header_save(const void *ip, const struct xt_entry_match *match)
        return;
 }
 
-static struct ip6tables_match ipv6header_match6 = {
+static struct xtables_match ipv6header_mt6_reg = {
        .name           = "ipv6header",
-       .version        = IPTABLES_VERSION,
-       .size           = IP6T_ALIGN(sizeof(struct ip6t_ipv6header_info)),
-       .userspacesize  = IP6T_ALIGN(sizeof(struct ip6t_ipv6header_info)),
+       .version        = XTABLES_VERSION,
+       .family         = PF_INET6,
+       .size           = XT_ALIGN(sizeof(struct ip6t_ipv6header_info)),
+       .userspacesize  = XT_ALIGN(sizeof(struct ip6t_ipv6header_info)),
        .help           = ipv6header_help,
        .init           = ipv6header_init,
        .parse          = ipv6header_parse,
@@ -302,5 +302,5 @@ static struct ip6tables_match ipv6header_match6 = {
 
 void _init(void)
 {
-       register_match6(&ipv6header_match6);
+       xtables_register_match(&ipv6header_mt6_reg);
 }
index dd0da2b8f4beaaaa843d6a1fbf54d6068a989140..a6cd5622c67631db5f7c138671a5b933adde08a9 100644 (file)
@@ -61,9 +61,8 @@ static void print_types_all(void)
 static void mh_help(void)
 {
        printf(
-"MH v%s options:\n"
-" --mh-type [!] type[:type]    match mh type\n",
-IPTABLES_VERSION);
+"mh match options:\n"
+" --mh-type [!] type[:type]    match mh type\n");
        print_types_all();
 }
 
@@ -223,11 +222,12 @@ static const struct option mh_opts[] = {
        { .name = NULL }
 };
 
-static struct ip6tables_match mh_match6 = {
+static struct xtables_match mh_mt6_reg = {
        .name           = "mh",
-       .version        = IPTABLES_VERSION,
-       .size           = IP6T_ALIGN(sizeof(struct ip6t_mh)),
-       .userspacesize  = IP6T_ALIGN(sizeof(struct ip6t_mh)),
+       .version        = XTABLES_VERSION,
+       .family         = PF_INET6,
+       .size           = XT_ALIGN(sizeof(struct ip6t_mh)),
+       .userspacesize  = XT_ALIGN(sizeof(struct ip6t_mh)),
        .help           = mh_help,
        .init           = mh_init,
        .parse          = mh_parse,
@@ -238,5 +238,5 @@ static struct ip6tables_match mh_match6 = {
 
 void _init(void)
 {
-       register_match6(&mh_match6);
+       xtables_register_match(&mh_mt6_reg);
 }
index 41e5c324406d32ec74ad14438746c678b7d40f7d..eaf861e4b29c7216057ca11a1b6a279742736dd2 100644 (file)
@@ -25,7 +25,7 @@ static struct ip6t_policy_info *policy_info;
 static void policy_help(void)
 {
        printf(
-"policy v%s options:\n"
+"policy match options:\n"
 "  --dir in|out                        match policy applied during decapsulation/\n"
 "                              policy to be applied during encapsulation\n"
 "  --pol none|ipsec            match policy\n"
@@ -37,8 +37,7 @@ static void policy_help(void)
 "[!] --mode mode               match mode (transport/tunnel)\n"
 "[!] --tunnel-src addr/masklen match tunnel source\n"
 "[!] --tunnel-dst addr/masklen match tunnel destination\n"
-"  --next                      begin next element in policy\n",
-       IPTABLES_VERSION);
+"  --next                      begin next element in policy\n");
 }
 
 static const struct option policy_opts[] =
@@ -443,11 +442,12 @@ static void policy_save(const void *ip, const struct xt_entry_match *match)
        }
 }
 
-static struct ip6tables_match policy_match6 = {
+static struct xtables_match policy_mt6_reg = {
        .name           = "policy",
-       .version        = IPTABLES_VERSION,
-       .size           = IP6T_ALIGN(sizeof(struct ip6t_policy_info)),
-       .userspacesize  = IP6T_ALIGN(sizeof(struct ip6t_policy_info)),
+       .version        = XTABLES_VERSION,
+       .family         = PF_INET6,
+       .size           = XT_ALIGN(sizeof(struct ip6t_policy_info)),
+       .userspacesize  = XT_ALIGN(sizeof(struct ip6t_policy_info)),
        .help           = policy_help,
        .parse          = policy_parse,
        .final_check    = policy_check,
@@ -458,5 +458,5 @@ static struct ip6tables_match policy_match6 = {
 
 void _init(void)
 {
-       register_match6(&policy_match6);
+       xtables_register_match(&policy_mt6_reg);
 }
index e2ae09f4eb22028355a328905c3d56550efc935c..b5f54eee0d9838ae8cddbae698c539b29e81aaf1 100644 (file)
 static void rt_help(void)
 {
        printf(
-"RT v%s options:\n"
+"rt match options:\n"
 " --rt-type [!] type            match the type\n"
 " --rt-segsleft [!] num[:num]   match the Segments Left field (range)\n"
 " --rt-len [!] length           total length of this header\n"
 " --rt-0-res                    check the reserved filed, too (type 0)\n"
 " --rt-0-addrs ADDR[,ADDR...]   Type=0 addresses (list, max: %d)\n"
 " --rt-0-not-strict             List of Type=0 addresses not a strict list\n",
-IPTABLES_VERSION, IP6T_RT_HOPS);
+IP6T_RT_HOPS);
 }
 
 static const struct option rt_opts[] = {
@@ -329,11 +329,12 @@ static void rt_save(const void *ip, const struct xt_entry_match *match)
 
 }
 
-static struct ip6tables_match rt_match6 = {
+static struct xtables_match rt_mt6_reg = {
        .name           = "rt",
-       .version        = IPTABLES_VERSION,
-       .size           = IP6T_ALIGN(sizeof(struct ip6t_rt)),
-       .userspacesize  = IP6T_ALIGN(sizeof(struct ip6t_rt)),
+       .version        = XTABLES_VERSION,
+       .family         = PF_INET6,
+       .size           = XT_ALIGN(sizeof(struct ip6t_rt)),
+       .userspacesize  = XT_ALIGN(sizeof(struct ip6t_rt)),
        .help           = rt_help,
        .init           = rt_init,
        .parse          = rt_parse,
@@ -345,5 +346,5 @@ static struct ip6tables_match rt_match6 = {
 void
 _init(void)
 {
-       register_match6(&rt_match6);
+       xtables_register_match(&rt_mt6_reg);
 }
index fdeae863344d5ac9d273139a0e43ba5ffec7d15b..a0f34060bdb60d46fadc07191a79a2bbc1d1a470 100644 (file)
@@ -22,7 +22,7 @@
 static void CLUSTERIP_help(void)
 {
        printf(
-"CLUSTERIP target v%s options:\n"
+"CLUSTERIP target options:\n"
 "  --new                        Create a new ClusterIP\n"
 "  --hashmode <mode>            Specify hashing mode\n"
 "                                      sourceip\n"
@@ -31,9 +31,7 @@ static void CLUSTERIP_help(void)
 "  --clustermac <mac>           Set clusterIP MAC address\n"
 "  --total-nodes <num>          Set number of total nodes in cluster\n"
 "  --local-node <num>           Set the local node number\n"
-"  --hash-init <num>            Set init value of the Jenkins hash\n"
-"\n",
-IPTABLES_VERSION);
+"  --hash-init <num>            Set init value of the Jenkins hash\n");
 }
 
 #define        PARAM_NEW       0x0001
@@ -235,10 +233,11 @@ static void CLUSTERIP_save(const void *ip, const struct xt_entry_target *target)
               cipinfo->hash_initval);
 }
 
-static struct iptables_target clusterip_target = {
+static struct xtables_target clusterip_tg_reg = {
        .name           = "CLUSTERIP",
-       .version        = IPTABLES_VERSION,
-       .size           = IPT_ALIGN(sizeof(struct ipt_clusterip_tgt_info)),
+       .version        = XTABLES_VERSION,
+       .family         = PF_INET,
+       .size           = XT_ALIGN(sizeof(struct ipt_clusterip_tgt_info)),
        .userspacesize  = offsetof(struct ipt_clusterip_tgt_info, config),
        .help           = CLUSTERIP_help,
        .parse          = CLUSTERIP_parse,
@@ -250,5 +249,5 @@ static struct iptables_target clusterip_target = {
 
 void _init(void)
 {
-       register_target(&clusterip_target);
+       xtables_register_target(&clusterip_tg_reg);
 }
index 3ad412b68e49f667c744c6bb3f3c78846c8653cf..fed7611c127972c7a6138c941466a9d03985362b 100644 (file)
@@ -23,12 +23,10 @@ struct ipt_natinfo
 static void DNAT_help(void)
 {
        printf(
-"DNAT v%s options:\n"
+"DNAT target options:\n"
 " --to-destination <ipaddr>[-<ipaddr>][:port-port]\n"
 "                              Address to map destination to.\n"
-"[--random]\n"
-"\n",
-IPTABLES_VERSION);
+"[--random]\n");
 }
 
 static const struct option DNAT_opts[] = {
@@ -43,7 +41,7 @@ append_range(struct ipt_natinfo *info, const struct ip_nat_range *range)
        unsigned int size;
 
        /* One rangesize already in struct ipt_natinfo */
-       size = IPT_ALIGN(sizeof(*info) + info->mr.rangesize * sizeof(*range));
+       size = XT_ALIGN(sizeof(*info) + info->mr.rangesize * sizeof(*range));
 
        info = realloc(info, size);
        if (!info)
@@ -243,11 +241,12 @@ static void DNAT_save(const void *ip, const struct xt_entry_target *target)
        }
 }
 
-static struct iptables_target dnat_target = {
+static struct xtables_target dnat_tg_reg = {
        .name           = "DNAT",
-       .version        = IPTABLES_VERSION,
-       .size           = IPT_ALIGN(sizeof(struct ip_nat_multi_range)),
-       .userspacesize  = IPT_ALIGN(sizeof(struct ip_nat_multi_range)),
+       .version        = XTABLES_VERSION,
+       .family         = PF_INET,
+       .size           = XT_ALIGN(sizeof(struct ip_nat_multi_range)),
+       .userspacesize  = XT_ALIGN(sizeof(struct ip_nat_multi_range)),
        .help           = DNAT_help,
        .parse          = DNAT_parse,
        .final_check    = DNAT_check,
@@ -258,5 +257,5 @@ static struct iptables_target dnat_target = {
 
 void _init(void)
 {
-       register_target(&dnat_target);
+       xtables_register_target(&dnat_tg_reg);
 }
index 1523b2df68f89e84ab9336b6b18fc161f23f8f55..9526c37d2e3105014adfb98a23a914fe894dbf7f 100644 (file)
@@ -20,9 +20,8 @@
 static void ECN_help(void)
 {
        printf(
-"ECN target v%s options\n"
-"  --ecn-tcp-remove            Remove all ECN bits from TCP header\n",
-               IPTABLES_VERSION);
+"ECN target options\n"
+"  --ecn-tcp-remove            Remove all ECN bits from TCP header\n");
 }
 
 #if 0
@@ -153,11 +152,12 @@ static void ECN_save(const void *ip, const struct xt_entry_target *target)
        }
 }
 
-static struct iptables_target ecn_target = {
+static struct xtables_target ecn_tg_reg = {
        .name           = "ECN",
-       .version        = IPTABLES_VERSION,
-       .size           = IPT_ALIGN(sizeof(struct ipt_ECN_info)),
-       .userspacesize  = IPT_ALIGN(sizeof(struct ipt_ECN_info)),
+       .version        = XTABLES_VERSION,
+       .family         = PF_INET,
+       .size           = XT_ALIGN(sizeof(struct ipt_ECN_info)),
+       .userspacesize  = XT_ALIGN(sizeof(struct ipt_ECN_info)),
        .help           = ECN_help,
        .parse          = ECN_parse,
        .final_check    = ECN_check,
@@ -168,5 +168,5 @@ static struct iptables_target ecn_target = {
 
 void _init(void)
 {
-       register_target(&ecn_target);
+       xtables_register_target(&ecn_tg_reg);
 }
index 6b08f586e5c8c616a8d8845a70d1f136bb0d98fa..50b1130c331b1435d996dcfc7229b6bf0949c8ac 100644 (file)
 static void LOG_help(void)
 {
        printf(
-"LOG v%s options:\n"
+"LOG target options:\n"
 " --log-level level            Level of logging (numeric or see syslog.conf)\n"
 " --log-prefix prefix          Prefix log messages with this prefix.\n\n"
 " --log-tcp-sequence           Log TCP sequence numbers.\n\n"
 " --log-tcp-options            Log TCP options.\n\n"
 " --log-ip-options             Log IP options.\n\n"
-" --log-uid                    Log UID owning the local socket.\n\n",
-IPTABLES_VERSION);
+" --log-uid                    Log UID owning the local socket.\n\n");
 }
 
 static const struct option LOG_opts[] = {
@@ -258,11 +257,12 @@ static void LOG_save(const void *ip, const struct xt_entry_target *target)
                printf("--log-uid ");
 }
 
-static struct iptables_target log_target = {
+static struct xtables_target log_tg_reg = {
     .name          = "LOG",
-    .version       = IPTABLES_VERSION,
-    .size          = IPT_ALIGN(sizeof(struct ipt_log_info)),
-    .userspacesize = IPT_ALIGN(sizeof(struct ipt_log_info)),
+    .version       = XTABLES_VERSION,
+    .family        = PF_INET,
+    .size          = XT_ALIGN(sizeof(struct ipt_log_info)),
+    .userspacesize = XT_ALIGN(sizeof(struct ipt_log_info)),
     .help          = LOG_help,
     .init          = LOG_init,
     .parse         = LOG_parse,
@@ -273,5 +273,5 @@ static struct iptables_target log_target = {
 
 void _init(void)
 {
-       register_target(&log_target);
+       xtables_register_target(&log_tg_reg);
 }
index fc914c590e74aea51462a35812a2a8255027389b..ea4f5cdd7cc392064735c177e3c42f3e75037f34 100644 (file)
 static void MASQUERADE_help(void)
 {
        printf(
-"MASQUERADE v%s options:\n"
+"MASQUERADE target options:\n"
 " --to-ports <port>[-<port>]\n"
 "                              Port (range) to map to.\n"
 " --random\n"
-"                              Randomize source port.\n"
-"\n"
-,
-IPTABLES_VERSION);
+"                              Randomize source port.\n");
 }
 
 static const struct option MASQUERADE_opts[] = {
@@ -151,11 +148,12 @@ MASQUERADE_save(const void *ip, const struct xt_entry_target *target)
                printf("--random ");
 }
 
-static struct iptables_target masquerade_target = {
+static struct xtables_target masquerade_tg_reg = {
        .name           = "MASQUERADE",
-       .version        = IPTABLES_VERSION,
-       .size           = IPT_ALIGN(sizeof(struct ip_nat_multi_range)),
-       .userspacesize  = IPT_ALIGN(sizeof(struct ip_nat_multi_range)),
+       .version        = XTABLES_VERSION,
+       .family         = PF_INET,
+       .size           = XT_ALIGN(sizeof(struct ip_nat_multi_range)),
+       .userspacesize  = XT_ALIGN(sizeof(struct ip_nat_multi_range)),
        .help           = MASQUERADE_help,
        .init           = MASQUERADE_init,
        .parse          = MASQUERADE_parse,
@@ -166,5 +164,5 @@ static struct iptables_target masquerade_target = {
 
 void _init(void)
 {
-       register_target(&masquerade_target);
+       xtables_register_target(&masquerade_tg_reg);
 }
index 83397febfeff62a8f36cda4d9ec6e7d99fc8398f..cc1c7a4e998a86be54b8760b55a47f4d5a910aa9 100644 (file)
@@ -10,9 +10,7 @@
 /* Function which prints out usage message. */
 static void MIRROR_help(void)
 {
-       printf(
-"MIRROR target v%s takes no options\n",
-IPTABLES_VERSION);
+       printf("MIRROR target takes no options\n");
 }
 
 /* Function which parses command options; returns true if it
@@ -23,11 +21,12 @@ static int MIRROR_parse(int c, char **argv, int invert, unsigned int *flags,
        return 0;
 }
 
-static struct iptables_target mirror_target = {
+static struct xtables_target mirror_tg_reg = {
        .name           = "MIRROR",
-       .version        = IPTABLES_VERSION,
-       .size           = IPT_ALIGN(0),
-       .userspacesize  = IPT_ALIGN(0),
+       .version        = XTABLES_VERSION,
+       .family         = PF_INET,
+       .size           = XT_ALIGN(0),
+       .userspacesize  = XT_ALIGN(0),
        .help           = MIRROR_help,
        .parse          = MIRROR_parse,
        .print          = NULL,
@@ -36,5 +35,5 @@ static struct iptables_target mirror_target = {
 
 void _init(void)
 {
-       register_target(&mirror_target);
+       xtables_register_target(&mirror_tg_reg);
 }
index da0e5f4d42dcb7a37437b2836c8e37904904cc45..2a786963fae8a1504b843d1249f932ecd84383bd 100644 (file)
@@ -21,10 +21,10 @@ static const struct option NETMAP_opts[] = {
 /* Function which prints out usage message. */
 static void NETMAP_help(void)
 {
-       printf(MODULENAME" v%s options:\n"
+       printf(MODULENAME" target options:\n"
               "  --%s address[/mask]\n"
               "                                Network address to map to.\n\n",
-              IPTABLES_VERSION, NETMAP_opts[0].name);
+              NETMAP_opts[0].name);
 }
 
 static u_int32_t
@@ -170,11 +170,12 @@ static void NETMAP_save(const void *ip, const struct xt_entry_target *target)
        NETMAP_print(ip, target, 0);
 }
 
-static struct iptables_target netmap_target = {
+static struct xtables_target netmap_tg_reg = {
        .name           = MODULENAME,
-       .version        = IPTABLES_VERSION,
-       .size           = IPT_ALIGN(sizeof(struct ip_nat_multi_range)),
-       .userspacesize  = IPT_ALIGN(sizeof(struct ip_nat_multi_range)),
+       .version        = XTABLES_VERSION,
+       .family         = PF_INET,
+       .size           = XT_ALIGN(sizeof(struct ip_nat_multi_range)),
+       .userspacesize  = XT_ALIGN(sizeof(struct ip_nat_multi_range)),
        .help           = NETMAP_help,
        .init           = NETMAP_init,
        .parse          = NETMAP_parse,
@@ -186,6 +187,6 @@ static struct iptables_target netmap_target = {
 
 void _init(void)
 {
-       register_target(&netmap_target);
+       xtables_register_target(&netmap_tg_reg);
 }
 
index 1918df82ccdefd91e137e761fe958db4f5ae723a..b4c73bbeeefd98e31e7cdc31b7046967e1feacdf 100644 (file)
 static void REDIRECT_help(void)
 {
        printf(
-"REDIRECT v%s options:\n"
+"REDIRECT target options:\n"
 " --to-ports <port>[-<port>]\n"
-"                              Port (range) to map to.\n\n",
-IPTABLES_VERSION);
+"                              Port (range) to map to.\n");
 }
 
 static const struct option REDIRECT_opts[] = {
@@ -157,11 +156,12 @@ static void REDIRECT_save(const void *ip, const struct xt_entry_target *target)
        }
 }
 
-static struct iptables_target redirect_target = {
+static struct xtables_target redirect_tg_reg = {
        .name           = "REDIRECT",
-       .version        = IPTABLES_VERSION,
-       .size           = IPT_ALIGN(sizeof(struct ip_nat_multi_range)),
-       .userspacesize  = IPT_ALIGN(sizeof(struct ip_nat_multi_range)),
+       .version        = XTABLES_VERSION,
+       .family         = PF_INET,
+       .size           = XT_ALIGN(sizeof(struct ip_nat_multi_range)),
+       .userspacesize  = XT_ALIGN(sizeof(struct ip_nat_multi_range)),
        .help           = REDIRECT_help,
        .init           = REDIRECT_init,
        .parse          = REDIRECT_parse,
@@ -172,5 +172,5 @@ static struct iptables_target redirect_target = {
 
 void _init(void)
 {
-       register_target(&redirect_target);
+       xtables_register_target(&redirect_tg_reg);
 }
index 5901a5ef894bfb6134c8ad151ed5ab3de73b3f72..fd272c47b312ae4e6a96ca3e077baa81f21f185c 100644 (file)
@@ -70,7 +70,7 @@ print_reject_types(void)
 static void REJECT_help(void)
 {
        printf(
-"REJECT options:\n"
+"REJECT target options:\n"
 "--reject-with type              drop input packet and send back\n"
 "                                a reply packet according to type:\n");
 
@@ -157,11 +157,12 @@ static void REJECT_save(const void *ip, const struct xt_entry_target *target)
        printf("--reject-with %s ", reject_table[i].name);
 }
 
-static struct iptables_target reject_target = {
+static struct xtables_target reject_tg_reg = {
        .name           = "REJECT",
-       .version        = IPTABLES_VERSION,
-       .size           = IPT_ALIGN(sizeof(struct ipt_reject_info)),
-       .userspacesize  = IPT_ALIGN(sizeof(struct ipt_reject_info)),
+       .version        = XTABLES_VERSION,
+       .family         = PF_INET,
+       .size           = XT_ALIGN(sizeof(struct ipt_reject_info)),
+       .userspacesize  = XT_ALIGN(sizeof(struct ipt_reject_info)),
        .help           = REJECT_help,
        .init           = REJECT_init,
        .parse          = REJECT_parse,
@@ -172,5 +173,5 @@ static struct iptables_target reject_target = {
 
 void _init(void)
 {
-       register_target(&reject_target);
+       xtables_register_target(&reject_tg_reg);
 }
index f7c737c59d3728e956c7cdb969a97ea0b734579d..315479754302e087ff2d568f42d4a4af2e98846d 100644 (file)
@@ -14,7 +14,7 @@
 static void SAME_help(void)
 {
        printf(
-"SAME v%s options:\n"
+"SAME target options:\n"
 " --to <ipaddr>-<ipaddr>\n"
 "                              Addresses to map source to.\n"
 "                               May be specified more than\n"
@@ -23,9 +23,7 @@ static void SAME_help(void)
 "                              Don't use destination-ip in\n"
 "                                         source selection\n"
 " --random\n"
-"                              Randomize source port\n"
-,
-IPTABLES_VERSION);
+"                              Randomize source port\n");
 }
 
 static const struct option SAME_opts[] = {
@@ -208,11 +206,12 @@ static void SAME_save(const void *ip, const struct xt_entry_target *target)
                printf("--random ");
 }
 
-static struct iptables_target same_target = {
+static struct xtables_target same_tg_reg = {
        .name           = "SAME",
-       .version        = IPTABLES_VERSION,
-       .size           = IPT_ALIGN(sizeof(struct ipt_same_info)),
-       .userspacesize  = IPT_ALIGN(sizeof(struct ipt_same_info)),
+       .version        = XTABLES_VERSION,
+       .family         = PF_INET,
+       .size           = XT_ALIGN(sizeof(struct ipt_same_info)),
+       .userspacesize  = XT_ALIGN(sizeof(struct ipt_same_info)),
        .help           = SAME_help,
        .init           = SAME_init,
        .parse          = SAME_parse,
@@ -224,5 +223,5 @@ static struct iptables_target same_target = {
 
 void _init(void)
 {
-       register_target(&same_target);
+       xtables_register_target(&same_tg_reg);
 }
index dd42867bb03298f9efdcd5220c1e920dcb719214..378b77e425494c3922597f3e6b9abdd57333d0aa 100644 (file)
 /* Function which prints out usage message. */
 static void SET_help(void)
 {
-       printf("SET v%s options:\n"
+       printf("SET target options:\n"
               " --add-set name flags\n"
               " --del-set name flags\n"
               "                add/del src/dst IP/port from/to named sets,\n"
               "                where flags are the comma separated list of\n"
-              "                'src' and 'dst'.\n"
-              "\n", IPTABLES_VERSION);
+              "                'src' and 'dst'.\n");
 }
 
 static const struct option SET_opts[] = {
@@ -154,11 +153,12 @@ static void SET_save(const void *ip, const struct xt_entry_target *target)
        print_target("--del-set", &info->del_set);
 }
 
-static struct iptables_target set_target = {
+static struct xtables_target set_tg_reg = {
        .name           = "SET",
-       .version        = IPTABLES_VERSION,
-       .size           = IPT_ALIGN(sizeof(struct ipt_set_info_target)),
-       .userspacesize  = IPT_ALIGN(sizeof(struct ipt_set_info_target)),
+       .version        = XTABLES_VERSION,
+       .family         = PF_INET,
+       .size           = XT_ALIGN(sizeof(struct ipt_set_info_target)),
+       .userspacesize  = XT_ALIGN(sizeof(struct ipt_set_info_target)),
        .help           = SET_help,
        .init           = SET_init,
        .parse          = SET_parse,
@@ -170,5 +170,5 @@ static struct iptables_target set_target = {
 
 void _init(void)
 {
-       register_target(&set_target);
+       xtables_register_target(&set_tg_reg);
 }
index 7b9e1763f0e02c0601662c5eac16890314ec10ec..11536c61e0fa6408176777eb2eba797364e4e377 100644 (file)
@@ -23,12 +23,10 @@ struct ipt_natinfo
 static void SNAT_help(void)
 {
        printf(
-"SNAT v%s options:\n"
+"SNAT target options:\n"
 " --to-source <ipaddr>[-<ipaddr>][:port-port]\n"
 "                              Address to map source to.\n"
-"[--random]\n"
-"\n",
-IPTABLES_VERSION);
+"[--random]\n");
 }
 
 static const struct option SNAT_opts[] = {
@@ -43,7 +41,7 @@ append_range(struct ipt_natinfo *info, const struct ip_nat_range *range)
        unsigned int size;
 
        /* One rangesize already in struct ipt_natinfo */
-       size = IPT_ALIGN(sizeof(*info) + info->mr.rangesize * sizeof(*range));
+       size = XT_ALIGN(sizeof(*info) + info->mr.rangesize * sizeof(*range));
 
        info = realloc(info, size);
        if (!info)
@@ -244,11 +242,12 @@ static void SNAT_save(const void *ip, const struct xt_entry_target *target)
        }
 }
 
-static struct iptables_target snat_target = {
+static struct xtables_target snat_tg_reg = {
        .name           = "SNAT",
-       .version        = IPTABLES_VERSION,
-       .size           = IPT_ALIGN(sizeof(struct ip_nat_multi_range)),
-       .userspacesize  = IPT_ALIGN(sizeof(struct ip_nat_multi_range)),
+       .version        = XTABLES_VERSION,
+       .family         = PF_INET,
+       .size           = XT_ALIGN(sizeof(struct ip_nat_multi_range)),
+       .userspacesize  = XT_ALIGN(sizeof(struct ip_nat_multi_range)),
        .help           = SNAT_help,
        .parse          = SNAT_parse,
        .final_check    = SNAT_check,
@@ -259,5 +258,5 @@ static struct iptables_target snat_target = {
 
 void _init(void)
 {
-       register_target(&snat_target);
+       xtables_register_target(&snat_tg_reg);
 }
index b5a32c4088910d0f4ff62b78bbbee54f96bd60d1..9c22ba3a81c7e450b85c9f4f0ece9179ed7c70e9 100644 (file)
 static void TTL_help(void)
 {
        printf(
-"TTL target v%s options\n"
+"TTL target options\n"
 "  --ttl-set value             Set TTL to <value 0-255>\n"
 "  --ttl-dec value             Decrement TTL by <value 1-255>\n"
-"  --ttl-inc value             Increment TTL by <value 1-255>\n"
-, IPTABLES_VERSION);
+"  --ttl-inc value             Increment TTL by <value 1-255>\n");
 }
 
 static int TTL_parse(int c, char **argv, int invert, unsigned int *flags,
@@ -139,12 +138,12 @@ static const struct option TTL_opts[] = {
        { .name = NULL }
 };
 
-static struct iptables_target ttl_target = {
-       .next           = NULL, 
+static struct xtables_target ttl_tg_reg = {
        .name           = "TTL",
-       .version        = IPTABLES_VERSION,
-       .size           = IPT_ALIGN(sizeof(struct ipt_TTL_info)),
-       .userspacesize  = IPT_ALIGN(sizeof(struct ipt_TTL_info)),
+       .version        = XTABLES_VERSION,
+       .family         = PF_INET,
+       .size           = XT_ALIGN(sizeof(struct ipt_TTL_info)),
+       .userspacesize  = XT_ALIGN(sizeof(struct ipt_TTL_info)),
        .help           = TTL_help,
        .parse          = TTL_parse,
        .final_check    = TTL_check,
@@ -155,5 +154,5 @@ static struct iptables_target ttl_target = {
 
 void _init(void)
 {
-       register_target(&ttl_target);
+       xtables_register_target(&ttl_tg_reg);
 }
index 31990a6141fdd2866255b40092327450b3d95e0b..d2b464f2f5a4eda95bf37ecb2fa04aa76e7bd254 100644 (file)
@@ -36,12 +36,11 @@ static void print_groups(unsigned int gmask)
 /* Function which prints out usage message. */
 static void ULOG_help(void)
 {
-       printf("ULOG v%s options:\n"
+       printf("ULOG target options:\n"
               " --ulog-nlgroup nlgroup         NETLINK group used for logging\n"
               " --ulog-cprange size            Bytes of each packet to be passed\n"
               " --ulog-qthreshold              Threshold of in-kernel queue\n"
-              " --ulog-prefix prefix           Prefix log messages with this prefix.\n\n",
-              IPTABLES_VERSION);
+              " --ulog-prefix prefix           Prefix log messages with this prefix.\n");
 }
 
 static const struct option ULOG_opts[] = {
@@ -186,11 +185,12 @@ static void ULOG_print(const void *ip, const struct xt_entry_target *target,
        printf("queue_threshold %u ", (unsigned int)loginfo->qthreshold);
 }
 
-static struct iptables_target ulog_target = {
+static struct xtables_target ulog_tg_reg = {
        .name           = "ULOG",
-       .version        = IPTABLES_VERSION,
-       .size           = IPT_ALIGN(sizeof(struct ipt_ulog_info)),
-       .userspacesize  = IPT_ALIGN(sizeof(struct ipt_ulog_info)),
+       .version        = XTABLES_VERSION,
+       .family         = PF_INET,
+       .size           = XT_ALIGN(sizeof(struct ipt_ulog_info)),
+       .userspacesize  = XT_ALIGN(sizeof(struct ipt_ulog_info)),
        .help           = ULOG_help,
        .init           = ULOG_init,
        .parse          = ULOG_parse,
@@ -201,5 +201,5 @@ static struct iptables_target ulog_target = {
 
 void _init(void)
 {
-       register_target(&ulog_target);
+       xtables_register_target(&ulog_tg_reg);
 }
index 7db9dce799b74406b29dfc7171a95d3bd6e19a12..9611c39afeaeff98db0e00835f98dd40839d1792 100644 (file)
@@ -39,12 +39,11 @@ static void addrtype_help_types(void)
 static void addrtype_help(void)
 {
        printf(
-"Address type match v%s options:\n"
+"Address type match options:\n"
 " [!] --src-type type[,...]      Match source address type\n"
 " [!] --dst-type type[,...]      Match destination address type\n"
 "\n"
-"Valid types:           \n"
-, IPTABLES_VERSION);
+"Valid types:           \n");
        addrtype_help_types();
 }
 
@@ -183,11 +182,12 @@ static const struct option addrtype_opts[] = {
        { .name = NULL }
 };
 
-static struct iptables_match addrtype_match = {
+static struct xtables_match addrtype_mt_reg = {
        .name           = "addrtype",
-       .version        = IPTABLES_VERSION,
-       .size           = IPT_ALIGN(sizeof(struct ipt_addrtype_info)),
-       .userspacesize  = IPT_ALIGN(sizeof(struct ipt_addrtype_info)),
+       .version        = XTABLES_VERSION,
+       .family         = PF_INET,
+       .size           = XT_ALIGN(sizeof(struct ipt_addrtype_info)),
+       .userspacesize  = XT_ALIGN(sizeof(struct ipt_addrtype_info)),
        .help           = addrtype_help,
        .parse          = addrtype_parse,
        .final_check    = addrtype_check,
@@ -199,5 +199,5 @@ static struct iptables_match addrtype_match = {
 
 void _init(void) 
 {
-       register_match(&addrtype_match);
+       xtables_register_match(&addrtype_mt_reg);
 }
index 2555b5d81713aaceccd723bc521a43301db0440a..182b51a3c542f6a4a07657e5ab5505f6040b7af3 100644 (file)
 static void ah_help(void)
 {
        printf(
-"AH v%s options:\n"
+"ah match options:\n"
 " --ahspi [!] spi[:spi]\n"
-"                              match spi (range)\n",
-IPTABLES_VERSION);
+"                              match spi (range)\n");
 }
 
 static const struct option ah_opts[] = {
@@ -156,11 +155,12 @@ static void ah_save(const void *ip, const struct xt_entry_match *match)
 
 }
 
-static struct iptables_match ah_match = {
+static struct xtables_match ah_mt_reg = {
        .name           = "ah",
-       .version        = IPTABLES_VERSION,
-       .size           = IPT_ALIGN(sizeof(struct ipt_ah)),
-       .userspacesize  = IPT_ALIGN(sizeof(struct ipt_ah)),
+       .version        = XTABLES_VERSION,
+       .family         = PF_INET,
+       .size           = XT_ALIGN(sizeof(struct ipt_ah)),
+       .userspacesize  = XT_ALIGN(sizeof(struct ipt_ah)),
        .help           = ah_help,
        .init           = ah_init,
        .parse          = ah_parse,
@@ -172,5 +172,5 @@ static struct iptables_match ah_match = {
 void
 _init(void)
 {
-       register_match(&ah_match);
+       xtables_register_match(&ah_mt_reg);
 }
index 9c07eab3d0b5b9d2218eadecf9a0f7b104f586ad..0621453593a1bc495fa5ac6b5fded3c660b15377 100644 (file)
 static void ecn_help(void)
 {
        printf(
-"ECN match v%s options\n"
+"ECN match options\n"
 "[!] --ecn-tcp-cwr             Match CWR bit of TCP header\n"
 "[!] --ecn-tcp-ece             Match ECE bit of TCP header\n"
-"[!] --ecn-ip-ect [0..3]       Match ECN codepoint in IPv4 header\n",
-       IPTABLES_VERSION);
+"[!] --ecn-ip-ect [0..3]       Match ECN codepoint in IPv4 header\n");
 }
 
 static const struct option ecn_opts[] = {
@@ -144,11 +143,12 @@ static void ecn_save(const void *ip, const struct xt_entry_match *match)
        }
 }
 
-static struct iptables_match ecn_match = {
+static struct xtables_match ecn_mt_reg = {
     .name          = "ecn",
-    .version       = IPTABLES_VERSION,
-    .size          = IPT_ALIGN(sizeof(struct ipt_ecn_info)),
-    .userspacesize = IPT_ALIGN(sizeof(struct ipt_ecn_info)),
+    .version       = XTABLES_VERSION,
+    .family        = PF_INET,
+    .size          = XT_ALIGN(sizeof(struct ipt_ecn_info)),
+    .userspacesize = XT_ALIGN(sizeof(struct ipt_ecn_info)),
     .help          = ecn_help,
     .parse         = ecn_parse,
     .final_check   = ecn_check,
@@ -159,5 +159,5 @@ static struct iptables_match ecn_match = {
 
 void _init(void)
 {
-       register_match(&ecn_match);
+       xtables_register_match(&ecn_mt_reg);
 }
index b1fccbf545193453c6a42913e359b3ccf5b0b2a8..4361f13528f57aa207b2e61f902a626613b93d98 100644 (file)
@@ -101,10 +101,9 @@ print_icmptypes(void)
 static void icmp_help(void)
 {
        printf(
-"ICMP v%s options:\n"
+"icmp match options:\n"
 " --icmp-type [!] typename     match icmp type\n"
-"                              (or numeric type or type/code)\n"
-"\n", IPTABLES_VERSION);
+"                              (or numeric type or type/code)\n");
        print_icmptypes();
 }
 
@@ -274,11 +273,12 @@ static void icmp_save(const void *ip, const struct xt_entry_match *match)
        }
 }
 
-static struct iptables_match icmp_match = {
+static struct xtables_match icmp_mt_reg = {
        .name           = "icmp",
-       .version        = IPTABLES_VERSION,
-       .size           = IPT_ALIGN(sizeof(struct ipt_icmp)),
-       .userspacesize  = IPT_ALIGN(sizeof(struct ipt_icmp)),
+       .version        = XTABLES_VERSION,
+       .family         = PF_INET,
+       .size           = XT_ALIGN(sizeof(struct ipt_icmp)),
+       .userspacesize  = XT_ALIGN(sizeof(struct ipt_icmp)),
        .help           = icmp_help,
        .init           = icmp_init,
        .parse          = icmp_parse,
@@ -289,5 +289,5 @@ static struct iptables_match icmp_match = {
 
 void _init(void)
 {
-       register_match(&icmp_match);
+       xtables_register_match(&icmp_mt_reg);
 }
index 48b96bedba35bc5a1f2657fd400714c4846be64f..71e95dd6cee6bbb9444ecfb5b28781146ca1b258 100644 (file)
@@ -24,7 +24,7 @@ static struct ipt_policy_info *policy_info;
 static void policy_help(void)
 {
        printf(
-"policy v%s options:\n"
+"policy match options:\n"
 "  --dir in|out                        match policy applied during decapsulation/\n"
 "                              policy to be applied during encapsulation\n"
 "  --pol none|ipsec            match policy\n"
@@ -36,8 +36,7 @@ static void policy_help(void)
 "[!] --mode mode               match mode (transport/tunnel)\n"
 "[!] --tunnel-src addr/mask    match tunnel source\n"
 "[!] --tunnel-dst addr/mask    match tunnel destination\n"
-"  --next                      begin next element in policy\n",
-       IPTABLES_VERSION);
+"  --next                      begin next element in policy\n");
 }
 
 static const struct option policy_opts[] =
@@ -408,11 +407,12 @@ static void policy_save(const void *ip, const struct xt_entry_match *match)
        }
 }
 
-static struct iptables_match policy_match = {
+static struct xtables_match policy_mt_reg = {
        .name           = "policy",
-       .version        = IPTABLES_VERSION,
-       .size           = IPT_ALIGN(sizeof(struct ipt_policy_info)),
-       .userspacesize  = IPT_ALIGN(sizeof(struct ipt_policy_info)),
+       .version        = XTABLES_VERSION,
+       .family         = PF_INET,
+       .size           = XT_ALIGN(sizeof(struct ipt_policy_info)),
+       .userspacesize  = XT_ALIGN(sizeof(struct ipt_policy_info)),
        .help           = policy_help,
        .parse          = policy_parse,
        .final_check    = policy_check,
@@ -423,5 +423,5 @@ static struct iptables_match policy_match = {
 
 void _init(void)
 {
-       register_match(&policy_match);
+       xtables_register_match(&policy_mt_reg);
 }
index 7026fc23aa7c24878904f8d3795b789d4d1e3f1c..7fdc29307d140df498fdb517185d8d46db1463a0 100644 (file)
 static void realm_help(void)
 {
        printf(
-"realm v%s options:\n"
+"realm match options:\n"
 " --realm [!] value[/mask]\n"
-"                              Match realm\n"
-"\n", IPTABLES_VERSION);
+"                              Match realm\n");
 }
 
 static const struct option realm_opts[] = {
@@ -243,11 +242,12 @@ static void realm_check(unsigned int flags)
                           "realm match: You must specify `--realm'");
 }
 
-static struct iptables_match realm_match = {
+static struct xtables_match realm_mt_reg = {
        .name           = "realm",
-       .version        = IPTABLES_VERSION,
-       .size           = IPT_ALIGN(sizeof(struct ipt_realm_info)),
-       .userspacesize  = IPT_ALIGN(sizeof(struct ipt_realm_info)),
+       .version        = XTABLES_VERSION,
+       .family         = PF_INET,
+       .size           = XT_ALIGN(sizeof(struct ipt_realm_info)),
+       .userspacesize  = XT_ALIGN(sizeof(struct ipt_realm_info)),
        .help           = realm_help,
        .parse          = realm_parse,
        .final_check    = realm_check,
@@ -258,7 +258,7 @@ static struct iptables_match realm_match = {
 
 void _init(void)
 {
-       register_match(&realm_match);
+       xtables_register_match(&realm_mt_reg);
 }
 
 
index ace778e0cf9c2b414dbe6f5629917b811afc7bef..51b0d15d07ff0b13baf600cd36e58b2a93d4f5bf 100644 (file)
@@ -40,7 +40,7 @@ static const struct option recent_opts[] = {
 static void recent_help(void)
 {
        printf(
-"recent v%s options:\n"
+"recent match options:\n"
 "[!] --set                       Add source address to list, always matches.\n"
 "[!] --rcheck                    Match if source address in list.\n"
 "[!] --update                    Match if source address in list, also update last-seen time.\n"
@@ -59,10 +59,7 @@ static void recent_help(void)
 "    --name name                 Name of the recent list to be used.  DEFAULT used if none given.\n"
 "    --rsource                   Match/Save the source address of each packet in the recent list table (default).\n"
 "    --rdest                     Match/Save the destination address of each packet in the recent list table.\n"
-RECENT_NAME " " RECENT_VER ": Stephen Frost <sfrost@snowman.net>.  http://snowman.net/projects/ipt_recent/\n"
-,
-IPTABLES_VERSION);
-
+RECENT_NAME " " RECENT_VER ": Stephen Frost <sfrost@snowman.net>.  http://snowman.net/projects/ipt_recent/\n");
 }
   
 /* Initialize the match. */
@@ -210,11 +207,12 @@ static void recent_save(const void *ip, const struct xt_entry_match *match)
 }
 
 /* Structure for iptables to use to communicate with module */
-static struct iptables_match recent_match = {
+static struct xtables_match recent_mt_reg = {
     .name          = "recent",
-    .version       = IPTABLES_VERSION,
-    .size          = IPT_ALIGN(sizeof(struct ipt_recent_info)),
-    .userspacesize = IPT_ALIGN(sizeof(struct ipt_recent_info)),
+    .version       = XTABLES_VERSION,
+    .family        = PF_INET,
+    .size          = XT_ALIGN(sizeof(struct ipt_recent_info)),
+    .userspacesize = XT_ALIGN(sizeof(struct ipt_recent_info)),
     .help          = recent_help,
     .init          = recent_init,
     .parse         = recent_parse,
@@ -226,5 +224,5 @@ static struct iptables_match recent_match = {
 
 void _init(void)
 {
-       register_match(&recent_match);
+       xtables_register_match(&recent_mt_reg);
 }
index 932008bb054d7534b84446a82fdd0c6038020194..dcb74df99541a52ced5a7ed88ede8604f09880f1 100644 (file)
 /* Function which prints out usage message. */
 static void set_help(void)
 {
-       printf("set v%s options:\n"
+       printf("set match options:\n"
               " [!] --set     name flags\n"
               "                'name' is the set name from to match,\n" 
               "                'flags' are the comma separated list of\n"
-              "                'src' and 'dst'.\n"
-              "\n", IPTABLES_VERSION);
+              "                'src' and 'dst'.\n");
 }
 
 static const struct option set_opts[] = {
@@ -141,11 +140,12 @@ static void set_save(const void *ip, const struct xt_entry_match *match)
        print_match("--set", &info->match_set);
 }
 
-static struct iptables_match set_match = {
+static struct xtables_match set_mt_reg = {
        .name           = "set",
-       .version        = IPTABLES_VERSION,
-       .size           = IPT_ALIGN(sizeof(struct ipt_set_info_match)),
-       .userspacesize  = IPT_ALIGN(sizeof(struct ipt_set_info_match)),
+       .version        = XTABLES_VERSION,
+       .family         = PF_INET,
+       .size           = XT_ALIGN(sizeof(struct ipt_set_info_match)),
+       .userspacesize  = XT_ALIGN(sizeof(struct ipt_set_info_match)),
        .help           = set_help,
        .init           = set_init,
        .parse          = set_parse,
@@ -157,5 +157,5 @@ static struct iptables_match set_match = {
 
 void _init(void)
 {
-       register_match(&set_match);
+       xtables_register_match(&set_mt_reg);
 }
index d7820f1f4ef979527a75076fc377dc63f1b3672f..25b92063be94a836683a9426a1a35b51d91f66eb 100644 (file)
 static void ttl_help(void)
 {
        printf(
-"TTL match v%s options:\n"
+"ttl match options:\n"
 "  --ttl-eq value      Match time to live value\n"
 "  --ttl-lt value      Match TTL < value\n"
-"  --ttl-gt value      Match TTL > value\n"
-, IPTABLES_VERSION);
+"  --ttl-gt value      Match TTL > value\n");
 }
 
 static int ttl_parse(int c, char **argv, int invert, unsigned int *flags,
@@ -148,11 +147,12 @@ static const struct option ttl_opts[] = {
        { .name = NULL }
 };
 
-static struct iptables_match ttl_match = {
+static struct xtables_match ttl_mt_reg = {
        .name           = "ttl",
-       .version        = IPTABLES_VERSION,
-       .size           = IPT_ALIGN(sizeof(struct ipt_ttl_info)),
-       .userspacesize  = IPT_ALIGN(sizeof(struct ipt_ttl_info)),
+       .version        = XTABLES_VERSION,
+       .family         = PF_INET,
+       .size           = XT_ALIGN(sizeof(struct ipt_ttl_info)),
+       .userspacesize  = XT_ALIGN(sizeof(struct ipt_ttl_info)),
        .help           = ttl_help,
        .parse          = ttl_parse,
        .final_check    = ttl_check,
@@ -164,5 +164,5 @@ static struct iptables_match ttl_match = {
 
 void _init(void) 
 {
-       register_match(&ttl_match);
+       xtables_register_match(&ttl_mt_reg);
 }
index 648d0980d7673163696afbc86414e90c706b127b..4bdbd1b4c9d5377e755a015c22464b755d6e8a13 100644 (file)
@@ -7,9 +7,7 @@
 /* Function which prints out usage message. */
 static void unclean_help(void)
 {
-       printf(
-"unclean v%s takes no options\n"
-"\n", IPTABLES_VERSION);
+       printf("unclean match takes no options\n");
 }
 
 /* Function which parses command options; returns true if it
@@ -20,16 +18,17 @@ static int unclean_parse(int c, char **argv, int invert, unsigned int *flags,
        return 0;
 }
 
-static struct iptables_match unclean_match = {
+static struct xtables_match unclean_mt_reg = {
        .name           = "unclean",
-       .version        = IPTABLES_VERSION,
-       .size           = IPT_ALIGN(0),
-       .userspacesize  = IPT_ALIGN(0),
+       .version        = XTABLES_VERSION,
+       .family         = PF_INET,
+       .size           = XT_ALIGN(0),
+       .userspacesize  = XT_ALIGN(0),
        .help           = unclean_help,
        .parse          = unclean_parse,
 };
 
 void _init(void)
 {
-       register_match(&unclean_match);
+       xtables_register_match(&unclean_mt_reg);
 }
index 4a3520f8b3fbf023ea7771b678a8ad97d33b1ed4..79dd16c2cc207ebf19a7b51802f64a0de9ba4e62 100644 (file)
@@ -15,10 +15,8 @@ static void
 CLASSIFY_help(void)
 {
        printf(
-"CLASSIFY target v%s options:\n"
-"  --set-class [MAJOR:MINOR]    Set skb->priority value\n"
-"\n",
-IPTABLES_VERSION);
+"CLASSIFY target options:\n"
+"  --set-class [MAJOR:MINOR]    Set skb->priority value\n");
 }
 
 static const struct option CLASSIFY_opts[] = {
@@ -105,7 +103,7 @@ CLASSIFY_save(const void *ip, const struct xt_entry_target *target)
 static struct xtables_target classify_target = { 
        .family         = AF_UNSPEC,
        .name           = "CLASSIFY",
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_classify_target_info)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_classify_target_info)),
        .help           = CLASSIFY_help,
index 9e8013ad1a76bd9d5fdcb1f633e5c0ede81a51b0..27640f58bfae41b482f73bb8a56d90f199345db5 100644 (file)
@@ -37,12 +37,10 @@ enum {
 static void CONNMARK_help(void)
 {
        printf(
-"CONNMARK target v%s options:\n"
+"CONNMARK target options:\n"
 "  --set-mark value[/mask]       Set conntrack mark value\n"
 "  --save-mark [--mask mask]     Save the packet nfmark in the connection\n"
-"  --restore-mark [--mask mask]  Restore saved nfmark value\n"
-"\n",
-IPTABLES_VERSION);
+"  --restore-mark [--mask mask]  Restore saved nfmark value\n");
 }
 
 static const struct option CONNMARK_opts[] = {
@@ -410,7 +408,7 @@ static struct xtables_target connmark_target = {
        .family         = AF_INET,
        .name           = "CONNMARK",
        .revision       = 0,
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_connmark_target_info)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_connmark_target_info)),
        .help           = CONNMARK_help,
@@ -426,7 +424,7 @@ static struct xtables_target connmark_target6 = {
        .family         = AF_INET6,
        .name           = "CONNMARK",
        .revision       = 0,
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_connmark_target_info)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_connmark_target_info)),
        .help           = CONNMARK_help,
@@ -439,7 +437,7 @@ static struct xtables_target connmark_target6 = {
 };
 
 static struct xtables_target connmark_tg_reg = {
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .name           = "CONNMARK",
        .revision       = 1,
        .family         = AF_INET,
@@ -455,7 +453,7 @@ static struct xtables_target connmark_tg_reg = {
 };
 
 static struct xtables_target connmark_tg6_reg = {
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .name           = "CONNMARK",
        .revision       = 1,
        .family         = AF_INET6,
index e8d0a5eaa4eda2cdef52551359ad8647f27c86a8..579ea4c3af9b3b47a28072b5458c5a55f03d549e 100644 (file)
 static void CONNSECMARK_help(void)
 {
        printf(
-"CONNSECMARK target v%s options:\n"
+"CONNSECMARK target options:\n"
 "  --save                   Copy security mark from packet to conntrack\n"
-"  --restore                Copy security mark from connection to packet\n"
-"\n",
-IPTABLES_VERSION);
+"  --restore                Copy security mark from connection to packet\n");
 }
 
 static const struct option CONNSECMARK_opts[] = {
@@ -111,7 +109,7 @@ CONNSECMARK_save(const void *ip, const struct xt_entry_target *target)
 static struct xtables_target connsecmark_target = {
        .family         = AF_INET,
        .name           = "CONNSECMARK",
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .revision       = 0,
        .size           = XT_ALIGN(sizeof(struct xt_connsecmark_target_info)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_connsecmark_target_info)),
@@ -126,7 +124,7 @@ static struct xtables_target connsecmark_target = {
 static struct xtables_target connsecmark_target6 = {
        .family         = AF_INET6,
        .name           = "CONNSECMARK",
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .revision       = 0,
        .size           = XT_ALIGN(sizeof(struct xt_connsecmark_target_info)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_connsecmark_target_info)),
index c15f0e162e467991a6dfbd6c54c3718e6bc1b708..e9369ab9dbcb34dc7f7aced750c34c73559608d5 100644 (file)
@@ -135,7 +135,7 @@ static void DSCP_save(const void *ip, const struct xt_entry_target *target)
 static struct xtables_target dscp_target = {
        .family         = AF_INET,
        .name           = "DSCP",
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_DSCP_info)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_DSCP_info)),
        .help           = DSCP_help,
@@ -149,7 +149,7 @@ static struct xtables_target dscp_target = {
 static struct xtables_target dscp_target6 = {
        .family         = AF_INET6,
        .name           = "DSCP",
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_DSCP_info)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_DSCP_info)),
        .help           = DSCP_help,
index d7d79d574fed6d7ac9bdf25d8e45a866e16d132d..5b880cec9ea6f9239ab4ffe74ab7a7532b6ae00d 100644 (file)
@@ -17,12 +17,10 @@ enum {
 static void MARK_help(void)
 {
        printf(
-"MARK target v%s options:\n"
+"MARK target options:\n"
 "  --set-mark value                   Set nfmark value\n"
 "  --and-mark value                   Binary AND the nfmark with value\n"
-"  --or-mark  value                   Binary OR  the nfmark with value\n"
-"\n",
-IPTABLES_VERSION);
+"  --or-mark  value                   Binary OR  the nfmark with value\n");
 }
 
 static const struct option MARK_opts[] = {
@@ -287,7 +285,7 @@ static void mark_tg_save(const void *ip, const struct xt_entry_target *target)
 static struct xtables_target mark_target_v0 = {
        .family         = AF_INET,
        .name           = "MARK",
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .revision       = 0,
        .size           = XT_ALIGN(sizeof(struct xt_mark_target_info)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_mark_target_info)),
@@ -302,7 +300,7 @@ static struct xtables_target mark_target_v0 = {
 static struct xtables_target mark_target_v1 = {
        .family         = AF_INET,
        .name           = "MARK",
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .revision       = 1,
        .size           = XT_ALIGN(sizeof(struct xt_mark_target_info_v1)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_mark_target_info_v1)),
@@ -317,7 +315,7 @@ static struct xtables_target mark_target_v1 = {
 static struct xtables_target mark_target6_v0 = {
        .family         = AF_INET6,
        .name           = "MARK",
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .revision       = 0,
        .size           = XT_ALIGN(sizeof(struct xt_mark_target_info)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_mark_target_info)),
@@ -330,7 +328,7 @@ static struct xtables_target mark_target6_v0 = {
 };
 
 static struct xtables_target mark_tg_reg_v2 = {
-       .version       = IPTABLES_VERSION,
+       .version       = XTABLES_VERSION,
        .name          = "MARK",
        .revision      = 2,
        .family        = AF_UNSPEC,
index d4dc971c45d0595e62e00f4969987be46d3cd137..e5b6719c02404fb05fbb39bb3446418d7fe3090a 100644 (file)
@@ -24,12 +24,11 @@ static const struct option NFLOG_opts[] = {
 
 static void NFLOG_help(void)
 {
-       printf("NFLOG v%s options:\n"
+       printf("NFLOG target options:\n"
               " --nflog-group NUM              NETLINK group used for logging\n"
               " --nflog-range NUM              Number of byte to copy\n"
               " --nflog-threshold NUM          Message threshold of in-kernel queue\n"
-              " --nflog-prefix STRING          Prefix string for log messages\n\n",
-              IPTABLES_VERSION);
+              " --nflog-prefix STRING          Prefix string for log messages\n");
 }
 
 static void NFLOG_init(struct xt_entry_target *t)
@@ -142,7 +141,7 @@ static void NFLOG_save(const void *ip, const struct xt_entry_target *target)
 static struct xtables_target nflog_target = {
        .family         = AF_INET,
        .name           = "NFLOG",
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_nflog_info)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_nflog_info)),
        .help           = NFLOG_help,
@@ -156,7 +155,7 @@ static struct xtables_target nflog_target = {
 static struct xtables_target nflog_target6 = {
        .family         = AF_INET6,
        .name           = "NFLOG",
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_nflog_info)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_nflog_info)),
        .help           = NFLOG_help,
index b1c5ef3a4523821b22d9604048a717234f5edad4..49d0ebcf9af9509bf1f94eb43800e42843553e46 100644 (file)
@@ -83,7 +83,7 @@ static void NFQUEUE_save(const void *ip, const struct xt_entry_target *target)
 static struct xtables_target nfqueue_target = {
        .family         = AF_INET,
        .name           = "NFQUEUE",
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_NFQ_info)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_NFQ_info)),
        .help           = NFQUEUE_help,
@@ -96,7 +96,7 @@ static struct xtables_target nfqueue_target = {
 static struct xtables_target nfqueue_target6 = {
        .family         = AF_INET6,
        .name           = "NFQUEUE",
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_NFQ_info)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_NFQ_info)),
        .help           = NFQUEUE_help,
index 18ad5e1358b794771963336fe538ff79c2985fb2..83ad8171685194627a8ef09be3714468c43c5176 100644 (file)
@@ -10,9 +10,7 @@
 /* Function which prints out usage message. */
 static void NOTRACK_help(void)
 {
-       printf(
-"NOTRACK target v%s takes no options\n",
-IPTABLES_VERSION);
+       printf("NOTRACK target takes no options\n");
 }
 
 /* Function which parses command options; returns true if it
@@ -27,7 +25,7 @@ NOTRACK_parse(int c, char **argv, int invert, unsigned int *flags,
 static struct xtables_target notrack_target = {
        .family         = AF_INET,
        .name           = "NOTRACK",
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(0),
        .userspacesize  = XT_ALIGN(0),
        .help           = NOTRACK_help,
@@ -37,7 +35,7 @@ static struct xtables_target notrack_target = {
 static struct xtables_target notrack_target6 = {
        .family         = AF_INET6,
        .name           = "NOTRACK",
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(0),
        .userspacesize  = XT_ALIGN(0),
        .help           = NOTRACK_help,
index ee0d116da1fcea27af7a8a221c05a85f9b461050..cf1284f054e1d7bc9d51b610c3acbac5bf328473 100644 (file)
@@ -21,8 +21,7 @@ RATEEST_help(void)
 "RATEEST target options:\n"
 "  --rateest-name name         Rate estimator name\n"
 "  --rateest-interval sec      Rate measurement interval in seconds\n"
-"  --rateest-ewmalog value     Rate measurement averaging time constant\n"
-"\n");
+"  --rateest-ewmalog value     Rate measurement averaging time constant\n");
 }
 
 enum RATEEST_options {
@@ -205,7 +204,7 @@ RATEEST_save(const void *ip, const struct xt_entry_target *target)
 static struct xtables_target rateest_tg_reg = {
        .family         = AF_UNSPEC,
        .name           = "RATEEST",
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_rateest_target_info)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_rateest_target_info)),
        .help           = RATEEST_help,
index 92ba527baa05f5e56e82775a73ae1a63ed52b2ac..feee0e4373e4e6dc595adf6b206bdac2444b790b 100644 (file)
 static void SECMARK_help(void)
 {
        printf(
-"SECMARK target v%s options:\n"
-"  --selctx value                     Set the SELinux security context\n"
-"\n",
-IPTABLES_VERSION);
+"SECMARK target options:\n"
+"  --selctx value                     Set the SELinux security context\n");
 }
 
 static const struct option SECMARK_opts[] = {
@@ -102,7 +100,7 @@ static void SECMARK_save(const void *ip, const struct xt_entry_target *target)
 static struct xtables_target secmark_target = {
        .family         = AF_UNSPEC,
        .name           = "SECMARK",
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .revision       = 0,
        .size           = XT_ALIGN(sizeof(struct xt_secmark_target_info)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_secmark_target_info)),
index 9ab69bfed4f0dc9d5ceff0518dd29eb34745f699..fbf73c9ae9661286081b1ed7460b0e544feb60d0 100644 (file)
@@ -20,10 +20,10 @@ struct mssinfo {
 static void __TCPMSS_help(int hdrsize)
 {
        printf(
-"TCPMSS target v%s mutually-exclusive options:\n"
+"TCPMSS target mutually-exclusive options:\n"
 "  --set-mss value               explicitly set MSS option to specified value\n"
 "  --clamp-mss-to-pmtu           automatically clamp MSS value to (path_MTU - %d)\n",
-IPTABLES_VERSION, hdrsize);
+hdrsize);
 }
 
 static void TCPMSS_help(void)
@@ -126,7 +126,7 @@ static void TCPMSS_save(const void *ip, const struct xt_entry_target *target)
 static struct xtables_target tcpmss_target = {
        .family         = AF_INET,
        .name           = "TCPMSS",
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_tcpmss_info)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_tcpmss_info)),
        .help           = TCPMSS_help,
@@ -140,7 +140,7 @@ static struct xtables_target tcpmss_target = {
 static struct xtables_target tcpmss_target6 = {
        .family         = AF_INET6,
        .name           = "TCPMSS",
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_tcpmss_info)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_tcpmss_info)),
        .help           = TCPMSS_help6,
index bd66435369ea2d15a91a9161f3ebb586feeefb8a..bd74e379a7f6a8d4f58010afe3f9a1f613e3d414 100644 (file)
@@ -176,7 +176,7 @@ tcpoptstrip_tg_save(const void *ip, const struct xt_entry_target *target)
 }
 
 static struct xtables_target tcpoptstrip_tg_reg = {
-       .version       = IPTABLES_VERSION,
+       .version       = XTABLES_VERSION,
        .name          = "TCPOPTSTRIP",
        .family        = AF_INET,
        .size          = XT_ALIGN(sizeof(struct xt_tcpoptstrip_target_info)),
@@ -191,7 +191,7 @@ static struct xtables_target tcpoptstrip_tg_reg = {
 };
 
 static struct xtables_target tcpoptstrip_tg6_reg = {
-       .version       = IPTABLES_VERSION,
+       .version       = XTABLES_VERSION,
        .name          = "TCPOPTSTRIP",
        .family        = AF_INET6,
        .size          = XT_ALIGN(sizeof(struct xt_tcpoptstrip_target_info)),
index 777d7cfbc269d6b4bf25bae945c1f0523a910659..9ce8473f4eb4940667cba316563c66e9f0084f26 100644 (file)
@@ -59,7 +59,7 @@ static void tos_tg_help(void)
 "  --set-tos symbol        Set TOS field (IPv4 only) by symbol\n"
 "                          (this zeroes the 4-bit Precedence part!)\n"
 "                          Accepted symbolic names for value are:\n",
-IPTABLES_VERSION);
+XTABLES_VERSION);
 
        for (symbol = tos_symbol_names; symbol->name != NULL; ++symbol)
                printf("                            (0x%02x) %2u %s\n",
@@ -205,7 +205,7 @@ static void tos_tg_save(const void *ip, const struct xt_entry_target *target)
 }
 
 static struct xtables_target tos_tg_reg_v0 = {
-       .version       = IPTABLES_VERSION,
+       .version       = XTABLES_VERSION,
        .name          = "TOS",
        .revision      = 0,
        .family        = AF_INET,
@@ -220,7 +220,7 @@ static struct xtables_target tos_tg_reg_v0 = {
 };
 
 static struct xtables_target tos_tg_reg = {
-       .version       = IPTABLES_VERSION,
+       .version       = XTABLES_VERSION,
        .name          = "TOS",
        .revision      = 1,
        .family        = AF_INET,
@@ -235,7 +235,7 @@ static struct xtables_target tos_tg_reg = {
 };
 
 static struct xtables_target tos_tg6_reg = {
-       .version       = IPTABLES_VERSION,
+       .version       = XTABLES_VERSION,
        .name          = "TOS",
        .family        = AF_INET6,
        .revision      = 1,
index 97e3a03f1102bcda06d5038c4a4c2e409e802ad6..4b0bac83cc8785d6c7ff6f8b1bb433d5c975d045 100644 (file)
@@ -10,9 +10,7 @@
 /* Function which prints out usage message. */
 static void TRACE_help(void)
 {
-       printf(
-"TRACE target v%s takes no options\n",
-IPTABLES_VERSION);
+       printf("TRACE target takes no options\n");
 }
 
 /* Function which parses command options; returns true if it
@@ -26,7 +24,7 @@ static int TRACE_parse(int c, char **argv, int invert, unsigned int *flags,
 static struct xtables_target trace_target = {
        .family         = AF_UNSPEC,
        .name           = "TRACE",
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(0),
        .userspacesize  = XT_ALIGN(0),
        .help           = TRACE_help,
index 20277d4c53669854fbdd6f47a4d9a4981c237d03..abbb6cbedabc9f964d6a2cfe4da162cc788b3839 100644 (file)
@@ -18,9 +18,8 @@
 static void comment_help(void)
 {
        printf(
-               "COMMENT match options:\n"
-               "--comment COMMENT             Attach a comment to a rule\n\n"
-               );
+               "comment match options:\n"
+               "--comment COMMENT             Attach a comment to a rule\n");
 }
 
 static const struct option comment_opts[] = {
@@ -96,7 +95,7 @@ comment_save(const void *ip, const struct xt_entry_match *match)
 static struct xtables_match comment_match = {
        .family         = AF_INET,
        .name           = "comment",
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_comment_info)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_comment_info)),
        .help           = comment_help,
@@ -110,7 +109,7 @@ static struct xtables_match comment_match = {
 static struct xtables_match comment_match6 = {
        .family         = AF_INET6,
        .name           = "comment",
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_comment_info)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_comment_info)),
        .help           = comment_help,
index e6cb1f400376c520b32eca69c4adc7e86030b011..64faa8f1fdc8b78e9e61a89b2a3ccb91110b09be 100644 (file)
 static void connbytes_help(void)
 {
        printf(
-"connbytes v%s options:\n"
+"connbytes match options:\n"
 " [!] --connbytes from:[to]\n"
 "     --connbytes-dir [original, reply, both]\n"
-"     --connbytes-mode [packets, bytes, avgpkt]\n"
-"\n", IPTABLES_VERSION);
+"     --connbytes-mode [packets, bytes, avgpkt]\n");
 }
 
 static const struct option connbytes_opts[] = {
@@ -188,7 +187,7 @@ static void connbytes_save(const void *ip, const struct xt_entry_match *match)
 static struct xtables_match connbytes_match = {
        .family         = AF_INET,
        .name           = "connbytes",
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_connbytes_info)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_connbytes_info)),
        .help           = connbytes_help,
@@ -202,7 +201,7 @@ static struct xtables_match connbytes_match = {
 static struct xtables_match connbytes_match6 = {
        .family         = AF_INET6,
        .name           = "connbytes",
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_connbytes_info)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_connbytes_info)),
        .help           = connbytes_help,
index 9e2137acbe88dad3672d44839c5fe6a2efc726bc..3474ce5f897e19bef28593c22110143f3e784cba 100644 (file)
 static void connlimit_help(void)
 {
        printf(
-"connlimit v%s options:\n"
+"connlimit match options:\n"
 "[!] --connlimit-above n        match if the number of existing "
 "                               connections is (not) above n\n"
-"    --connlimit-mask n         group hosts using mask\n"
-"\n", IPTABLES_VERSION);
+"    --connlimit-mask n         group hosts using mask\n");
 }
 
 static const struct option connlimit_opts[] = {
@@ -181,7 +180,7 @@ static void connlimit_save6(const void *ip, const struct xt_entry_match *match)
 static struct xtables_match connlimit_match = {
        .name          = "connlimit",
        .family        = AF_INET,
-       .version       = IPTABLES_VERSION,
+       .version       = XTABLES_VERSION,
        .size          = XT_ALIGN(sizeof(struct xt_connlimit_info)),
        .userspacesize = offsetof(struct xt_connlimit_info, data),
        .help          = connlimit_help,
@@ -196,7 +195,7 @@ static struct xtables_match connlimit_match = {
 static struct xtables_match connlimit_match6 = {
        .name          = "connlimit",
        .family        = AF_INET6,
-       .version       = IPTABLES_VERSION,
+       .version       = XTABLES_VERSION,
        .size          = XT_ALIGN(sizeof(struct xt_connlimit_info)),
        .userspacesize = offsetof(struct xt_connlimit_info, data),
        .help          = connlimit_help,
index 1e38f7cda38f1c63a0f31ced39426de5f39384d5..eb4060ef8608dd506ccbcc1b19218125b0936bfc 100644 (file)
@@ -36,8 +36,7 @@ static void connmark_mt_help(void)
 {
        printf(
 "connmark match options:\n"
-"[!] --mark value[/mask]    Match ctmark value with optional mask\n"
-"\n");
+"[!] --mark value[/mask]    Match ctmark value with optional mask\n");
 }
 
 static const struct option connmark_mt_opts[] = {
@@ -172,7 +171,7 @@ static struct xtables_match connmark_mt_reg_v0 = {
        .family         = AF_INET,
        .name           = "connmark",
        .revision       = 0,
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_connmark_info)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_connmark_info)),
        .help           = connmark_mt_help,
@@ -187,7 +186,7 @@ static struct xtables_match connmark_mt6_reg_v0 = {
        .family         = AF_INET6,
        .name           = "connmark",
        .revision       = 0,
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_connmark_info)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_connmark_info)),
        .help           = connmark_mt_help,
@@ -199,7 +198,7 @@ static struct xtables_match connmark_mt6_reg_v0 = {
 };
 
 static struct xtables_match connmark_mt_reg = {
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .name           = "connmark",
        .revision       = 1,
        .family         = AF_INET,
@@ -214,7 +213,7 @@ static struct xtables_match connmark_mt_reg = {
 };
 
 static struct xtables_match connmark_mt6_reg = {
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .name           = "connmark",
        .revision       = 1,
        .family         = AF_INET6,
index e3e29f0c420adf1614a29272ecae99f395d1498e..1d339a03d0b0b6ff756b5cb0bea845d66c644a9c 100644 (file)
@@ -44,8 +44,7 @@ static void conntrack_mt_help(void)
 "                               Status(es) to match\n"
 "[!] --ctexpire time[:time]     Match remaining lifetime in seconds against\n"
 "                               value or range of values (inclusive)\n"
-"    --ctdir {ORIGINAL|REPLY}   Flow direction of packet\n"
-"\n");
+"    --ctdir {ORIGINAL|REPLY}   Flow direction of packet\n");
 }
 
 static const struct option conntrack_mt_opts_v0[] = {
@@ -1017,7 +1016,7 @@ static void conntrack_mt6_save(const void *ip,
 }
 
 static struct xtables_match conntrack_match = {
-       .version       = IPTABLES_VERSION,
+       .version       = XTABLES_VERSION,
        .name          = "conntrack",
        .revision      = 0,
        .family        = AF_INET,
@@ -1032,7 +1031,7 @@ static struct xtables_match conntrack_match = {
 };
 
 static struct xtables_match conntrack_mt_reg = {
-       .version       = IPTABLES_VERSION,
+       .version       = XTABLES_VERSION,
        .name          = "conntrack",
        .revision      = 1,
        .family        = AF_INET,
@@ -1047,7 +1046,7 @@ static struct xtables_match conntrack_mt_reg = {
 };
 
 static struct xtables_match conntrack_mt6_reg = {
-       .version       = IPTABLES_VERSION,
+       .version       = XTABLES_VERSION,
        .name          = "conntrack",
        .revision      = 1,
        .family        = AF_INET6,
index 467a695ca97fcb34e1f2351b7c25e9ec4a2655f4..c368ba484946e0d26941cf258d9a245923669dc3 100644 (file)
@@ -35,13 +35,11 @@ static void dccp_init(struct xt_entry_match *m)
 static void dccp_help(void)
 {
        printf(
-"DCCP match v%s options\n"
+"dccp match options\n"
 " --source-port [!] port[:port]                          match source port(s)\n"
 " --sport ...\n"
 " --destination-port [!] port[:port]                     match destination port(s)\n"
-" --dport ...\n"
-,
-       IPTABLES_VERSION);
+" --dport ...\n");
 }
 
 static const struct option dccp_opts[] = {
@@ -342,7 +340,7 @@ static void dccp_save(const void *ip, const struct xt_entry_match *match)
 static struct xtables_match dccp_match = {
        .name           = "dccp",
        .family         = AF_INET,
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_dccp_info)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_dccp_info)),
        .help           = dccp_help,
@@ -356,7 +354,7 @@ static struct xtables_match dccp_match = {
 static struct xtables_match dccp_match6 = {
        .name           = "dccp",
        .family         = AF_INET6,
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_dccp_info)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_dccp_info)),
        .help           = dccp_help,
index a28af0966f2aae9e421230aa78021fd63a5e9db9..6aed4990cc0dfaf45df211e5c191b20789e1d37b 100644 (file)
 static void dscp_help(void)
 {
        printf(
-"DSCP match v%s options\n"
+"dscp match options\n"
 "[!] --dscp value              Match DSCP codepoint with numerical value\n"
 "                              This value can be in decimal (ex: 32)\n"
 "                              or in hex (ex: 0x20)\n"
 "[!] --dscp-class name         Match the DiffServ class. This value may\n"
 "                              be any of the BE,EF, AFxx or CSx classes\n"
 "\n"
-"                              These two options are mutually exclusive !\n"
-                               , IPTABLES_VERSION
-);
+"                              These two options are mutually exclusive !\n");
 }
 
 static const struct option dscp_opts[] = {
@@ -149,7 +147,7 @@ static void dscp_save(const void *ip, const struct xt_entry_match *match)
 static struct xtables_match dscp_match = {
        .family         = AF_INET,
        .name           = "dscp",
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_dscp_info)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_dscp_info)),
        .help           = dscp_help,
@@ -163,7 +161,7 @@ static struct xtables_match dscp_match = {
 static struct xtables_match dscp_match6 = {
        .family         = AF_INET6,
        .name           = "dscp",
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_dscp_info)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_dscp_info)),
        .help           = dscp_help,
index f37c088a2d407beced223a2fed298dac5511dd2c..82749f5b3f794c87b8c67708569c3250a5c4589a 100644 (file)
 static void esp_help(void)
 {
        printf(
-"ESP v%s options:\n"
+"esp match options:\n"
 " --espspi [!] spi[:spi]\n"
-"                              match spi (range)\n",
-IPTABLES_VERSION);
+"                              match spi (range)\n");
 }
 
 static const struct option esp_opts[] = {
@@ -156,7 +155,7 @@ static void esp_save(const void *ip, const struct xt_entry_match *match)
 static struct xtables_match esp_match = {
        .family         = AF_INET,
        .name           = "esp",
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_esp)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_esp)),
        .help           = esp_help,
@@ -170,7 +169,7 @@ static struct xtables_match esp_match = {
 static struct xtables_match esp_match6 = {
        .family         = AF_INET6,
        .name           = "esp",
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_esp)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_esp)),
        .help           = esp_help,
index 45c2db1ae0a8f7c80a368cad02328bc83f6f4112..2f6b3fcdc50e985f42ea54d4471b92c766450f71 100644 (file)
@@ -30,7 +30,7 @@
 static void hashlimit_help(void)
 {
        printf(
-"hashlimit v%s options:\n"
+"hashlimit match options:\n"
 "--hashlimit <avg>             max average match rate\n"
 "                                [Packets per second unless followed by \n"
 "                                /sec /minute /hour /day postfixes]\n"
@@ -41,8 +41,8 @@ static void hashlimit_help(void)
 "[--hashlimit-htable-size <num>]       number of hashtable buckets\n"
 "[--hashlimit-htable-max <num>]        number of hashtable entries\n"
 "[--hashlimit-htable-gcinterval]       interval between garbage collection runs\n"
-"[--hashlimit-htable-expire]   after which time are idle entries expired?\n"
-"\n", IPTABLES_VERSION, XT_HASHLIMIT_BURST);
+"[--hashlimit-htable-expire]   after which time are idle entries expired?\n",
+XT_HASHLIMIT_BURST);
 }
 
 static void hashlimit_mt_help(void)
@@ -671,7 +671,7 @@ hashlimit_mt6_save(const void *ip, const struct xt_entry_match *match)
 static struct xtables_match hashlimit_match = {
        .family         = AF_INET,
        .name           = "hashlimit",
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .revision       = 0,
        .size           = XT_ALIGN(sizeof(struct xt_hashlimit_info)),
        .userspacesize  = offsetof(struct xt_hashlimit_info, hinfo),
@@ -687,7 +687,7 @@ static struct xtables_match hashlimit_match = {
 static struct xtables_match hashlimit_match6 = {
        .family         = AF_INET6,
        .name           = "hashlimit",
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .revision       = 0,
        .size           = XT_ALIGN(sizeof(struct xt_hashlimit_info)),
        .userspacesize  = offsetof(struct xt_hashlimit_info, hinfo),
@@ -701,7 +701,7 @@ static struct xtables_match hashlimit_match6 = {
 };
 
 static struct xtables_match hashlimit_mt_reg = {
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .name           = "hashlimit",
        .revision       = 1,
        .family         = AF_INET,
@@ -717,7 +717,7 @@ static struct xtables_match hashlimit_mt_reg = {
 };
 
 static struct xtables_match hashlimit_mt6_reg = {
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .name           = "hashlimit",
        .revision       = 1,
        .family         = AF_INET6,
index 31ae4fc5788c6954468ee97bd521d24ef7c1943a..ba0b996dc4f0fa91a2c31fbd16726f5a4ccbe862 100644 (file)
 static void helper_help(void)
 {
        printf(
-"helper match v%s options:\n"
-"[!] --helper string        Match helper identified by string\n"
-"\n",
-IPTABLES_VERSION);
+"helper match options:\n"
+"[!] --helper string        Match helper identified by string\n");
 }
 
 static const struct option helper_opts[] = {
@@ -79,7 +77,7 @@ static void helper_save(const void *ip, const struct xt_entry_match *match)
 static struct xtables_match helper_match = {
        .family         = AF_INET,
        .name           = "helper",
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_helper_info)),
        .help           = helper_help,
        .parse          = helper_parse,
@@ -92,7 +90,7 @@ static struct xtables_match helper_match = {
 static struct xtables_match helper_match6 = {
        .family         = AF_INET6,
        .name           = "helper",
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_helper_info)),
        .help           = helper_help,
        .parse          = helper_parse,
index c4fe7cfcb0528d83788d1967c1eaeddcc99acd16..70fcc57318d6b3f1ef17adcb3100fd53f3537d59 100644 (file)
@@ -20,8 +20,7 @@ static void iprange_mt_help(void)
        printf(
 "iprange match options:\n"
 "[!] --src-range ip-ip        Match source IP in the specified range\n"
-"[!] --dst-range ip-ip        Match destination IP in the specified range\n"
-"\n");
+"[!] --dst-range ip-ip        Match destination IP in the specified range\n");
 }
 
 static const struct option iprange_mt_opts[] = {
@@ -339,7 +338,7 @@ static void iprange_mt6_save(const void *ip, const struct xt_entry_match *match)
 }
 
 static struct xtables_match iprange_match = {
-       .version       = IPTABLES_VERSION,
+       .version       = XTABLES_VERSION,
        .name          = "iprange",
        .revision      = 0,
        .family        = AF_INET,
@@ -354,7 +353,7 @@ static struct xtables_match iprange_match = {
 };
 
 static struct xtables_match iprange_mt_reg = {
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .name           = "iprange",
        .revision       = 1,
        .family         = AF_INET,
@@ -369,7 +368,7 @@ static struct xtables_match iprange_mt_reg = {
 };
 
 static struct xtables_match iprange_mt6_reg = {
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .name           = "iprange",
        .revision       = 1,
        .family         = AF_INET6,
index 16e00bd9be4e454754c2a5381c55be6e01099bba..ec305ae4b37b2b401aedb229b0a8378b5c7cc6c5 100644 (file)
 static void length_help(void)
 {
        printf(
-"length v%s options:\n"
+"length match options:\n"
 "[!] --length length[:length]    Match packet length against value or range\n"
-"                                of values (inclusive)\n",
-IPTABLES_VERSION);
-
+"                                of values (inclusive)\n");
 }
   
 static const struct option length_opts[] = {
@@ -127,7 +125,7 @@ static void length_save(const void *ip, const struct xt_entry_match *match)
 static struct xtables_match length_match = {
        .family         = AF_UNSPEC,
        .name           = "length",
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_length_info)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_length_info)),
        .help           = length_help,
index 1c86df9827fc86c650f07a7529a39d58ae79fc73..424635a15ba1250e0d070b3d2fea179bfbf528eb 100644 (file)
 static void limit_help(void)
 {
        printf(
-"limit v%s options:\n"
+"limit match options:\n"
 "--limit avg                   max average match rate: default "XT_LIMIT_AVG"\n"
 "                                [Packets per second unless followed by \n"
 "                                /sec /minute /hour /day postfixes]\n"
-"--limit-burst number          number to match in a burst, default %u\n"
-"\n", IPTABLES_VERSION, XT_LIMIT_BURST);
+"--limit-burst number          number to match in a burst, default %u\n",
+XT_LIMIT_BURST);
 }
 
 static const struct option limit_opts[] = {
@@ -167,7 +167,7 @@ static void limit_save(const void *ip, const struct xt_entry_match *match)
 static struct xtables_match limit_match = {
        .family         = AF_UNSPEC,
        .name           = "limit",
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_rateinfo)),
        .userspacesize  = offsetof(struct xt_rateinfo, prev),
        .help           = limit_help,
index 2284d2ac151f6ef647a9a05aaab9ff663241c50e..f13d90522918b498adb5c5a1cdf06638f36a1e70 100644 (file)
 static void mac_help(void)
 {
        printf(
-"MAC v%s options:\n"
+"mac match options:\n"
 " --mac-source [!] XX:XX:XX:XX:XX:XX\n"
-"                              Match source MAC address\n"
-"\n", IPTABLES_VERSION);
+"                              Match source MAC address\n");
 }
 
 static const struct option mac_opts[] = {
@@ -118,7 +117,7 @@ static void mac_save(const void *ip, const struct xt_entry_match *match)
 static struct xtables_match mac_match = {
        .family         = AF_INET,
        .name           = "mac",
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_mac_info)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_mac_info)),
        .help           = mac_help,
@@ -132,7 +131,7 @@ static struct xtables_match mac_match = {
 static struct xtables_match mac_match6 = {
        .family         = AF_INET6,
        .name           = "mac",
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_mac_info)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_mac_info)),
        .help           = mac_help,
index fab8ecb94ee39af838b4f8a9b4c5ede37f87477e..1e07676ec59428e4d5bcd7991689f46d2d86eceb 100644 (file)
@@ -17,8 +17,7 @@ static void mark_mt_help(void)
 {
        printf(
 "mark match options:\n"
-"[!] --mark value[/mask]    Match nfmark value with optional mask\n"
-"\n");
+"[!] --mark value[/mask]    Match nfmark value with optional mask\n");
 }
 
 static const struct option mark_mt_opts[] = {
@@ -152,7 +151,7 @@ static struct xtables_match mark_match = {
        .family         = AF_UNSPEC,
        .name           = "mark",
        .revision       = 0,
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_mark_info)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_mark_info)),
        .help           = mark_mt_help,
@@ -164,7 +163,7 @@ static struct xtables_match mark_match = {
 };
 
 static struct xtables_match mark_mt_reg = {
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .name           = "mark",
        .revision       = 1,
        .family         = AF_UNSPEC,
index 6de7bc1dff90c459694a1f10703e612b2c8aa29e..413f178db4883d07abeb6f116fbe7b5dba7beb65 100644 (file)
@@ -15,7 +15,7 @@
 static void multiport_help(void)
 {
        printf(
-"multiport v%s options:\n"
+"multiport match options:\n"
 " --source-ports port[,port,port...]\n"
 " --sports ...\n"
 "                              match source port(s)\n"
@@ -24,14 +24,13 @@ static void multiport_help(void)
 "                              match destination port(s)\n"
 " --ports port[,port,port]\n"
 "                              match both source and destination port(s)\n"
-" NOTE: this kernel does not support port ranges in multiport.\n",
-IPTABLES_VERSION);
+" NOTE: this kernel does not support port ranges in multiport.\n");
 }
 
 static void multiport_help_v1(void)
 {
        printf(
-"multiport v%s options:\n"
+"multiport match options:\n"
 " --source-ports [!] port[,port:port,port...]\n"
 " --sports ...\n"
 "                              match source port(s)\n"
@@ -39,8 +38,7 @@ static void multiport_help_v1(void)
 " --dports ...\n"
 "                              match destination port(s)\n"
 " --ports [!] port[,port:port,port]\n"
-"                              match both source and destination port(s)\n",
-IPTABLES_VERSION);
+"                              match both source and destination port(s)\n");
 }
 
 static const struct option multiport_opts[] = {
@@ -513,7 +511,7 @@ static struct xtables_match multiport_match = {
        .family         = AF_INET,
        .name           = "multiport",
        .revision       = 0,
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_multiport)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_multiport)),
        .help           = multiport_help,
@@ -528,7 +526,7 @@ static struct xtables_match multiport_match6 = {
        .family         = AF_INET6,
        .name           = "multiport",
        .revision       = 0,
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_multiport)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_multiport)),
        .help           = multiport_help,
@@ -542,7 +540,7 @@ static struct xtables_match multiport_match6 = {
 static struct xtables_match multiport_match_v1 = {
        .family         = AF_INET,
        .name           = "multiport",
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .revision       = 1,
        .size           = XT_ALIGN(sizeof(struct xt_multiport_v1)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_multiport_v1)),
@@ -557,7 +555,7 @@ static struct xtables_match multiport_match_v1 = {
 static struct xtables_match multiport_match6_v1 = {
        .family         = AF_INET6,
        .name           = "multiport",
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .revision       = 1,
        .size           = XT_ALIGN(sizeof(struct xt_multiport_v1)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_multiport_v1)),
index ea86f998783dd01fbfb0d80fd5cbe758b930b4fd..85c9602a91cba3dfc611f40f2c542eef26799f1c 100644 (file)
@@ -37,8 +37,7 @@ static void owner_mt_help_v0(void)
 "[!] --pid-owner processid    Match local PID\n"
 "[!] --sid-owner sessionid    Match local SID\n"
 "[!] --cmd-owner name         Match local command name\n"
-"NOTE: PID, SID and command matching are broken on SMP\n"
-"\n");
+"NOTE: PID, SID and command matching are broken on SMP\n");
 #else
        printf(
 "owner match options:\n"
@@ -46,8 +45,7 @@ static void owner_mt_help_v0(void)
 "[!] --gid-owner groupid      Match local GID\n"
 "[!] --pid-owner processid    Match local PID\n"
 "[!] --sid-owner sessionid    Match local SID\n"
-"NOTE: PID and SID matching are broken on SMP\n"
-"\n");
+"NOTE: PID and SID matching are broken on SMP\n");
 #endif /* IPT_OWNER_COMM */
 }
 
@@ -59,8 +57,7 @@ static void owner_mt6_help_v0(void)
 "[!] --gid-owner groupid      Match local GID\n"
 "[!] --pid-owner processid    Match local PID\n"
 "[!] --sid-owner sessionid    Match local SID\n"
-"NOTE: PID and SID matching are broken on SMP\n"
-"\n");
+"NOTE: PID and SID matching are broken on SMP\n");
 }
 
 static void owner_mt_help(void)
@@ -69,8 +66,7 @@ static void owner_mt_help(void)
 "owner match options:\n"
 "[!] --uid-owner userid[-userid]      Match local UID\n"
 "[!] --gid-owner groupid[-groupid]    Match local GID\n"
-"[!] --socket-exists                  Match if socket exists\n"
-"\n");
+"[!] --socket-exists                  Match if socket exists\n");
 }
 
 static const struct option owner_mt_opts_v0[] = {
@@ -532,7 +528,7 @@ static void owner_mt_save(const void *ip, const struct xt_entry_match *match)
 }
 
 static struct xtables_match owner_mt_reg_v0 = {
-       .version       = IPTABLES_VERSION,
+       .version       = XTABLES_VERSION,
        .name          = "owner",
        .revision      = 0,
        .family        = AF_INET,
@@ -547,7 +543,7 @@ static struct xtables_match owner_mt_reg_v0 = {
 };
 
 static struct xtables_match owner_mt6_reg_v0 = {
-       .version       = IPTABLES_VERSION,
+       .version       = XTABLES_VERSION,
        .name          = "owner",
        .revision      = 0,
        .family        = AF_INET6,
@@ -562,7 +558,7 @@ static struct xtables_match owner_mt6_reg_v0 = {
 };
 
 static struct xtables_match owner_mt_reg = {
-       .version       = IPTABLES_VERSION,
+       .version       = XTABLES_VERSION,
        .name          = "owner",
        .revision      = 1,
        .family        = AF_INET,
@@ -577,7 +573,7 @@ static struct xtables_match owner_mt_reg = {
 };
 
 static struct xtables_match owner_mt6_reg = {
-       .version       = IPTABLES_VERSION,
+       .version       = XTABLES_VERSION,
        .name          = "owner",
        .revision      = 1,
        .family        = AF_INET6,
index e971d1e14de87fdc7a1ef49c7c00f9b265add45c..34547c8e16c97ac1674204a475783536f6619799 100644 (file)
 static void physdev_help(void)
 {
        printf(
-"physdev v%s options:\n"
+"physdev match options:\n"
 " --physdev-in [!] input name[+]               bridge port name ([+] for wildcard)\n"
 " --physdev-out [!] output name[+]     bridge port name ([+] for wildcard)\n"
 " [!] --physdev-is-in                  arrived on a bridge device\n"
 " [!] --physdev-is-out                 will leave on a bridge device\n"
-" [!] --physdev-is-bridged             it's a bridged packet\n"
-"\n", IPTABLES_VERSION);
+" [!] --physdev-is-bridged             it's a bridged packet\n");
 }
 
 static const struct option physdev_opts[] = {
@@ -165,7 +164,7 @@ static void physdev_save(const void *ip, const struct xt_entry_match *match)
 static struct xtables_match physdev_match = {
        .family         = AF_INET,
        .name           = "physdev",
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_physdev_info)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_physdev_info)),
        .help           = physdev_help,
@@ -179,7 +178,7 @@ static struct xtables_match physdev_match = {
 static struct xtables_match physdev_match6 = {
        .family         = AF_INET6,
        .name           = "physdev",
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_physdev_info)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_physdev_info)),
        .help           = physdev_help,
index 7c469a8d191b2d3e34b9ebfc4d248618144e945d..69c6da8e1de33c54227b50a7f9bbc41e2136f63b 100644 (file)
@@ -58,9 +58,8 @@ static void print_types(void)
 static void pkttype_help(void)
 {
        printf(
-"pkttype v%s options:\n"
-"  --pkt-type [!] packettype\tmatch packet type\n"
-"\n", PKTTYPE_VERSION);
+"pkttype match options:\n"
+"  --pkt-type [!] packettype\tmatch packet type\n");
        print_types();
 }
 
@@ -149,7 +148,7 @@ static void pkttype_save(const void *ip, const struct xt_entry_match *match)
 static struct xtables_match pkttype_match = {
        .family         = AF_UNSPEC,
        .name           = "pkttype",
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_pkttype_info)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_pkttype_info)),
        .help           = pkttype_help,
index 590dbfbf8bcbafa8c570c829ea3d204b93be32bd..a642aa4969b7e52145e6abc0ec490b742c1a7820 100644 (file)
@@ -19,8 +19,8 @@ static const struct option quota_opts[] = {
 /* print usage */
 static void quota_help(void)
 {
-       printf("quota options:\n"
-              " --quota quota                  quota (bytes)\n" "\n");
+       printf("quota match options:\n"
+              " --quota quota                  quota (bytes)\n");
 }
 
 /* print matchinfo */
@@ -80,7 +80,7 @@ quota_parse(int c, char **argv, int invert, unsigned int *flags,
 struct xtables_match quota_match = {
        .family         = AF_UNSPEC,
        .name           = "quota",
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof (struct xt_quota_info)),
        .userspacesize  = offsetof(struct xt_quota_info, quota),
        .help           = quota_help,
index a335781d65eb8fdd76223d7c95032ad6f87daf7f..ebea43763fe042446036fac9f44fadb4c7d4c54e 100644 (file)
@@ -13,7 +13,7 @@ static struct xt_rateest_match_info *rateest_info;
 static void rateest_help(void)
 {
        printf(
-"rateest match v%s options:\n"
+"rateest match options:\n"
 " --rateest1 name              Rate estimator name\n"
 " --rateest2 name              Rate estimator name\n"
 " --rateest-delta              Compare difference(s) to given rate(s)\n"
@@ -23,9 +23,7 @@ static void rateest_help(void)
 " --rateest-pps2 [pps]         Compare pps\n"
 " [!] --rateest-lt             Match if rate is less than given rate/estimator\n"
 " [!] --rateest-gt             Match if rate is greater than given rate/estimator\n"
-" [!] --rateest-eq             Match if rate is equal to given rate/estimator\n"
-"\n",
-              IPTABLES_VERSION);
+" [!] --rateest-eq             Match if rate is equal to given rate/estimator\n");
 }
 
 enum rateest_options {
@@ -429,7 +427,7 @@ rateest_save(const void *ip, const struct xt_entry_match *match)
 static struct xtables_match rateest_mt_reg = {
        .family         = AF_UNSPEC,
        .name           = "rateest",
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_rateest_match_info)),
        .userspacesize  = XT_ALIGN(offsetof(struct xt_rateest_match_info, est1)),
        .help           = rateest_help,
index 2ca157206ff5b2b3611a95af437c3ccca9c07e8d..653b601bef104bb80d8544495832f71082f00f73 100644 (file)
@@ -56,15 +56,14 @@ static void sctp_init(struct xt_entry_match *m)
 static void sctp_help(void)
 {
        printf(
-"SCTP match v%s options\n"
+"sctp match options\n"
 " --source-port [!] port[:port]                          match source port(s)\n"
 " --sport ...\n"
 " --destination-port [!] port[:port]                     match destination port(s)\n"
 " --dport ...\n" 
 " --chunk-types [!] (all|any|none) (chunktype[:flags])+        match if all, any or none of\n"
 "                                                      chunktypes are present\n"
-"chunktypes - DATA INIT INIT_ACK SACK HEARTBEAT HEARTBEAT_ACK ABORT SHUTDOWN SHUTDOWN_ACK ERROR COOKIE_ECHO COOKIE_ACK ECN_ECNE ECN_CWR SHUTDOWN_COMPLETE ASCONF ASCONF_ACK ALL NONE\n",
-       IPTABLES_VERSION);
+"chunktypes - DATA INIT INIT_ACK SACK HEARTBEAT HEARTBEAT_ACK ABORT SHUTDOWN SHUTDOWN_ACK ERROR COOKIE_ECHO COOKIE_ACK ECN_ECNE ECN_CWR SHUTDOWN_COMPLETE ASCONF ASCONF_ACK ALL NONE\n");
 }
 
 static const struct option sctp_opts[] = {
@@ -514,7 +513,7 @@ static void sctp_save(const void *ip, const struct xt_entry_match *match)
 static struct xtables_match sctp_match = {
        .name           = "sctp",
        .family         = AF_INET,
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_sctp_info)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_sctp_info)),
        .help           = sctp_help,
@@ -528,7 +527,7 @@ static struct xtables_match sctp_match = {
 static struct xtables_match sctp_match6 = {
        .name           = "sctp",
        .family         = AF_INET6,
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_sctp_info)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_sctp_info)),
        .help           = sctp_help,
index a50cffe98e8e8caac97b6d8bd17c11705f65a461..505f87d7dcfa9e8677d3db67383742e02fcaff41 100644 (file)
@@ -11,8 +11,8 @@
 static void standard_help(void)
 {
        printf(
-"Standard v%s options:\n"
-"(If target is DROP, ACCEPT, RETURN or nothing)\n", IPTABLES_VERSION);
+"standard match options:\n"
+"(If target is DROP, ACCEPT, RETURN or nothing)\n");
 }
 
 /* Function which parses command options; returns true if it
@@ -26,7 +26,7 @@ static int standard_parse(int c, char **argv, int invert, unsigned int *flags,
 static struct xtables_target standard_target = {
        .family         = AF_UNSPEC,
        .name           = "standard",
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(int)),
        .userspacesize  = XT_ALIGN(sizeof(int)),
        .help           = standard_help,
index 5b8beea1d3773747ccf8d6980eab962150aad7bc..c37fd700ea4dc99cc6af62633c21c741b4ed6efd 100644 (file)
@@ -17,10 +17,9 @@ static void
 state_help(void)
 {
        printf(
-"state v%s options:\n"
+"state match options:\n"
 " [!] --state [INVALID|ESTABLISHED|NEW|RELATED|UNTRACKED][,...]\n"
-"                              State(s) to match\n"
-"\n", IPTABLES_VERSION);
+"                              State(s) to match\n");
 }
 
 static const struct option state_opts[] = {
@@ -145,7 +144,7 @@ static void state_save(const void *ip, const struct xt_entry_match *match)
 static struct xtables_match state_match = { 
        .family         = AF_INET,
        .name           = "state",
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_state_info)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_state_info)),
        .help           = state_help,
@@ -159,7 +158,7 @@ static struct xtables_match state_match = {
 static struct xtables_match state_match6 = { 
        .family         = AF_INET6,
        .name           = "state",
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_state_info)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_state_info)),
        .help           = state_help,
index 2c2464dcfed1c1ac4a641feb8d6b83a7823d886b..114b41972ca76ca7253cbf00d564a7b2d32cacd2 100644 (file)
 static void statistic_help(void)
 {
        printf(
-"statistic match v%s options:\n"
+"statistic match options:\n"
 " --mode mode                    Match mode (random, nth)\n"
 " random mode:\n"
 " --probability p               Probability\n"
 " nth mode:\n"
 " --every n                     Match every nth packet\n"
-" --packet p                    Initial counter value (0 <= p <= n-1, default 0)\n"
-"\n",
-IPTABLES_VERSION);
+" --packet p                    Initial counter value (0 <= p <= n-1, default 0)\n");
 }
 
 static const struct option statistic_opts[] = {
@@ -166,7 +164,7 @@ static void statistic_save(const void *ip, const struct xt_entry_match *match)
 static struct xtables_match statistic_match = {
        .family         = AF_UNSPEC,
        .name           = "statistic",
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_statistic_info)),
        .userspacesize  = offsetof(struct xt_statistic_info, u.nth.count),
        .init           = statistic_mt_init,
index dc2cd9d3ebfd594f91ddd4188de2eb076b720b70..82deb2a4bb93a3953ddb31ab22779023c417f073 100644 (file)
 static void string_help(void)
 {
        printf(
-"STRING match v%s options:\n"
+"string match options:\n"
 "--from                       Offset to start searching from\n"
 "--to                         Offset to stop searching\n"
 "--algo                              Algorithm\n"
 "--string [!] string          Match a string in a packet\n"
-"--hex-string [!] string      Match a hex string in a packet\n",
-IPTABLES_VERSION);
+"--hex-string [!] string      Match a hex string in a packet\n");
 }
 
 static const struct option string_opts[] = {
@@ -328,7 +327,7 @@ static void string_save(const void *ip, const struct xt_entry_match *match)
 static struct xtables_match string_match = {
     .name              = "string",
     .family            = AF_UNSPEC,
-    .version           = IPTABLES_VERSION,
+    .version           = XTABLES_VERSION,
     .size              = XT_ALIGN(sizeof(struct xt_string_info)),
     .userspacesize     = offsetof(struct xt_string_info, config),
     .help              = string_help,
index 3274f08c3c90d41ef6abaf92342242e0e0053c5d..743c5a23645a8bd40b13d0f0ebc2d8e8ccaa4a74 100644 (file)
@@ -11,7 +11,7 @@
 static void tcp_help(void)
 {
        printf(
-"TCP v%s options:\n"
+"tcp match options:\n"
 " --tcp-flags [!] mask comp    match when TCP flags & mask == comp\n"
 "                              (Flags: SYN ACK FIN RST URG PSH ALL NONE)\n"
 "[!] --syn                     match when only SYN flag set\n"
@@ -22,8 +22,7 @@ static void tcp_help(void)
 " --destination-port [!] port[:port]\n"
 " --dport ...\n"
 "                              match destination port(s)\n"
-" --tcp-option [!] number       match if TCP option set\n\n",
-IPTABLES_VERSION);
+" --tcp-option [!] number       match if TCP option set\n");
 }
 
 static const struct option tcp_opts[] = {
@@ -386,7 +385,7 @@ static void tcp_save(const void *ip, const struct xt_entry_match *match)
 static struct xtables_match tcp_match = {
        .family         = AF_INET,
        .name           = "tcp",
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_tcp)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_tcp)),
        .help           = tcp_help,
@@ -400,7 +399,7 @@ static struct xtables_match tcp_match = {
 static struct xtables_match tcp_match6 = {
        .family         = AF_INET6,
        .name           = "tcp",
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_tcp)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_tcp)),
        .help           = tcp_help,
index 7a026bf71acb20d56cba31df6f335857667959bd..8f56a41c95c19e8f83354caf567f6be29e2f2f7c 100644 (file)
 static void tcpmss_help(void)
 {
        printf(
-"tcpmss match v%s options:\n"
+"tcpmss match options:\n"
 "[!] --mss value[:value]       Match TCP MSS range.\n"
-"                              (only valid for TCP SYN or SYN/ACK packets)\n",
-IPTABLES_VERSION);
+"                              (only valid for TCP SYN or SYN/ACK packets)\n");
 }
 
 static const struct option tcpmss_opts[] = {
@@ -128,7 +127,7 @@ static void tcpmss_save(const void *ip, const struct xt_entry_match *match)
 static struct xtables_match tcpmss_match = {
        .family         = AF_INET,
        .name           = "tcpmss",
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_tcpmss_match_info)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_tcpmss_match_info)),
        .help           = tcpmss_help,
@@ -142,7 +141,7 @@ static struct xtables_match tcpmss_match = {
 static struct xtables_match tcpmss_match6 = {
        .family         = AF_INET6,
        .name           = "tcpmss",
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_tcpmss_match_info)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_tcpmss_match_info)),
        .help           = tcpmss_help,
index c551a6fee94098eccf31842b95309017e2d18be4..7072d71e6fe562cfa3581862777d6c1c6a5414a9 100644 (file)
@@ -50,7 +50,7 @@ static const struct option time_opts[] = {
 static void time_help(void)
 {
        printf(
-"TIME v%s options:\n"
+"time match options:\n"
 "  --datestart time     Start and stop time, to be given in ISO 8601\n"
 "  --datestop time      (YYYY[-MM[-DD[Thh[:mm[:ss]]]]])\n"
 "  --timestart time     Start and stop daytime (hh:mm[:ss])\n"
@@ -60,8 +60,7 @@ static void time_help(void)
 "  --weekdays value     List of weekdays on which to match, sep. by comma\n"
 "                       (Possible days: Mon,Tue,Wed,Thu,Fri,Sat,Sun or 1 to 7\n"
 "                       Defaults to all weekdays.)\n"
-"  --localtz/--utc      Time is interpreted as UTC/local time\n",
-IPTABLES_VERSION);
+"  --localtz/--utc      Time is interpreted as UTC/local time\n");
 }
 
 static void time_init(struct xt_entry_match *m)
@@ -467,7 +466,7 @@ static void time_save(const void *ip, const struct xt_entry_match *match)
 static struct xtables_match time_match = {
        .name          = "time",
        .family        = AF_UNSPEC,
-       .version       = IPTABLES_VERSION,
+       .version       = XTABLES_VERSION,
        .size          = XT_ALIGN(sizeof(struct xt_time_info)),
        .userspacesize = XT_ALIGN(sizeof(struct xt_time_info)),
        .help          = time_help,
index 16a90ef53fb2050559b5fc6b520bf8e62b14bddb..92f7d8477456ed1e15b854eeb225b8a50f01e60d 100644 (file)
@@ -138,7 +138,7 @@ static void tos_mt_save(const void *ip, const struct xt_entry_match *match)
 }
 
 static struct xtables_match tos_mt_reg_v0 = {
-       .version       = IPTABLES_VERSION,
+       .version       = XTABLES_VERSION,
        .name          = "tos",
        .family        = AF_INET,
        .revision      = 0,
@@ -153,7 +153,7 @@ static struct xtables_match tos_mt_reg_v0 = {
 };
 
 static struct xtables_match tos_mt_reg = {
-       .version       = IPTABLES_VERSION,
+       .version       = XTABLES_VERSION,
        .name          = "tos",
        .family        = AF_INET,
        .revision      = 1,
@@ -168,7 +168,7 @@ static struct xtables_match tos_mt_reg = {
 };
 
 static struct xtables_match tos_mt6_reg = {
-       .version       = IPTABLES_VERSION,
+       .version       = XTABLES_VERSION,
        .name          = "tos",
        .family        = AF_INET6,
        .revision      = 1,
index 9360c094528b9eaa797135e5ed8c417b643e51c3..3a5cdad6de92c1bdf4851c34f2441810323ecf10 100644 (file)
@@ -30,15 +30,13 @@ static const struct option u32_opts[] = {
 static void u32_help(void)
 {
        printf(
-               "u32 v%s options:\n"
+               "u32 match options:\n"
                "[!] --u32 tests\n"
                "\t\t""tests := location \"=\" value | tests \"&&\" location \"=\" value\n"
                "\t\t""value := range | value \",\" range\n"
                "\t\t""range := number | number \":\" number\n"
                "\t\t""location := number | location operator number\n"
-               "\t\t""operator := \"&\" | \"<<\" | \">>\" | \"@\"\n",
-               IPTABLES_VERSION);
-       return;
+               "\t\t""operator := \"&\" | \"<<\" | \">>\" | \"@\"\n");
 }
 
 static void u32_dump(const struct xt_u32 *data)
@@ -273,7 +271,7 @@ static void u32_save(const void *ip, const struct xt_entry_match *match)
 static struct xtables_match u32_match = {
        .name          = "u32",
        .family        = AF_UNSPEC,
-       .version       = IPTABLES_VERSION,
+       .version       = XTABLES_VERSION,
        .size          = XT_ALIGN(sizeof(struct xt_u32)),
        .userspacesize = XT_ALIGN(sizeof(struct xt_u32)),
        .help          = u32_help,
index 4e83ae8f910c03a47620f79e745417d17555dfa4..9c3665a4095abee7eef026072728334cbdc71f64 100644 (file)
 static void udp_help(void)
 {
        printf(
-"UDP v%s options:\n"
+"udp match options:\n"
 " --source-port [!] port[:port]\n"
 " --sport ...\n"
 "                              match source port(s)\n"
 " --destination-port [!] port[:port]\n"
 " --dport ...\n"
-"                              match destination port(s)\n",
-IPTABLES_VERSION);
+"                              match destination port(s)\n");
 }
 
 static const struct option udp_opts[] = {
@@ -199,7 +198,7 @@ static void udp_save(const void *ip, const struct xt_entry_match *match)
 static struct xtables_match udp_match = {
        .family         = AF_INET,
        .name           = "udp",
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_udp)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_udp)),
        .help           = udp_help,
@@ -213,7 +212,7 @@ static struct xtables_match udp_match = {
 static struct xtables_match udp_match6 = {
        .family         = AF_INET6,
        .name           = "udp",
-       .version        = IPTABLES_VERSION,
+       .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_udp)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_udp)),
        .help           = udp_help,
index e1539eb299f41b62c911729f33b8e75163e8f2aa..0bed11f8b3b7ee98f2058fad7ea8eaf0bedb3ac0 100644 (file)
 #endif /* IP6T_SO_GET_REVISION_MATCH   Old kernel source */
 
 #define ip6tables_rule_match   xtables_rule_match
-#define ip6tables_match                xtables_match
-#define ip6tables_target       xtables_target
 #define ip6t_tryload           xt_tryload
 
 extern int line;
 
 /* Your shared library should call one of these. */
-extern void register_match6(struct ip6tables_match *me);
-extern void register_target6(struct ip6tables_target *me);
-
 extern int do_command6(int argc, char *argv[], char **table,
                       ip6tc_handle_t *handle);
 
index 094c64e754a9c92d4fc941cf3aa0d6cf1505d80f..e5f8b400d7e9a529c4d5e6ba3d68edcc33d8bbfb 100644 (file)
 #endif /* IPT_SO_GET_REVISION_MATCH   Old kernel source */
 
 #define iptables_rule_match    xtables_rule_match
-#define iptables_match         xtables_match
-#define iptables_target                xtables_target
 #define ipt_tryload            xt_tryload
 
 extern int line;
 
 /* Your shared library should call one of these. */
-extern void register_match(struct iptables_match *me);
-extern void register_target(struct iptables_target *me);
-
 extern int do_command(int argc, char *argv[], char **table,
                      iptc_handle_t *handle);
 extern int delete_chain(const ipt_chainlabel chain, int verbose,
index c2703dc5a5c1bde0b97d16f74061d72c6b577d21..6e41d510da69a155d7479527cb5b890df67f9ae7 100644 (file)
@@ -128,7 +128,7 @@ int main(int argc, char *argv[])
        int in_table = 0, testing = 0;
 
        program_name = "ip6tables-restore";
-       program_version = IPTABLES_VERSION;
+       program_version = XTABLES_VERSION;
        line = 0;
 
        lib_dir = getenv("XTABLES_LIBDIR");
@@ -160,7 +160,7 @@ int main(int argc, char *argv[])
                                break;
                        case 'h':
                                print_usage("ip6tables-restore",
-                                           IPTABLES_VERSION);
+                                           XTABLES_VERSION);
                                break;
                        case 'n':
                                noflush = 1;
index 6e2fea5d2968c795c57076e7fa3b49c7207beb56..bd4ccbfe9576f3b6d798afdd48ffb3c28661922f 100644 (file)
@@ -103,7 +103,7 @@ static void print_proto(u_int16_t proto, int invert)
 static int print_match(const struct ip6t_entry_match *e,
                        const struct ip6t_ip6 *ip)
 {
-       struct ip6tables_match *match
+       struct xtables_match *match
                = find_match(e->u.user.name, TRY_LOAD, NULL);
 
        if (match) {
@@ -199,7 +199,7 @@ static void print_rule(const struct ip6t_entry *e,
        /* Print targinfo part */
        t = ip6t_get_target((struct ip6t_entry *)e);
        if (t->u.user.name[0]) {
-               struct ip6tables_target *target
+               struct xtables_target *target
                        = find_target(t->u.user.name, TRY_LOAD);
 
                if (!target) {
@@ -269,7 +269,7 @@ static int do_output(const char *tablename)
                time_t now = time(NULL);
 
                printf("# Generated by ip6tables-save v%s on %s",
-                      IPTABLES_VERSION, ctime(&now));
+                      XTABLES_VERSION, ctime(&now));
                printf("*%s\n", tablename);
 
                /* Dump out chain names first,
@@ -330,7 +330,7 @@ int main(int argc, char *argv[])
        int c;
 
        program_name = "ip6tables-save";
-       program_version = IPTABLES_VERSION;
+       program_version = XTABLES_VERSION;
 
        lib_dir = getenv("XTABLES_LIBDIR");
        if (lib_dir == NULL) {
index 1bb81bc66f00e83a2085f67a3fc2d6978d597c15..5bdcd4fba5ecee5741e27af0944aef0b39d14d02 100644 (file)
@@ -50,7 +50,7 @@ main(int argc, char *argv[])
        ip6tc_handle_t handle = NULL;
 
        program_name = "ip6tables";
-       program_version = IPTABLES_VERSION;
+       program_version = XTABLES_VERSION;
 
        lib_dir = getenv("XTABLES_LIBDIR");
        if (lib_dir == NULL) {
index 908700e25052fa237815027338286042ed4e7249..8bcce0e060aac76209deee8c08c074e6ad34c98b 100644 (file)
@@ -273,7 +273,7 @@ static void
 exit_printhelp(struct ip6tables_rule_match *matches)
 {
        struct ip6tables_rule_match *matchp = NULL;
-       struct ip6tables_target *t = NULL;
+       struct xtables_target *t = NULL;
 
        printf("%s v%s\n\n"
 "Usage: %s -[AD] chain rule-specification [options]\n"
@@ -467,7 +467,7 @@ check_inverse(const char option[], int *invert, int *my_optind, int argc)
 */
 
 /* Christophe Burki wants `-p 6' to imply `-m tcp'.  */
-static struct ip6tables_match *
+static struct xtables_match *
 find_proto(const char *pname, enum ip6t_tryload tryload, int nolookup, struct ip6tables_rule_match **matches)
 {
        unsigned int proto;
@@ -612,18 +612,6 @@ merge_options(struct option *oldopts, const struct option *newopts,
        return merge;
 }
 
-void register_match6(struct ip6tables_match *me)
-{
-       me->family = AF_INET6;
-       xtables_register_match(me);
-}
-
-void register_target6(struct ip6tables_target *me)
-{
-       me->family = AF_INET6;
-       xtables_register_target(me);
-}
-
 static void
 print_num(u_int64_t number, unsigned int format)
 {
@@ -705,7 +693,7 @@ print_match(const struct ip6t_entry_match *m,
            const struct ip6t_ip6 *ip,
            int numeric)
 {
-       struct ip6tables_match *match = find_match(m->u.user.name, TRY_LOAD, NULL);
+       struct xtables_match *match = find_match(m->u.user.name, TRY_LOAD, NULL);
 
        if (match) {
                if (match->print)
@@ -728,7 +716,7 @@ print_firewall(const struct ip6t_entry *fw,
               unsigned int format,
               const ip6tc_handle_t handle)
 {
-       struct ip6tables_target *target = NULL;
+       struct xtables_target *target = NULL;
        const struct ip6t_entry_target *t;
        u_int8_t flags;
        char buf[BUFSIZ];
@@ -1182,11 +1170,11 @@ int do_command6(int argc, char *argv[], char **table, ip6tc_handle_t *handle)
        unsigned int rulenum = 0, options = 0, command = 0;
        const char *pcnt = NULL, *bcnt = NULL;
        int ret = 1;
-       struct ip6tables_match *m;
+       struct xtables_match *m;
        struct ip6tables_rule_match *matches = NULL;
        struct ip6tables_rule_match *matchp;
-       struct ip6tables_target *target = NULL;
-       struct ip6tables_target *t;
+       struct xtables_target *target = NULL;
+       struct xtables_target *t;
        const char *jumpto = "";
        char *protocol = NULL;
        int proto_used = 0;
index ecf7b2d8e9105716e1aa36efd6c1a5fe8b66a9b9..ee3ba45591b4510e765c00767e55acd4d3e2fdb2 100644 (file)
@@ -129,7 +129,7 @@ main(int argc, char *argv[])
        const char *tablename = 0;
 
        program_name = "iptables-restore";
-       program_version = IPTABLES_VERSION;
+       program_version = XTABLES_VERSION;
        line = 0;
 
        lib_dir = getenv("XTABLES_LIBDIR");
@@ -161,7 +161,7 @@ main(int argc, char *argv[])
                                break;
                        case 'h':
                                print_usage("iptables-restore",
-                                           IPTABLES_VERSION);
+                                           XTABLES_VERSION);
                                break;
                        case 'n':
                                noflush = 1;
index 4272202ef1798e5734924191edf1ffe0e3e61a3f..51127cde8b3aadc0390931abab9073331af34284 100644 (file)
@@ -122,7 +122,7 @@ static int non_zero(const void *ptr, size_t size)
 static int print_match(const struct ipt_entry_match *e,
                        const struct ipt_ip *ip)
 {
-       struct iptables_match *match
+       struct xtables_match *match
                = find_match(e->u.user.name, TRY_LOAD, NULL);
 
        if (match) {
@@ -222,7 +222,7 @@ static void print_rule(const struct ipt_entry *e,
        /* Print targinfo part */
        t = ipt_get_target((struct ipt_entry *)e);
        if (t->u.user.name[0]) {
-               struct iptables_target *target
+               struct xtables_target *target
                        = find_target(t->u.user.name, TRY_LOAD);
 
                if (!target) {
@@ -292,7 +292,7 @@ static int do_output(const char *tablename)
                time_t now = time(NULL);
 
                printf("# Generated by iptables-save v%s on %s",
-                      IPTABLES_VERSION, ctime(&now));
+                      XTABLES_VERSION, ctime(&now));
                printf("*%s\n", tablename);
 
                /* Dump out chain names first,
@@ -355,7 +355,7 @@ main(int argc, char *argv[])
        int c;
 
        program_name = "iptables-save";
-       program_version = IPTABLES_VERSION;
+       program_version = XTABLES_VERSION;
 
        lib_dir = getenv("XTABLES_LIBDIR");
        if (lib_dir == NULL) {
index 369adaf93ec4d52531f4452bcb87006a7471777c..55d9bbec32c45d53e34aec4b0f7caccf8e77c52c 100644 (file)
@@ -51,7 +51,7 @@ main(int argc, char *argv[])
        iptc_handle_t handle = NULL;
 
        program_name = "iptables";
-       program_version = IPTABLES_VERSION;
+       program_version = XTABLES_VERSION;
 
        lib_dir = getenv("XTABLES_LIBDIR");
        if (lib_dir == NULL) {
index d922efe90e3c306e4267cda738dcde57eaf2e91d..fea63ef8796e825dec3027bd9a1bc0791a35e82b 100644 (file)
@@ -645,7 +645,7 @@ main(int argc, char *argv[])
        FILE *in;
 
        program_name = "iptables-xml";
-       program_version = IPTABLES_VERSION;
+       program_version = XTABLES_VERSION;
        line = 0;
 
        while ((c = getopt_long(argc, argv, "cvh", options, NULL)) != -1) {
@@ -658,7 +658,7 @@ main(int argc, char *argv[])
                        verbose = 1;
                        break;
                case 'h':
-                       print_usage("iptables-xml", IPTABLES_VERSION);
+                       print_usage("iptables-xml", XTABLES_VERSION);
                        break;
                }
        }
index 0300027cb111d12628f831bc690f999f48d4a57a..db97d08f7fa04c8356329abb9b6e2989ba656c8c 100644 (file)
@@ -276,7 +276,7 @@ static void
 exit_printhelp(struct iptables_rule_match *matches)
 {
        struct iptables_rule_match *matchp = NULL;
-       struct iptables_target *t = NULL;
+       struct xtables_target *t = NULL;
 
        printf("%s v%s\n\n"
 "Usage: %s -[AD] chain rule-specification [options]\n"
@@ -474,7 +474,7 @@ check_inverse(const char option[], int *invert, int *my_optind, int argc)
 */
 
 /* Christophe Burki wants `-p 6' to imply `-m tcp'.  */
-static struct iptables_match *
+static struct xtables_match *
 find_proto(const char *pname, enum ipt_tryload tryload, int nolookup, struct iptables_rule_match **matches)
 {
        unsigned int proto;
@@ -612,18 +612,6 @@ merge_options(struct option *oldopts, const struct option *newopts,
        return merge;
 }
 
-void register_match(struct iptables_match *me)
-{
-       me->family = PF_INET;
-       xtables_register_match(me);
-}
-
-void register_target(struct iptables_target *me)
-{
-       me->family = PF_INET;
-       xtables_register_target(me);
-}
-
 static void
 print_num(u_int64_t number, unsigned int format)
 {
@@ -705,7 +693,7 @@ print_match(const struct ipt_entry_match *m,
            const struct ipt_ip *ip,
            int numeric)
 {
-       struct iptables_match *match = find_match(m->u.user.name, TRY_LOAD, NULL);
+       struct xtables_match *match = find_match(m->u.user.name, TRY_LOAD, NULL);
 
        if (match) {
                if (match->print)
@@ -728,7 +716,7 @@ print_firewall(const struct ipt_entry *fw,
               unsigned int format,
               const iptc_handle_t handle)
 {
-       struct iptables_target *target = NULL;
+       struct xtables_target *target = NULL;
        const struct ipt_entry_target *t;
        u_int8_t flags;
        char buf[BUFSIZ];
@@ -1199,11 +1187,11 @@ int do_command(int argc, char *argv[], char **table, iptc_handle_t *handle)
        unsigned int rulenum = 0, options = 0, command = 0;
        const char *pcnt = NULL, *bcnt = NULL;
        int ret = 1;
-       struct iptables_match *m;
+       struct xtables_match *m;
        struct iptables_rule_match *matches = NULL;
        struct iptables_rule_match *matchp;
-       struct iptables_target *target = NULL;
-       struct iptables_target *t;
+       struct xtables_target *target = NULL;
+       struct xtables_target *t;
        const char *jumpto = "";
        char *protocol = NULL;
        int proto_used = 0;
index 2b788c198b6edfc30aca1924de92cda40becafd8..9463bdbc6f586e16e8fca3e4e7fa75129f07f1c9 100644 (file)
@@ -26,6 +26,7 @@
  */
 #include <sys/types.h>
 #include <sys/socket.h>
+#include <xtables.h>
 
 #include "linux_list.h"
 
@@ -1326,7 +1327,7 @@ TC_DUMP_ENTRIES(const TC_HANDLE_T handle)
        CHECK(handle);
 
        printf("libiptc v%s. %u bytes.\n",
-              IPTABLES_VERSION, handle->entries->size);
+              XTABLES_VERSION, handle->entries->size);
        printf("Table `%s'\n", handle->info.name);
        printf("Hooks: pre/in/fwd/out/post = %u/%u/%u/%u/%u\n",
               handle->info.hook_entry[HOOK_PRE_ROUTING],