From 8b7c64d6ba156a99008fcd810cba874c73294333 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Tue, 15 Apr 2008 11:48:25 +0200 Subject: Remove old functions, constants --- extensions/libip6t_HL.c | 16 ++++++++-------- extensions/libip6t_LOG.c | 24 ++++++++++++------------ extensions/libip6t_REJECT.c | 13 +++++++------ extensions/libip6t_ah.c | 16 ++++++++-------- extensions/libip6t_dst.c | 15 ++++++++------- extensions/libip6t_eui64.c | 16 ++++++++-------- extensions/libip6t_frag.c | 16 ++++++++-------- extensions/libip6t_hbh.c | 15 ++++++++------- extensions/libip6t_hl.c | 16 ++++++++-------- extensions/libip6t_icmp6.c | 16 ++++++++-------- extensions/libip6t_ipv6header.c | 16 ++++++++-------- extensions/libip6t_mh.c | 16 ++++++++-------- extensions/libip6t_policy.c | 16 ++++++++-------- extensions/libip6t_rt.c | 15 ++++++++------- extensions/libipt_CLUSTERIP.c | 15 +++++++-------- extensions/libipt_DNAT.c | 19 +++++++++---------- extensions/libipt_ECN.c | 16 ++++++++-------- extensions/libipt_LOG.c | 16 ++++++++-------- extensions/libipt_MASQUERADE.c | 18 ++++++++---------- extensions/libipt_MIRROR.c | 15 +++++++-------- extensions/libipt_NETMAP.c | 15 ++++++++------- extensions/libipt_REDIRECT.c | 16 ++++++++-------- extensions/libipt_REJECT.c | 13 +++++++------ extensions/libipt_SAME.c | 17 ++++++++--------- extensions/libipt_SET.c | 16 ++++++++-------- extensions/libipt_SNAT.c | 19 +++++++++---------- extensions/libipt_TTL.c | 17 ++++++++--------- extensions/libipt_ULOG.c | 16 ++++++++-------- extensions/libipt_addrtype.c | 16 ++++++++-------- extensions/libipt_ah.c | 16 ++++++++-------- extensions/libipt_ecn.c | 16 ++++++++-------- extensions/libipt_icmp.c | 16 ++++++++-------- extensions/libipt_policy.c | 16 ++++++++-------- extensions/libipt_realm.c | 16 ++++++++-------- extensions/libipt_recent.c | 18 ++++++++---------- extensions/libipt_set.c | 16 ++++++++-------- extensions/libipt_ttl.c | 16 ++++++++-------- extensions/libipt_unclean.c | 15 +++++++-------- extensions/libxt_CLASSIFY.c | 8 +++----- extensions/libxt_CONNMARK.c | 14 ++++++-------- extensions/libxt_CONNSECMARK.c | 10 ++++------ extensions/libxt_DSCP.c | 4 ++-- extensions/libxt_MARK.c | 14 ++++++-------- extensions/libxt_NFLOG.c | 9 ++++----- extensions/libxt_NFQUEUE.c | 4 ++-- extensions/libxt_NOTRACK.c | 8 +++----- extensions/libxt_RATEEST.c | 5 ++--- extensions/libxt_SECMARK.c | 8 +++----- extensions/libxt_TCPMSS.c | 8 ++++---- extensions/libxt_TCPOPTSTRIP.c | 4 ++-- extensions/libxt_TOS.c | 8 ++++---- extensions/libxt_TRACE.c | 6 ++---- extensions/libxt_comment.c | 9 ++++----- extensions/libxt_connbytes.c | 9 ++++----- extensions/libxt_connlimit.c | 9 ++++----- extensions/libxt_connmark.c | 11 +++++------ extensions/libxt_conntrack.c | 9 ++++----- extensions/libxt_dccp.c | 10 ++++------ extensions/libxt_dscp.c | 10 ++++------ extensions/libxt_esp.c | 9 ++++----- extensions/libxt_hashlimit.c | 14 +++++++------- extensions/libxt_helper.c | 10 ++++------ extensions/libxt_iprange.c | 9 ++++----- extensions/libxt_length.c | 8 +++----- extensions/libxt_limit.c | 8 ++++---- extensions/libxt_mac.c | 9 ++++----- extensions/libxt_mark.c | 7 +++---- extensions/libxt_multiport.c | 18 ++++++++---------- extensions/libxt_owner.c | 20 ++++++++------------ extensions/libxt_physdev.c | 9 ++++----- extensions/libxt_pkttype.c | 7 +++---- extensions/libxt_quota.c | 6 +++--- extensions/libxt_rateest.c | 8 +++----- extensions/libxt_sctp.c | 9 ++++----- extensions/libxt_standard.c | 6 +++--- extensions/libxt_state.c | 9 ++++----- extensions/libxt_statistic.c | 8 +++----- extensions/libxt_string.c | 7 +++---- extensions/libxt_tcp.c | 9 ++++----- extensions/libxt_tcpmss.c | 9 ++++----- extensions/libxt_time.c | 7 +++---- extensions/libxt_tos.c | 6 +++--- extensions/libxt_u32.c | 8 +++----- extensions/libxt_udp.c | 9 ++++----- 84 files changed, 481 insertions(+), 540 deletions(-) (limited to 'extensions') diff --git a/extensions/libip6t_HL.c b/extensions/libip6t_HL.c index c20147bd..e726a945 100644 --- a/extensions/libip6t_HL.c +++ b/extensions/libip6t_HL.c @@ -19,11 +19,10 @@ static void HL_help(void) { printf( -"HL target v%s options\n" +"HL target options\n" " --hl-set value Set HL to \n" " --hl-dec value Decrement HL by \n" -" --hl-inc value Increment HL by \n" -, IPTABLES_VERSION); +" --hl-inc value Increment HL by \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); } diff --git a/extensions/libip6t_LOG.c b/extensions/libip6t_LOG.c index 6fd4c0b2..53efae33 100644 --- a/extensions/libip6t_LOG.c +++ b/extensions/libip6t_LOG.c @@ -21,14 +21,13 @@ 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); } diff --git a/extensions/libip6t_REJECT.c b/extensions/libip6t_REJECT.c index 000096ec..d4245e53 100644 --- a/extensions/libip6t_REJECT.c +++ b/extensions/libip6t_REJECT.c @@ -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); } diff --git a/extensions/libip6t_ah.c b/extensions/libip6t_ah.c index 46469eaf..ce2d7fc1 100644 --- a/extensions/libip6t_ah.c +++ b/extensions/libip6t_ah.c @@ -12,11 +12,10 @@ 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); } diff --git a/extensions/libip6t_dst.c b/extensions/libip6t_dst.c index 5b060334..d3c54dd5 100644 --- a/extensions/libip6t_dst.c +++ b/extensions/libip6t_dst.c @@ -15,11 +15,11 @@ 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); } diff --git a/extensions/libip6t_eui64.c b/extensions/libip6t_eui64.c index 45988c46..b93d1215 100644 --- a/extensions/libip6t_eui64.c +++ b/extensions/libip6t_eui64.c @@ -15,10 +15,9 @@ 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); } diff --git a/extensions/libip6t_frag.c b/extensions/libip6t_frag.c index 86f40f42..64e110d3 100644 --- a/extensions/libip6t_frag.c +++ b/extensions/libip6t_frag.c @@ -12,14 +12,13 @@ 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); } diff --git a/extensions/libip6t_hbh.c b/extensions/libip6t_hbh.c index ad12547a..e12fe4ed 100644 --- a/extensions/libip6t_hbh.c +++ b/extensions/libip6t_hbh.c @@ -18,11 +18,11 @@ 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); } diff --git a/extensions/libip6t_hl.c b/extensions/libip6t_hl.c index 7f995988..2af9a206 100644 --- a/extensions/libip6t_hl.c +++ b/extensions/libip6t_hl.c @@ -18,11 +18,10 @@ 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); } diff --git a/extensions/libip6t_icmp6.c b/extensions/libip6t_icmp6.c index 8c9653f7..caecc4f2 100644 --- a/extensions/libip6t_icmp6.c +++ b/extensions/libip6t_icmp6.c @@ -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); } diff --git a/extensions/libip6t_ipv6header.c b/extensions/libip6t_ipv6header.c index c20fb94b..55978726 100644 --- a/extensions/libip6t_ipv6header.c +++ b/extensions/libip6t_ipv6header.c @@ -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); } diff --git a/extensions/libip6t_mh.c b/extensions/libip6t_mh.c index dd0da2b8..a6cd5622 100644 --- a/extensions/libip6t_mh.c +++ b/extensions/libip6t_mh.c @@ -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); } diff --git a/extensions/libip6t_policy.c b/extensions/libip6t_policy.c index 41e5c324..eaf861e4 100644 --- a/extensions/libip6t_policy.c +++ b/extensions/libip6t_policy.c @@ -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); } diff --git a/extensions/libip6t_rt.c b/extensions/libip6t_rt.c index e2ae09f4..b5f54eee 100644 --- a/extensions/libip6t_rt.c +++ b/extensions/libip6t_rt.c @@ -18,14 +18,14 @@ 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); } diff --git a/extensions/libipt_CLUSTERIP.c b/extensions/libipt_CLUSTERIP.c index fdeae863..a0f34060 100644 --- a/extensions/libipt_CLUSTERIP.c +++ b/extensions/libipt_CLUSTERIP.c @@ -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 Specify hashing mode\n" " sourceip\n" @@ -31,9 +31,7 @@ static void CLUSTERIP_help(void) " --clustermac Set clusterIP MAC address\n" " --total-nodes Set number of total nodes in cluster\n" " --local-node Set the local node number\n" -" --hash-init Set init value of the Jenkins hash\n" -"\n", -IPTABLES_VERSION); +" --hash-init 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); } diff --git a/extensions/libipt_DNAT.c b/extensions/libipt_DNAT.c index 3ad412b6..fed7611c 100644 --- a/extensions/libipt_DNAT.c +++ b/extensions/libipt_DNAT.c @@ -23,12 +23,10 @@ struct ipt_natinfo static void DNAT_help(void) { printf( -"DNAT v%s options:\n" +"DNAT target options:\n" " --to-destination [-][: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); } diff --git a/extensions/libipt_ECN.c b/extensions/libipt_ECN.c index 1523b2df..9526c37d 100644 --- a/extensions/libipt_ECN.c +++ b/extensions/libipt_ECN.c @@ -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); } diff --git a/extensions/libipt_LOG.c b/extensions/libipt_LOG.c index 6b08f586..50b1130c 100644 --- a/extensions/libipt_LOG.c +++ b/extensions/libipt_LOG.c @@ -21,14 +21,13 @@ 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); } diff --git a/extensions/libipt_MASQUERADE.c b/extensions/libipt_MASQUERADE.c index fc914c59..ea4f5cdd 100644 --- a/extensions/libipt_MASQUERADE.c +++ b/extensions/libipt_MASQUERADE.c @@ -12,14 +12,11 @@ static void MASQUERADE_help(void) { printf( -"MASQUERADE v%s options:\n" +"MASQUERADE target options:\n" " --to-ports [-]\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); } diff --git a/extensions/libipt_MIRROR.c b/extensions/libipt_MIRROR.c index 83397feb..cc1c7a4e 100644 --- a/extensions/libipt_MIRROR.c +++ b/extensions/libipt_MIRROR.c @@ -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); } diff --git a/extensions/libipt_NETMAP.c b/extensions/libipt_NETMAP.c index da0e5f4d..2a786963 100644 --- a/extensions/libipt_NETMAP.c +++ b/extensions/libipt_NETMAP.c @@ -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); } diff --git a/extensions/libipt_REDIRECT.c b/extensions/libipt_REDIRECT.c index 1918df82..b4c73bbe 100644 --- a/extensions/libipt_REDIRECT.c +++ b/extensions/libipt_REDIRECT.c @@ -15,10 +15,9 @@ static void REDIRECT_help(void) { printf( -"REDIRECT v%s options:\n" +"REDIRECT target options:\n" " --to-ports [-]\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); } diff --git a/extensions/libipt_REJECT.c b/extensions/libipt_REJECT.c index 5901a5ef..fd272c47 100644 --- a/extensions/libipt_REJECT.c +++ b/extensions/libipt_REJECT.c @@ -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); } diff --git a/extensions/libipt_SAME.c b/extensions/libipt_SAME.c index f7c737c5..31547975 100644 --- a/extensions/libipt_SAME.c +++ b/extensions/libipt_SAME.c @@ -14,7 +14,7 @@ static void SAME_help(void) { printf( -"SAME v%s options:\n" +"SAME target options:\n" " --to -\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); } diff --git a/extensions/libipt_SET.c b/extensions/libipt_SET.c index dd42867b..378b77e4 100644 --- a/extensions/libipt_SET.c +++ b/extensions/libipt_SET.c @@ -25,13 +25,12 @@ /* 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); } diff --git a/extensions/libipt_SNAT.c b/extensions/libipt_SNAT.c index 7b9e1763..11536c61 100644 --- a/extensions/libipt_SNAT.c +++ b/extensions/libipt_SNAT.c @@ -23,12 +23,10 @@ struct ipt_natinfo static void SNAT_help(void) { printf( -"SNAT v%s options:\n" +"SNAT target options:\n" " --to-source [-][: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); } diff --git a/extensions/libipt_TTL.c b/extensions/libipt_TTL.c index b5a32c40..9c22ba3a 100644 --- a/extensions/libipt_TTL.c +++ b/extensions/libipt_TTL.c @@ -19,11 +19,10 @@ static void TTL_help(void) { printf( -"TTL target v%s options\n" +"TTL target options\n" " --ttl-set value Set TTL to \n" " --ttl-dec value Decrement TTL by \n" -" --ttl-inc value Increment TTL by \n" -, IPTABLES_VERSION); +" --ttl-inc value Increment TTL by \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); } diff --git a/extensions/libipt_ULOG.c b/extensions/libipt_ULOG.c index 31990a61..d2b464f2 100644 --- a/extensions/libipt_ULOG.c +++ b/extensions/libipt_ULOG.c @@ -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); } diff --git a/extensions/libipt_addrtype.c b/extensions/libipt_addrtype.c index 7db9dce7..9611c39a 100644 --- a/extensions/libipt_addrtype.c +++ b/extensions/libipt_addrtype.c @@ -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); } diff --git a/extensions/libipt_ah.c b/extensions/libipt_ah.c index 2555b5d8..182b51a3 100644 --- a/extensions/libipt_ah.c +++ b/extensions/libipt_ah.c @@ -12,10 +12,9 @@ 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); } diff --git a/extensions/libipt_ecn.c b/extensions/libipt_ecn.c index 9c07eab3..06214535 100644 --- a/extensions/libipt_ecn.c +++ b/extensions/libipt_ecn.c @@ -19,11 +19,10 @@ 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); } diff --git a/extensions/libipt_icmp.c b/extensions/libipt_icmp.c index b1fccbf5..4361f135 100644 --- a/extensions/libipt_icmp.c +++ b/extensions/libipt_icmp.c @@ -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); } diff --git a/extensions/libipt_policy.c b/extensions/libipt_policy.c index 48b96bed..71e95dd6 100644 --- a/extensions/libipt_policy.c +++ b/extensions/libipt_policy.c @@ -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); } diff --git a/extensions/libipt_realm.c b/extensions/libipt_realm.c index 7026fc23..7fdc2930 100644 --- a/extensions/libipt_realm.c +++ b/extensions/libipt_realm.c @@ -18,10 +18,9 @@ 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); } diff --git a/extensions/libipt_recent.c b/extensions/libipt_recent.c index ace778e0..51b0d15d 100644 --- a/extensions/libipt_recent.c +++ b/extensions/libipt_recent.c @@ -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 . http://snowman.net/projects/ipt_recent/\n" -, -IPTABLES_VERSION); - +RECENT_NAME " " RECENT_VER ": Stephen Frost . 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); } diff --git a/extensions/libipt_set.c b/extensions/libipt_set.c index 932008bb..dcb74df9 100644 --- a/extensions/libipt_set.c +++ b/extensions/libipt_set.c @@ -24,12 +24,11 @@ /* 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); } diff --git a/extensions/libipt_ttl.c b/extensions/libipt_ttl.c index d7820f1f..25b92063 100644 --- a/extensions/libipt_ttl.c +++ b/extensions/libipt_ttl.c @@ -17,11 +17,10 @@ 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); } diff --git a/extensions/libipt_unclean.c b/extensions/libipt_unclean.c index 648d0980..4bdbd1b4 100644 --- a/extensions/libipt_unclean.c +++ b/extensions/libipt_unclean.c @@ -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); } diff --git a/extensions/libxt_CLASSIFY.c b/extensions/libxt_CLASSIFY.c index 4a3520f8..79dd16c2 100644 --- a/extensions/libxt_CLASSIFY.c +++ b/extensions/libxt_CLASSIFY.c @@ -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, diff --git a/extensions/libxt_CONNMARK.c b/extensions/libxt_CONNMARK.c index 9e8013ad..27640f58 100644 --- a/extensions/libxt_CONNMARK.c +++ b/extensions/libxt_CONNMARK.c @@ -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, diff --git a/extensions/libxt_CONNSECMARK.c b/extensions/libxt_CONNSECMARK.c index e8d0a5ea..579ea4c3 100644 --- a/extensions/libxt_CONNSECMARK.c +++ b/extensions/libxt_CONNSECMARK.c @@ -17,11 +17,9 @@ 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)), diff --git a/extensions/libxt_DSCP.c b/extensions/libxt_DSCP.c index c15f0e16..e9369ab9 100644 --- a/extensions/libxt_DSCP.c +++ b/extensions/libxt_DSCP.c @@ -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, diff --git a/extensions/libxt_MARK.c b/extensions/libxt_MARK.c index d7d79d57..5b880cec 100644 --- a/extensions/libxt_MARK.c +++ b/extensions/libxt_MARK.c @@ -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, diff --git a/extensions/libxt_NFLOG.c b/extensions/libxt_NFLOG.c index d4dc971c..e5b6719c 100644 --- a/extensions/libxt_NFLOG.c +++ b/extensions/libxt_NFLOG.c @@ -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, diff --git a/extensions/libxt_NFQUEUE.c b/extensions/libxt_NFQUEUE.c index b1c5ef3a..49d0ebcf 100644 --- a/extensions/libxt_NFQUEUE.c +++ b/extensions/libxt_NFQUEUE.c @@ -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, diff --git a/extensions/libxt_NOTRACK.c b/extensions/libxt_NOTRACK.c index 18ad5e13..83ad8171 100644 --- a/extensions/libxt_NOTRACK.c +++ b/extensions/libxt_NOTRACK.c @@ -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, diff --git a/extensions/libxt_RATEEST.c b/extensions/libxt_RATEEST.c index ee0d116d..cf1284f0 100644 --- a/extensions/libxt_RATEEST.c +++ b/extensions/libxt_RATEEST.c @@ -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, diff --git a/extensions/libxt_SECMARK.c b/extensions/libxt_SECMARK.c index 92ba527b..feee0e43 100644 --- a/extensions/libxt_SECMARK.c +++ b/extensions/libxt_SECMARK.c @@ -17,10 +17,8 @@ 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)), diff --git a/extensions/libxt_TCPMSS.c b/extensions/libxt_TCPMSS.c index 9ab69bfe..fbf73c9a 100644 --- a/extensions/libxt_TCPMSS.c +++ b/extensions/libxt_TCPMSS.c @@ -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, diff --git a/extensions/libxt_TCPOPTSTRIP.c b/extensions/libxt_TCPOPTSTRIP.c index bd664353..bd74e379 100644 --- a/extensions/libxt_TCPOPTSTRIP.c +++ b/extensions/libxt_TCPOPTSTRIP.c @@ -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)), diff --git a/extensions/libxt_TOS.c b/extensions/libxt_TOS.c index 777d7cfb..9ce8473f 100644 --- a/extensions/libxt_TOS.c +++ b/extensions/libxt_TOS.c @@ -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, diff --git a/extensions/libxt_TRACE.c b/extensions/libxt_TRACE.c index 97e3a03f..4b0bac83 100644 --- a/extensions/libxt_TRACE.c +++ b/extensions/libxt_TRACE.c @@ -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, diff --git a/extensions/libxt_comment.c b/extensions/libxt_comment.c index 20277d4c..abbb6cbe 100644 --- a/extensions/libxt_comment.c +++ b/extensions/libxt_comment.c @@ -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, diff --git a/extensions/libxt_connbytes.c b/extensions/libxt_connbytes.c index e6cb1f40..64faa8f1 100644 --- a/extensions/libxt_connbytes.c +++ b/extensions/libxt_connbytes.c @@ -12,11 +12,10 @@ 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, diff --git a/extensions/libxt_connlimit.c b/extensions/libxt_connlimit.c index 9e2137ac..3474ce5f 100644 --- a/extensions/libxt_connlimit.c +++ b/extensions/libxt_connlimit.c @@ -11,11 +11,10 @@ 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, diff --git a/extensions/libxt_connmark.c b/extensions/libxt_connmark.c index 1e38f7cd..eb4060ef 100644 --- a/extensions/libxt_connmark.c +++ b/extensions/libxt_connmark.c @@ -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, diff --git a/extensions/libxt_conntrack.c b/extensions/libxt_conntrack.c index e3e29f0c..1d339a03 100644 --- a/extensions/libxt_conntrack.c +++ b/extensions/libxt_conntrack.c @@ -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, diff --git a/extensions/libxt_dccp.c b/extensions/libxt_dccp.c index 467a695c..c368ba48 100644 --- a/extensions/libxt_dccp.c +++ b/extensions/libxt_dccp.c @@ -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, diff --git a/extensions/libxt_dscp.c b/extensions/libxt_dscp.c index a28af096..6aed4990 100644 --- a/extensions/libxt_dscp.c +++ b/extensions/libxt_dscp.c @@ -27,16 +27,14 @@ 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, diff --git a/extensions/libxt_esp.c b/extensions/libxt_esp.c index f37c088a..82749f5b 100644 --- a/extensions/libxt_esp.c +++ b/extensions/libxt_esp.c @@ -12,10 +12,9 @@ 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, diff --git a/extensions/libxt_hashlimit.c b/extensions/libxt_hashlimit.c index 45c2db1a..2f6b3fcd 100644 --- a/extensions/libxt_hashlimit.c +++ b/extensions/libxt_hashlimit.c @@ -30,7 +30,7 @@ static void hashlimit_help(void) { printf( -"hashlimit v%s options:\n" +"hashlimit match options:\n" "--hashlimit 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 ] number of hashtable buckets\n" "[--hashlimit-htable-max ] 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, diff --git a/extensions/libxt_helper.c b/extensions/libxt_helper.c index 31ae4fc5..ba0b996d 100644 --- a/extensions/libxt_helper.c +++ b/extensions/libxt_helper.c @@ -12,10 +12,8 @@ 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, diff --git a/extensions/libxt_iprange.c b/extensions/libxt_iprange.c index c4fe7cfc..70fcc573 100644 --- a/extensions/libxt_iprange.c +++ b/extensions/libxt_iprange.c @@ -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, diff --git a/extensions/libxt_length.c b/extensions/libxt_length.c index 16e00bd9..ec305ae4 100644 --- a/extensions/libxt_length.c +++ b/extensions/libxt_length.c @@ -12,11 +12,9 @@ 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, diff --git a/extensions/libxt_limit.c b/extensions/libxt_limit.c index 1c86df98..424635a1 100644 --- a/extensions/libxt_limit.c +++ b/extensions/libxt_limit.c @@ -21,12 +21,12 @@ 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, diff --git a/extensions/libxt_mac.c b/extensions/libxt_mac.c index 2284d2ac..f13d9052 100644 --- a/extensions/libxt_mac.c +++ b/extensions/libxt_mac.c @@ -16,10 +16,9 @@ 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, diff --git a/extensions/libxt_mark.c b/extensions/libxt_mark.c index fab8ecb9..1e07676e 100644 --- a/extensions/libxt_mark.c +++ b/extensions/libxt_mark.c @@ -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, diff --git a/extensions/libxt_multiport.c b/extensions/libxt_multiport.c index 6de7bc1d..413f178d 100644 --- a/extensions/libxt_multiport.c +++ b/extensions/libxt_multiport.c @@ -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)), diff --git a/extensions/libxt_owner.c b/extensions/libxt_owner.c index ea86f998..85c9602a 100644 --- a/extensions/libxt_owner.c +++ b/extensions/libxt_owner.c @@ -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, diff --git a/extensions/libxt_physdev.c b/extensions/libxt_physdev.c index e971d1e1..34547c8e 100644 --- a/extensions/libxt_physdev.c +++ b/extensions/libxt_physdev.c @@ -15,13 +15,12 @@ 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, diff --git a/extensions/libxt_pkttype.c b/extensions/libxt_pkttype.c index 7c469a8d..69c6da8e 100644 --- a/extensions/libxt_pkttype.c +++ b/extensions/libxt_pkttype.c @@ -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, diff --git a/extensions/libxt_quota.c b/extensions/libxt_quota.c index 590dbfbf..a642aa49 100644 --- a/extensions/libxt_quota.c +++ b/extensions/libxt_quota.c @@ -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, diff --git a/extensions/libxt_rateest.c b/extensions/libxt_rateest.c index a335781d..ebea4376 100644 --- a/extensions/libxt_rateest.c +++ b/extensions/libxt_rateest.c @@ -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, diff --git a/extensions/libxt_sctp.c b/extensions/libxt_sctp.c index 2ca15720..653b601b 100644 --- a/extensions/libxt_sctp.c +++ b/extensions/libxt_sctp.c @@ -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, diff --git a/extensions/libxt_standard.c b/extensions/libxt_standard.c index a50cffe9..505f87d7 100644 --- a/extensions/libxt_standard.c +++ b/extensions/libxt_standard.c @@ -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, diff --git a/extensions/libxt_state.c b/extensions/libxt_state.c index 5b8beea1..c37fd700 100644 --- a/extensions/libxt_state.c +++ b/extensions/libxt_state.c @@ -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, diff --git a/extensions/libxt_statistic.c b/extensions/libxt_statistic.c index 2c2464dc..114b4197 100644 --- a/extensions/libxt_statistic.c +++ b/extensions/libxt_statistic.c @@ -11,15 +11,13 @@ 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, diff --git a/extensions/libxt_string.c b/extensions/libxt_string.c index dc2cd9d3..82deb2a4 100644 --- a/extensions/libxt_string.c +++ b/extensions/libxt_string.c @@ -34,13 +34,12 @@ 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, diff --git a/extensions/libxt_tcp.c b/extensions/libxt_tcp.c index 3274f08c..743c5a23 100644 --- a/extensions/libxt_tcp.c +++ b/extensions/libxt_tcp.c @@ -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, diff --git a/extensions/libxt_tcpmss.c b/extensions/libxt_tcpmss.c index 7a026bf7..8f56a41c 100644 --- a/extensions/libxt_tcpmss.c +++ b/extensions/libxt_tcpmss.c @@ -12,10 +12,9 @@ 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, diff --git a/extensions/libxt_time.c b/extensions/libxt_time.c index c551a6fe..7072d71e 100644 --- a/extensions/libxt_time.c +++ b/extensions/libxt_time.c @@ -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, diff --git a/extensions/libxt_tos.c b/extensions/libxt_tos.c index 16a90ef5..92f7d847 100644 --- a/extensions/libxt_tos.c +++ b/extensions/libxt_tos.c @@ -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, diff --git a/extensions/libxt_u32.c b/extensions/libxt_u32.c index 9360c094..3a5cdad6 100644 --- a/extensions/libxt_u32.c +++ b/extensions/libxt_u32.c @@ -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, diff --git a/extensions/libxt_udp.c b/extensions/libxt_udp.c index 4e83ae8f..9c3665a4 100644 --- a/extensions/libxt_udp.c +++ b/extensions/libxt_udp.c @@ -11,14 +11,13 @@ 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, -- cgit v1.2.3