From 8caee8b9e34fed4562fcff553197c161fc9d9979 Mon Sep 17 00:00:00 2001 From: Pablo Neira Date: Tue, 28 Dec 2004 13:11:59 +0000 Subject: Pablo Neira: extensions conversion to C99 structure initialization (I removed the revision stuff for the moment, but this needs to go in before the code moves too much --RR) --- extensions/libipt_BALANCE.c | 27 +++++++++++++-------------- extensions/libipt_CLASSIFY.c | 27 +++++++++++++-------------- extensions/libipt_CLUSTERIP.c | 27 +++++++++++++-------------- extensions/libipt_DNAT.c | 27 +++++++++++++-------------- extensions/libipt_DSCP.c | 27 +++++++++++++-------------- extensions/libipt_ECN.c | 28 ++++++++++++++-------------- extensions/libipt_FTOS.c | 27 +++++++++++++-------------- extensions/libipt_IPMARK.c | 27 +++++++++++++-------------- extensions/libipt_IPV4OPTSSTRIP.c | 27 +++++++++++++-------------- extensions/libipt_MARK.c | 26 +++++++++++++------------- extensions/libipt_MASQUERADE.c | 26 ++++++++++++-------------- extensions/libipt_MIRROR.c | 27 +++++++++++++-------------- extensions/libipt_NETLINK.c | 26 +++++++++++++------------- extensions/libipt_NETMAP.c | 27 +++++++++++++-------------- extensions/libipt_POOL.c | 27 +++++++++++++-------------- extensions/libipt_REDIRECT.c | 27 +++++++++++++-------------- extensions/libipt_REJECT.c | 27 +++++++++++++-------------- extensions/libipt_ROUTE.c | 27 +++++++++++++-------------- extensions/libipt_SAME.c | 27 +++++++++++++-------------- extensions/libipt_SNAT.c | 27 +++++++++++++-------------- extensions/libipt_TARPIT.c | 27 +++++++++++++-------------- extensions/libipt_TCPMSS.c | 27 +++++++++++++-------------- extensions/libipt_TOS.c | 27 +++++++++++++-------------- extensions/libipt_TTL.c | 28 ++++++++++++++-------------- extensions/libipt_ULOG.c | 26 +++++++++++++------------- extensions/libipt_XOR.c | 25 +++++++++++++------------ extensions/libipt_addrtype.c | 24 ++++++++++++------------ extensions/libipt_ah.c | 27 +++++++++++++-------------- extensions/libipt_comment.c | 24 ++++++++++++------------ extensions/libipt_condition.c | 22 +++++++++++----------- extensions/libipt_connbytes.c | 27 +++++++++++++-------------- extensions/libipt_connlimit.c | 22 +++++++++++----------- extensions/libipt_connrate.c | 27 +++++++++++++-------------- extensions/libipt_conntrack.c | 27 +++++++++++++-------------- extensions/libipt_dscp.c | 27 +++++++++++++-------------- extensions/libipt_dstlimit.c | 29 ++++++++++++++--------------- extensions/libipt_esp.c | 27 +++++++++++++-------------- extensions/libipt_fuzzy.c | 26 +++++++++++++------------- extensions/libipt_hashlimit.c | 28 +++++++++++++--------------- extensions/libipt_helper.c | 27 +++++++++++++-------------- extensions/libipt_icmp.c | 27 +++++++++++++-------------- extensions/libipt_iprange.c | 27 +++++++++++++-------------- extensions/libipt_ipv4options.c | 27 +++++++++++++-------------- extensions/libipt_length.c | 27 +++++++++++++-------------- extensions/libipt_limit.c | 27 +++++++++++++-------------- extensions/libipt_mac.c | 27 +++++++++++++-------------- extensions/libipt_mark.c | 27 +++++++++++++-------------- extensions/libipt_mport.c | 26 +++++++++++++------------- extensions/libipt_multiport.c | 27 +++++++++++++-------------- extensions/libipt_nth.c | 26 +++++++++++++------------- extensions/libipt_owner.c | 27 +++++++++++++-------------- extensions/libipt_physdev.c | 27 +++++++++++++-------------- extensions/libipt_pkttype.c | 27 +++++++++++++-------------- extensions/libipt_pool.c | 27 +++++++++++++-------------- extensions/libipt_psd.c | 27 +++++++++++++-------------- extensions/libipt_quota.c | 25 +++++++++++++------------ extensions/libipt_random.c | 26 +++++++++++++------------- extensions/libipt_realm.c | 25 ++++++++++++------------- extensions/libipt_rpc.c | 25 +++++++++++++------------ extensions/libipt_standard.c | 26 +++++++++++++------------- extensions/libipt_state.c | 27 +++++++++++++-------------- extensions/libipt_tcp.c | 28 ++++++++++++++-------------- extensions/libipt_tcpmss.c | 27 +++++++++++++-------------- extensions/libipt_time.c | 26 +++++++++++++------------- extensions/libipt_tos.c | 27 +++++++++++++-------------- extensions/libipt_ttl.c | 27 +++++++++++++-------------- extensions/libipt_u32.c | 26 +++++++++++++------------- extensions/libipt_udp.c | 26 +++++++++++++------------- extensions/libipt_unclean.c | 26 +++++++++++++------------- 69 files changed, 893 insertions(+), 939 deletions(-) diff --git a/extensions/libipt_BALANCE.c b/extensions/libipt_BALANCE.c index 7f0b9169..1b97ea2e 100644 --- a/extensions/libipt_BALANCE.c +++ b/extensions/libipt_BALANCE.c @@ -131,20 +131,19 @@ save(const struct ipt_ip *ip, const struct ipt_entry_target *target) printf("-%s ", addr_to_dotted(&a)); } -static -struct iptables_target balance -= { NULL, - "BALANCE", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ip_nat_multi_range)), - IPT_ALIGN(sizeof(struct ip_nat_multi_range)), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +static struct iptables_target balance = { + .next = NULL, + .name = "BALANCE", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ip_nat_multi_range)), + .userspacesize = IPT_ALIGN(sizeof(struct ip_nat_multi_range)), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; void _init(void) diff --git a/extensions/libipt_CLASSIFY.c b/extensions/libipt_CLASSIFY.c index ac14b762..16c80539 100644 --- a/extensions/libipt_CLASSIFY.c +++ b/extensions/libipt_CLASSIFY.c @@ -108,20 +108,19 @@ save(const struct ipt_ip *ip, const struct ipt_entry_target *target) TC_H_MAJ(clinfo->priority)>>16, TC_H_MIN(clinfo->priority)); } -static -struct iptables_target classify -= { NULL, - "CLASSIFY", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ipt_classify_target_info)), - IPT_ALIGN(sizeof(struct ipt_classify_target_info)), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +static struct iptables_target classify = { + .next = NULL, + .name = "CLASSIFY", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ipt_classify_target_info)), + .userspacesize = IPT_ALIGN(sizeof(struct ipt_classify_target_info)), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; void _init(void) diff --git a/extensions/libipt_CLUSTERIP.c b/extensions/libipt_CLUSTERIP.c index 55e86c5c..8b364305 100644 --- a/extensions/libipt_CLUSTERIP.c +++ b/extensions/libipt_CLUSTERIP.c @@ -237,20 +237,19 @@ save(const struct ipt_ip *ip, const struct ipt_entry_target *target) */ } -static -struct iptables_target clusterip -= { NULL, - "CLUSTERIP", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ipt_clusterip_tgt_info)), - IPT_ALIGN(sizeof(struct ipt_clusterip_tgt_info)), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +static struct iptables_target clusterip = { + .next = NULL, + .name = "CLUSTERIP", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ipt_clusterip_tgt_info)), + .userspacesize = IPT_ALIGN(sizeof(struct ipt_clusterip_tgt_info)), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; void _init(void) diff --git a/extensions/libipt_DNAT.c b/extensions/libipt_DNAT.c index 9b826758..d8efa586 100644 --- a/extensions/libipt_DNAT.c +++ b/extensions/libipt_DNAT.c @@ -224,20 +224,19 @@ save(const struct ipt_ip *ip, const struct ipt_entry_target *target) } } -static -struct iptables_target dnat -= { NULL, - "DNAT", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ip_nat_multi_range)), - IPT_ALIGN(sizeof(struct ip_nat_multi_range)), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +static struct iptables_target dnat = { + .next = NULL, + .name = "DNAT", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ip_nat_multi_range)), + .userspacesize = IPT_ALIGN(sizeof(struct ip_nat_multi_range)), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; void _init(void) diff --git a/extensions/libipt_DSCP.c b/extensions/libipt_DSCP.c index 98a43331..90e2a344 100644 --- a/extensions/libipt_DSCP.c +++ b/extensions/libipt_DSCP.c @@ -143,20 +143,19 @@ save(const struct ipt_ip *ip, const struct ipt_entry_target *target) printf("--set-dscp 0x%02x ", dinfo->dscp); } -static -struct iptables_target dscp -= { NULL, - "DSCP", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ipt_DSCP_info)), - IPT_ALIGN(sizeof(struct ipt_DSCP_info)), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +static struct iptables_target dscp = { + .next = NULL, + .name = "DSCP", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ipt_DSCP_info)), + .userspacesize = IPT_ALIGN(sizeof(struct ipt_DSCP_info)), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; void _init(void) diff --git a/extensions/libipt_ECN.c b/extensions/libipt_ECN.c index 3f7afbe3..b9ef29ea 100644 --- a/extensions/libipt_ECN.c +++ b/extensions/libipt_ECN.c @@ -6,7 +6,7 @@ * * libipt_ECN.c borrowed heavily from libipt_DSCP.c * - * $Id: libipt_ECN.c,v 1.11 2002/08/07 10:04:42 laforge Exp $ + * $Id$ */ #include #include @@ -164,19 +164,19 @@ save(const struct ipt_ip *ip, const struct ipt_entry_target *target) } static -struct iptables_target ecn -= { NULL, - "ECN", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ipt_ECN_info)), - IPT_ALIGN(sizeof(struct ipt_ECN_info)), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +struct iptables_target ecn = { + .next = NULL, + .name = "ECN", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ipt_ECN_info)), + .userspacesize = IPT_ALIGN(sizeof(struct ipt_ECN_info)), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; void _init(void) diff --git a/extensions/libipt_FTOS.c b/extensions/libipt_FTOS.c index 3ff2d5aa..62df4cde 100644 --- a/extensions/libipt_FTOS.c +++ b/extensions/libipt_FTOS.c @@ -112,20 +112,19 @@ save(const struct ipt_ip *ip, const struct ipt_entry_target *target) printf("--set-ftos 0x%02x ", finfo->ftos); } -static -struct iptables_target ftos -= { NULL, - "FTOS", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ipt_FTOS_info)), - IPT_ALIGN(sizeof(struct ipt_FTOS_info)), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +static struct iptables_target ftos = { + .next = NULL, + .name = "FTOS", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ipt_FTOS_info)), + .userspacesize = IPT_ALIGN(sizeof(struct ipt_FTOS_info)), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; void _init(void) diff --git a/extensions/libipt_IPMARK.c b/extensions/libipt_IPMARK.c index ae335c44..3a557fe7 100644 --- a/extensions/libipt_IPMARK.c +++ b/extensions/libipt_IPMARK.c @@ -148,20 +148,19 @@ save(const struct ipt_ip *ip, const struct ipt_entry_target *target) printf("--or-mask 0x%lx ", ipmarkinfo->ormask); } -static -struct iptables_target ipmark -= { NULL, - "IPMARK", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ipt_ipmark_target_info)), - IPT_ALIGN(sizeof(struct ipt_ipmark_target_info)), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +static struct iptables_target ipmark = { + .next = NULL, + .name = "IPMARK", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ipt_ipmark_target_info)), + .userspacesize = IPT_ALIGN(sizeof(struct ipt_ipmark_target_info)), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; void _init(void) diff --git a/extensions/libipt_IPV4OPTSSTRIP.c b/extensions/libipt_IPV4OPTSSTRIP.c index f1dcec06..c154ef53 100644 --- a/extensions/libipt_IPV4OPTSSTRIP.c +++ b/extensions/libipt_IPV4OPTSSTRIP.c @@ -59,20 +59,19 @@ save(const struct ipt_ip *ip, const struct ipt_entry_target *target) /* nothing to print, we don't take option... */ } -static -struct iptables_target IPV4OPTSSTRIP -= { NULL, - "IPV4OPTSSTRIP", - IPTABLES_VERSION, - IPT_ALIGN(0), - IPT_ALIGN(0), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +static struct iptables_target IPV4OPTSSTRIP = { + .next = NULL, + .name = "IPV4OPTSSTRIP", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(0), + .userspacesize = IPT_ALIGN(0), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; void _init(void) diff --git a/extensions/libipt_MARK.c b/extensions/libipt_MARK.c index 56b09f57..bc3dd42e 100644 --- a/extensions/libipt_MARK.c +++ b/extensions/libipt_MARK.c @@ -110,19 +110,19 @@ save(const struct ipt_ip *ip, const struct ipt_entry_target *target) } static -struct iptables_target mark -= { NULL, - "MARK", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ipt_mark_target_info)), - IPT_ALIGN(sizeof(struct ipt_mark_target_info)), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +struct iptables_target mark = { + .next = NULL, + .name = "MARK", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ipt_mark_target_info)), + .userspacesize = IPT_ALIGN(sizeof(struct ipt_mark_target_info)), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; void _init(void) diff --git a/extensions/libipt_MASQUERADE.c b/extensions/libipt_MASQUERADE.c index c30e2faf..31af1203 100644 --- a/extensions/libipt_MASQUERADE.c +++ b/extensions/libipt_MASQUERADE.c @@ -146,20 +146,18 @@ save(const struct ipt_ip *ip, const struct ipt_entry_target *target) } } -static -struct iptables_target masq -= { NULL, - "MASQUERADE", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ip_nat_multi_range)), - IPT_ALIGN(sizeof(struct ip_nat_multi_range)), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +static struct iptables_target masq = { NULL, + .name = "MASQUERADE", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ip_nat_multi_range)), + .userspacesize = IPT_ALIGN(sizeof(struct ip_nat_multi_range)), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; void _init(void) diff --git a/extensions/libipt_MIRROR.c b/extensions/libipt_MIRROR.c index b5996fa7..7e617030 100644 --- a/extensions/libipt_MIRROR.c +++ b/extensions/libipt_MIRROR.c @@ -41,20 +41,19 @@ final_check(unsigned int flags) { } -static -struct iptables_target mirror -= { NULL, - "MIRROR", - IPTABLES_VERSION, - IPT_ALIGN(0), - IPT_ALIGN(0), - &help, - &init, - &parse, - &final_check, - NULL, /* print */ - NULL, /* save */ - opts +static struct iptables_target mirror = { + .next = NULL, + .name = "MIRROR", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(0), + .userspacesize = IPT_ALIGN(0), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = NULL, + .save = NULL, + .extra_opts = opts }; void _init(void) diff --git a/extensions/libipt_NETLINK.c b/extensions/libipt_NETLINK.c index 9e719903..9cc190c2 100644 --- a/extensions/libipt_NETLINK.c +++ b/extensions/libipt_NETLINK.c @@ -136,19 +136,19 @@ print(const struct ipt_ip *ip, printf("nlsize %i ", nld->size); } -static -struct iptables_target netlink = { NULL, - "NETLINK", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ipt_nldata)), - IPT_ALIGN(sizeof(struct ipt_nldata)), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +static struct iptables_target netlink = { + .next = NULL, + .name = "NETLINK", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ipt_nldata)), + .userspacesize = IPT_ALIGN(sizeof(struct ipt_nldata)), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; void _init(void) diff --git a/extensions/libipt_NETMAP.c b/extensions/libipt_NETMAP.c index a45acb90..81d0e5c6 100644 --- a/extensions/libipt_NETMAP.c +++ b/extensions/libipt_NETMAP.c @@ -179,20 +179,19 @@ save(const struct ipt_ip *ip, const struct ipt_entry_target *target) print(ip, target, 0); } -static -struct iptables_target target_module -= { NULL, - MODULENAME, - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ip_nat_multi_range)), - IPT_ALIGN(sizeof(struct ip_nat_multi_range)), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +static struct iptables_target target_module = { + .next = NULL, + .name = MODULENAME, + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ip_nat_multi_range)), + .userspacesize = IPT_ALIGN(sizeof(struct ip_nat_multi_range)), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; void _init(void) diff --git a/extensions/libipt_POOL.c b/extensions/libipt_POOL.c index 931dcfdb..0ce9f209 100644 --- a/extensions/libipt_POOL.c +++ b/extensions/libipt_POOL.c @@ -133,20 +133,19 @@ save(const struct ipt_ip *ip, const struct ipt_entry_target *target) } } -static -struct iptables_target ipt_pool_target -= { NULL, - "POOL", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ipt_pool_info)), - IPT_ALIGN(sizeof(struct ipt_pool_info)), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +static struct iptables_target ipt_pool_target = { + .next = NULL, + .name = "POOL", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ipt_pool_info)), + .userspacesize = IPT_ALIGN(sizeof(struct ipt_pool_info)), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; void _init(void) diff --git a/extensions/libipt_REDIRECT.c b/extensions/libipt_REDIRECT.c index 052b533c..b40cb496 100644 --- a/extensions/libipt_REDIRECT.c +++ b/extensions/libipt_REDIRECT.c @@ -147,20 +147,19 @@ save(const struct ipt_ip *ip, const struct ipt_entry_target *target) } } -static -struct iptables_target redir -= { NULL, - "REDIRECT", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ip_nat_multi_range)), - IPT_ALIGN(sizeof(struct ip_nat_multi_range)), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +static struct iptables_target redir = { + .next = NULL, + .name = "REDIRECT", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ip_nat_multi_range)), + .userspacesize = IPT_ALIGN(sizeof(struct ip_nat_multi_range)), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; void _init(void) diff --git a/extensions/libipt_REJECT.c b/extensions/libipt_REJECT.c index 8170edd8..4b08e453 100644 --- a/extensions/libipt_REJECT.c +++ b/extensions/libipt_REJECT.c @@ -170,20 +170,19 @@ static void save(const struct ipt_ip *ip, const struct ipt_entry_target *target) printf("--reject-with %s ", reject_table[i].name); } -static -struct iptables_target reject -= { NULL, - "REJECT", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ipt_reject_info)), - IPT_ALIGN(sizeof(struct ipt_reject_info)), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +static struct iptables_target reject = { + .next = NULL, + .name = "REJECT", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ipt_reject_info)), + .userspacesize = IPT_ALIGN(sizeof(struct ipt_reject_info)), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; void _init(void) diff --git a/extensions/libipt_ROUTE.c b/extensions/libipt_ROUTE.c index b14abdbe..360f9832 100644 --- a/extensions/libipt_ROUTE.c +++ b/extensions/libipt_ROUTE.c @@ -243,20 +243,19 @@ static void save(const struct ipt_ip *ip, } -static -struct iptables_target route -= { NULL, - "ROUTE", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ipt_route_target_info)), - IPT_ALIGN(sizeof(struct ipt_route_target_info)), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +static struct iptables_target route = { + .next = NULL, + .name = "ROUTE", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ipt_route_target_info)), + .userspacesize = IPT_ALIGN(sizeof(struct ipt_route_target_info)), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; void _init(void) diff --git a/extensions/libipt_SAME.c b/extensions/libipt_SAME.c index 52a7e728..65455017 100644 --- a/extensions/libipt_SAME.c +++ b/extensions/libipt_SAME.c @@ -189,20 +189,19 @@ save(const struct ipt_ip *ip, const struct ipt_entry_target *target) printf("--nodst "); } -static -struct iptables_target same -= { NULL, - "SAME", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ipt_same_info)), - IPT_ALIGN(sizeof(struct ipt_same_info)), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +static struct iptables_target same = { + .next = NULL, + .name = "SAME", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ipt_same_info)), + .userspacesize = IPT_ALIGN(sizeof(struct ipt_same_info)), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; void _init(void) diff --git a/extensions/libipt_SNAT.c b/extensions/libipt_SNAT.c index d909c2a1..aca4a813 100644 --- a/extensions/libipt_SNAT.c +++ b/extensions/libipt_SNAT.c @@ -224,20 +224,19 @@ save(const struct ipt_ip *ip, const struct ipt_entry_target *target) } } -static -struct iptables_target snat -= { NULL, - "SNAT", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ip_nat_multi_range)), - IPT_ALIGN(sizeof(struct ip_nat_multi_range)), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +static struct iptables_target snat = { + .next = NULL, + .name = "SNAT", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ip_nat_multi_range)), + .userspacesize = IPT_ALIGN(sizeof(struct ip_nat_multi_range)), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; void _init(void) diff --git a/extensions/libipt_TARPIT.c b/extensions/libipt_TARPIT.c index 643ce614..1d1b0639 100644 --- a/extensions/libipt_TARPIT.c +++ b/extensions/libipt_TARPIT.c @@ -45,20 +45,19 @@ static void save(const struct ipt_ip *ip, const struct ipt_entry_target *target) { } -static -struct iptables_target tarpit -= { NULL, - "TARPIT", - IPTABLES_VERSION, - IPT_ALIGN(0), - IPT_ALIGN(0), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +static struct iptables_target tarpit = { + .next = NULL, + .name = "TARPIT", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(0), + .userspacesize = IPT_ALIGN(0), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; void _init(void) diff --git a/extensions/libipt_TCPMSS.c b/extensions/libipt_TCPMSS.c index 6892b526..c3256f00 100644 --- a/extensions/libipt_TCPMSS.c +++ b/extensions/libipt_TCPMSS.c @@ -113,20 +113,19 @@ save(const struct ipt_ip *ip, const struct ipt_entry_target *target) printf("--set-mss %u ", mssinfo->mss); } -static -struct iptables_target mss -= { NULL, - "TCPMSS", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ipt_tcpmss_info)), - IPT_ALIGN(sizeof(struct ipt_tcpmss_info)), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +static struct iptables_target mss = { + .next = NULL, + .name = "TCPMSS", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ipt_tcpmss_info)), + .userspacesize = IPT_ALIGN(sizeof(struct ipt_tcpmss_info)), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; void _init(void) diff --git a/extensions/libipt_TOS.c b/extensions/libipt_TOS.c index 87c38161..4302950d 100644 --- a/extensions/libipt_TOS.c +++ b/extensions/libipt_TOS.c @@ -153,20 +153,19 @@ save(const struct ipt_ip *ip, const struct ipt_entry_target *target) printf("--set-tos 0x%02x ", tosinfo->tos); } -static -struct iptables_target tos -= { NULL, - "TOS", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ipt_tos_target_info)), - IPT_ALIGN(sizeof(struct ipt_tos_target_info)), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +static struct iptables_target tos = { + .next = NULL, + .name = "TOS", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ipt_tos_target_info)), + .userspacesize = IPT_ALIGN(sizeof(struct ipt_tos_target_info)), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; void _init(void) diff --git a/extensions/libipt_TTL.c b/extensions/libipt_TTL.c index cdf1f88e..ca83f295 100644 --- a/extensions/libipt_TTL.c +++ b/extensions/libipt_TTL.c @@ -1,7 +1,7 @@ /* Shared library add-on to iptables for the TTL target * (C) 2000 by Harald Welte * - * $Id: libipt_TTL.c,v 1.6 2002/05/29 13:08:16 laforge Exp $ + * $Id$ * * This program is distributed under the terms of GNU GPL */ @@ -145,19 +145,19 @@ static struct option opts[] = { { 0 } }; -static -struct iptables_target TTL = { NULL, - "TTL", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ipt_TTL_info)), - IPT_ALIGN(sizeof(struct ipt_TTL_info)), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +static struct iptables_target TTL = { + .next = NULL, + .name = "TTL", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ipt_TTL_info)), + .userspacesize = IPT_ALIGN(sizeof(struct ipt_TTL_info)), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; void _init(void) diff --git a/extensions/libipt_ULOG.c b/extensions/libipt_ULOG.c index 5ced4628..e0731416 100644 --- a/extensions/libipt_ULOG.c +++ b/extensions/libipt_ULOG.c @@ -208,19 +208,19 @@ print(const struct ipt_ip *ip, #endif } -static -struct iptables_target ulog = { NULL, - "ULOG", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ipt_ulog_info)), - IPT_ALIGN(sizeof(struct ipt_ulog_info)), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +static struct iptables_target ulog = { + .next = NULL, + .name = "ULOG", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ipt_ulog_info)), + .userspacesize = IPT_ALIGN(sizeof(struct ipt_ulog_info)), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; void _init(void) diff --git a/extensions/libipt_XOR.c b/extensions/libipt_XOR.c index 47d8baac..23979164 100644 --- a/extensions/libipt_XOR.c +++ b/extensions/libipt_XOR.c @@ -93,18 +93,19 @@ static struct option opts[] = { { 0 } }; -static struct iptables_target XOR = { NULL, - "XOR", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ipt_XOR_info)), - IPT_ALIGN(sizeof(struct ipt_XOR_info)), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +static struct iptables_target XOR = { + .next = NULL, + .name = "XOR", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ipt_XOR_info)), + .userspacesize = IPT_ALIGN(sizeof(struct ipt_XOR_info)), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; void _init(void) diff --git a/extensions/libipt_addrtype.c b/extensions/libipt_addrtype.c index 093e9152..9a82cc5c 100644 --- a/extensions/libipt_addrtype.c +++ b/extensions/libipt_addrtype.c @@ -193,18 +193,18 @@ static struct option opts[] = { static struct iptables_match addrtype = { - NULL, - "addrtype", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ipt_addrtype_info)), - IPT_ALIGN(sizeof(struct ipt_addrtype_info)), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts + .next = NULL, + .name = "addrtype", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ipt_addrtype_info)), + .userspacesize = IPT_ALIGN(sizeof(struct ipt_addrtype_info)), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; diff --git a/extensions/libipt_ah.c b/extensions/libipt_ah.c index 1e583989..443c9f82 100644 --- a/extensions/libipt_ah.c +++ b/extensions/libipt_ah.c @@ -168,20 +168,19 @@ static void save(const struct ipt_ip *ip, const struct ipt_entry_match *match) } -static -struct iptables_match ah -= { NULL, - "ah", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ipt_ah)), - IPT_ALIGN(sizeof(struct ipt_ah)), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +static struct iptables_match ah = { + .next = NULL, + .name = "ah", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ipt_ah)), + .userspacesize = IPT_ALIGN(sizeof(struct ipt_ah)), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; void diff --git a/extensions/libipt_comment.c b/extensions/libipt_comment.c index 778051e8..253b267f 100644 --- a/extensions/libipt_comment.c +++ b/extensions/libipt_comment.c @@ -107,18 +107,18 @@ save(const struct ipt_ip *ip, const struct ipt_entry_match *match) } static struct iptables_match comment = { - NULL, - "comment", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ipt_comment_info)), - IPT_ALIGN(sizeof(struct ipt_comment_info)), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts + .next = NULL, + .name = "comment", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ipt_comment_info)), + .userspacesize = IPT_ALIGN(sizeof(struct ipt_comment_info)), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; void _init(void) diff --git a/extensions/libipt_condition.c b/extensions/libipt_condition.c index 750111b4..553739d0 100644 --- a/extensions/libipt_condition.c +++ b/extensions/libipt_condition.c @@ -94,17 +94,17 @@ save(const struct ipt_ip *ip, static struct iptables_match condition = { - .name = "condition", - .version = IPTABLES_VERSION, - .size = IPT_ALIGN(sizeof(struct condition_info)), - .userspacesize = IPT_ALIGN(sizeof(struct condition_info)), - .help = &help, - .init = &init, - .parse = &parse, - .final_check = &final_check, - .print = &print, - .save = &save, - .extra_opts = opts + .name = "condition", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct condition_info)), + .userspacesize = IPT_ALIGN(sizeof(struct condition_info)), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; diff --git a/extensions/libipt_connbytes.c b/extensions/libipt_connbytes.c index 3bc314cc..2d61a4af 100644 --- a/extensions/libipt_connbytes.c +++ b/extensions/libipt_connbytes.c @@ -192,20 +192,19 @@ static void save(const struct ipt_ip *ip, const struct ipt_entry_match *match) print_direction(sinfo); } -static -struct iptables_match state -= { NULL, - "connbytes", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ipt_connbytes_info)), - IPT_ALIGN(sizeof(struct ipt_connbytes_info)), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +static struct iptables_match state = { + .next = NULL, + .name = "connbytes", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ipt_connbytes_info)), + .userspacesize = IPT_ALIGN(sizeof(struct ipt_connbytes_info)), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; void _init(void) diff --git a/extensions/libipt_connlimit.c b/extensions/libipt_connlimit.c index 4b61701b..54f02112 100644 --- a/extensions/libipt_connlimit.c +++ b/extensions/libipt_connlimit.c @@ -122,17 +122,17 @@ static void save(const struct ipt_ip *ip, const struct ipt_entry_match *match) } static struct iptables_match connlimit = { - name: "connlimit", - version: IPTABLES_VERSION, - size: IPT_ALIGN(sizeof(struct ipt_connlimit_info)), - userspacesize: offsetof(struct ipt_connlimit_info,data), - help: help, - init: init, - parse: parse, - final_check: final_check, - print: print, - save: save, - extra_opts: opts + .name = "connlimit", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ipt_connlimit_info)), + .userspacesize = offsetof(struct ipt_connlimit_info,data), + .help = help, + .init = init, + .parse = parse, + .final_check = final_check, + .print = print, + .save = save, + .extra_opts = opts }; void _init(void) diff --git a/extensions/libipt_connrate.c b/extensions/libipt_connrate.c index a952cb7e..3c76a70d 100644 --- a/extensions/libipt_connrate.c +++ b/extensions/libipt_connrate.c @@ -167,20 +167,19 @@ static void save(const struct ipt_ip *ip, const struct ipt_entry_match *match) printf(" "); } -static -struct iptables_match state -= { NULL, - "connrate", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ipt_connrate_info)), - IPT_ALIGN(sizeof(struct ipt_connrate_info)), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +static struct iptables_match state = { + .next = NULL, + .name = "connrate", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ipt_connrate_info)), + .userspacesize = IPT_ALIGN(sizeof(struct ipt_connrate_info)), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; void _init(void) diff --git a/extensions/libipt_conntrack.c b/extensions/libipt_conntrack.c index 63a07a77..6ec77dc4 100644 --- a/extensions/libipt_conntrack.c +++ b/extensions/libipt_conntrack.c @@ -531,20 +531,19 @@ static void save(const struct ipt_ip *ip, const struct ipt_entry_match *match) matchinfo_print(ip, match, 1, "--"); } -static -struct iptables_match conntrack -= { NULL, - "conntrack", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ipt_conntrack_info)), - IPT_ALIGN(sizeof(struct ipt_conntrack_info)), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +static struct iptables_match conntrack = { + .next = NULL, + .name = "conntrack", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ipt_conntrack_info)), + .userspacesize = IPT_ALIGN(sizeof(struct ipt_conntrack_info)), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; void _init(void) diff --git a/extensions/libipt_dscp.c b/extensions/libipt_dscp.c index 1d61da89..b4e8b526 100644 --- a/extensions/libipt_dscp.c +++ b/extensions/libipt_dscp.c @@ -157,20 +157,19 @@ save(const struct ipt_ip *ip, const struct ipt_entry_match *match) print_dscp(dinfo->dscp, dinfo->invert, 1); } -static -struct iptables_match dscp -= { NULL, - "dscp", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ipt_dscp_info)), - IPT_ALIGN(sizeof(struct ipt_dscp_info)), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +static struct iptables_match dscp = { + .next = NULL, + .name = "dscp", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ipt_dscp_info)), + .userspacesize = IPT_ALIGN(sizeof(struct ipt_dscp_info)), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; void _init(void) diff --git a/extensions/libipt_dstlimit.c b/extensions/libipt_dstlimit.c index 32d73321..c4e90c6d 100644 --- a/extensions/libipt_dstlimit.c +++ b/extensions/libipt_dstlimit.c @@ -320,21 +320,20 @@ static void save(const struct ipt_ip *ip, const struct ipt_entry_match *match) printf("--dstlimit-htable-expire %u ", r->cfg.expire); } -static -struct iptables_match dstlimit -= { NULL, - "dstlimit", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ipt_dstlimit_info)), - IPT_ALIGN(sizeof(struct ipt_dstlimit_info)), - //offsetof(struct ipt_dstlimit_info, prev), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +static struct iptables_match dstlimit = { + .next = NULL, + .name = "dstlimit", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ipt_dstlimit_info)), + .userspacesize = IPT_ALIGN(sizeof(struct ipt_dstlimit_info)), + //offsetof(struct ipt_dstlimit_info, prev), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .opts_extra = opts }; void _init(void) diff --git a/extensions/libipt_esp.c b/extensions/libipt_esp.c index 531fdd11..4abfba30 100644 --- a/extensions/libipt_esp.c +++ b/extensions/libipt_esp.c @@ -168,20 +168,19 @@ static void save(const struct ipt_ip *ip, const struct ipt_entry_match *match) } -static -struct iptables_match esp -= { NULL, - "esp", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ipt_esp)), - IPT_ALIGN(sizeof(struct ipt_esp)), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +static struct iptables_match esp = { + .next = NULL, + .name = "esp", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ipt_esp)), + .userspacesize = IPT_ALIGN(sizeof(struct ipt_esp)), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; void diff --git a/extensions/libipt_fuzzy.c b/extensions/libipt_fuzzy.c index 6ebcb9f4..40e071d4 100644 --- a/extensions/libipt_fuzzy.c +++ b/extensions/libipt_fuzzy.c @@ -138,19 +138,19 @@ save(const struct ipt_ip *ip, const struct ipt_entry_match *match) } -struct iptables_match fuzzy_match -= { NULL, - "fuzzy", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ipt_fuzzy_info)), - IPT_ALIGN(sizeof(struct ipt_fuzzy_info)), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +static struct iptables_match fuzzy_match = { + .next = NULL, + .name = "fuzzy", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ipt_fuzzy_info)), + .userspacesize = IPT_ALIGN(sizeof(struct ipt_fuzzy_info)), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; void _init(void) diff --git a/extensions/libipt_hashlimit.c b/extensions/libipt_hashlimit.c index caa444fb..f59b6672 100644 --- a/extensions/libipt_hashlimit.c +++ b/extensions/libipt_hashlimit.c @@ -347,21 +347,19 @@ static void save(const struct ipt_ip *ip, const struct ipt_entry_match *match) printf("--hashlimit-htable-expire %u ", r->cfg.expire); } -static -struct iptables_match hashlimit -= { NULL, - "hashlimit", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ipt_hashlimit_info)), - IPT_ALIGN(sizeof(struct ipt_hashlimit_info)), - //offsetof(struct ipt_hashlimit_info, prev), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +static struct iptables_match hashlimit = { NULL, + .name = "hashlimit", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ipt_hashlimit_info)), + .userspacesize = IPT_ALIGN(sizeof(struct ipt_hashlimit_info)), + //offsetof(struct ipt_hashlimit_info, prev), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; void _init(void) diff --git a/extensions/libipt_helper.c b/extensions/libipt_helper.c index 72660d94..82c1ee09 100644 --- a/extensions/libipt_helper.c +++ b/extensions/libipt_helper.c @@ -87,20 +87,19 @@ save(const struct ipt_ip *ip, const struct ipt_entry_match *match) printf("%s--helper \"%s\" ",info->invert ? "! " : "", info->name); } -static -struct iptables_match helper -= { NULL, - "helper", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ipt_helper_info)), - IPT_ALIGN(sizeof(struct ipt_helper_info)), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +static struct iptables_match helper = { + .next = NULL, + .name = "helper", + .version = IPTABLES_VERSION, + .release = IPT_ALIGN(sizeof(struct ipt_helper_info)), + .size = IPT_ALIGN(sizeof(struct ipt_helper_info)), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; void _init(void) diff --git a/extensions/libipt_icmp.c b/extensions/libipt_icmp.c index f61593e1..32c04f6d 100644 --- a/extensions/libipt_icmp.c +++ b/extensions/libipt_icmp.c @@ -287,20 +287,19 @@ static void final_check(unsigned int flags) { } -static -struct iptables_match icmp -= { NULL, - "icmp", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ipt_icmp)), - IPT_ALIGN(sizeof(struct ipt_icmp)), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +static struct iptables_match icmp = { + .next = NULL, + .name = "icmp", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ipt_icmp)), + .userspacesize = IPT_ALIGN(sizeof(struct ipt_icmp)), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; void _init(void) diff --git a/extensions/libipt_iprange.c b/extensions/libipt_iprange.c index 7e1a8cd6..7d5c1334 100644 --- a/extensions/libipt_iprange.c +++ b/extensions/libipt_iprange.c @@ -173,20 +173,19 @@ save(const struct ipt_ip *ip, const struct ipt_entry_match *match) } } -static -struct iptables_match iprange -= { NULL, - "iprange", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ipt_iprange_info)), - IPT_ALIGN(sizeof(struct ipt_iprange_info)), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +static struct iptables_match iprange = { + .next = NULL, + .name = "iprange", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ipt_iprange_info)), + .userspacesize = IPT_ALIGN(sizeof(struct ipt_iprange_info)), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; void _init(void) diff --git a/extensions/libipt_ipv4options.c b/extensions/libipt_ipv4options.c index 2aec10be..dd3e80a8 100644 --- a/extensions/libipt_ipv4options.c +++ b/extensions/libipt_ipv4options.c @@ -299,20 +299,19 @@ save(const struct ipt_ip *ip, const struct ipt_entry_match *match) printf(" "); } -static -struct iptables_match ipv4options_struct -= { NULL, - "ipv4options", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ipt_ipv4options_info)), - IPT_ALIGN(sizeof(struct ipt_ipv4options_info)), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +static struct iptables_match ipv4options_struct = { + .next = NULL, + .name = "ipv4options", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ipt_ipv4options_info)), + .userspacesize = IPT_ALIGN(sizeof(struct ipt_ipv4options_info)), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; void _init(void) diff --git a/extensions/libipt_length.c b/extensions/libipt_length.c index 8ac98b62..fcd14bcb 100644 --- a/extensions/libipt_length.c +++ b/extensions/libipt_length.c @@ -138,20 +138,19 @@ save(const struct ipt_ip *ip, const struct ipt_entry_match *match) print_length((struct ipt_length_info *)match->data); } -static -struct iptables_match length -= { NULL, - "length", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ipt_length_info)), - IPT_ALIGN(sizeof(struct ipt_length_info)), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +static struct iptables_match length = { + .next = NULL, + .name = "length", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ipt_length_info)), + .userspacesize = IPT_ALIGN(sizeof(struct ipt_length_info)), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; void _init(void) diff --git a/extensions/libipt_limit.c b/extensions/libipt_limit.c index 2b155806..ad5e2733 100644 --- a/extensions/libipt_limit.c +++ b/extensions/libipt_limit.c @@ -177,20 +177,19 @@ static void save(const struct ipt_ip *ip, const struct ipt_entry_match *match) printf("--limit-burst %u ", r->burst); } -static -struct iptables_match limit -= { NULL, - "limit", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ipt_rateinfo)), - offsetof(struct ipt_rateinfo, prev), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +static struct iptables_match limit = { + .next = NULL, + .name = "limit", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ipt_rateinfo)), + .userspacesize = offsetof(struct ipt_rateinfo, prev), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; void _init(void) diff --git a/extensions/libipt_mac.c b/extensions/libipt_mac.c index d1079a5e..30da7fab 100644 --- a/extensions/libipt_mac.c +++ b/extensions/libipt_mac.c @@ -128,20 +128,19 @@ static void save(const struct ipt_ip *ip, const struct ipt_entry_match *match) print_mac(((struct ipt_mac_info *)match->data)->srcaddr); } -static -struct iptables_match mac -= { NULL, - "mac", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ipt_mac_info)), - IPT_ALIGN(sizeof(struct ipt_mac_info)), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +static struct iptables_match mac = { + .next = NULL, + .name = "mac", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ipt_mac_info)), + .userspacesize = IPT_ALIGN(sizeof(struct ipt_mac_info)), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; void _init(void) diff --git a/extensions/libipt_mark.c b/extensions/libipt_mark.c index 14e179ae..1e031ca8 100644 --- a/extensions/libipt_mark.c +++ b/extensions/libipt_mark.c @@ -131,20 +131,19 @@ save(const struct ipt_ip *ip, const struct ipt_entry_match *match) print_mark(info->mark, info->mask, 0); } -static -struct iptables_match mark -= { NULL, - "mark", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ipt_mark_info)), - IPT_ALIGN(sizeof(struct ipt_mark_info)), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +static struct iptables_match mark = { + .next = NULL, + .name = "mark", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ipt_mark_info)), + .userspacesize = IPT_ALIGN(sizeof(struct ipt_mark_info)), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; void _init(void) diff --git a/extensions/libipt_mport.c b/extensions/libipt_mport.c index 28568db0..63acbd9b 100644 --- a/extensions/libipt_mport.c +++ b/extensions/libipt_mport.c @@ -292,19 +292,19 @@ static void save(const struct ipt_ip *ip, const struct ipt_entry_match *match) printf(" "); } -struct iptables_match mport -= { NULL, - "mport", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ipt_mport)), - IPT_ALIGN(sizeof(struct ipt_mport)), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +static struct iptables_match mport = { + .next = NULL, + .name = "mport", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ipt_mport)), + .userspacesize = IPT_ALIGN(sizeof(struct ipt_mport)), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; void diff --git a/extensions/libipt_multiport.c b/extensions/libipt_multiport.c index efcb58ea..9420d5c0 100644 --- a/extensions/libipt_multiport.c +++ b/extensions/libipt_multiport.c @@ -249,20 +249,19 @@ static void save(const struct ipt_ip *ip, const struct ipt_entry_match *match) printf(" "); } -static -struct iptables_match multiport -= { NULL, - "multiport", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ipt_multiport)), - IPT_ALIGN(sizeof(struct ipt_multiport)), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +static struct iptables_match multiport = { + .next = NULL, + .name = "multiport", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ipt_multiport)), + .userspacesize = IPT_ALIGN(sizeof(struct ipt_multiport)), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; void diff --git a/extensions/libipt_nth.c b/extensions/libipt_nth.c index 764c9b97..569b1ade 100644 --- a/extensions/libipt_nth.c +++ b/extensions/libipt_nth.c @@ -217,19 +217,19 @@ save(const struct ipt_ip *ip, const struct ipt_entry_match *match) printf("--packet %u ", nthinfo->packet ); } -struct iptables_match nth -= { NULL, - "nth", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ipt_nth_info)), - IPT_ALIGN(sizeof(struct ipt_nth_info)), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +static struct iptables_match nth = { + .next = NULL, + .name = "nth", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ipt_nth_info)), + .userspacesize = IPT_ALIGN(sizeof(struct ipt_nth_info)), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; void _init(void) diff --git a/extensions/libipt_owner.c b/extensions/libipt_owner.c index 671efbb5..46da9e33 100644 --- a/extensions/libipt_owner.c +++ b/extensions/libipt_owner.c @@ -238,20 +238,19 @@ save(const struct ipt_ip *ip, const struct ipt_entry_match *match) #endif } -static -struct iptables_match owner -= { NULL, - "owner", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ipt_owner_info)), - IPT_ALIGN(sizeof(struct ipt_owner_info)), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +static struct iptables_match owner = { + .next = NULL, + .name = "owner", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ipt_owner_info)), + .userspacesize = IPT_ALIGN(sizeof(struct ipt_owner_info)), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; void _init(void) diff --git a/extensions/libipt_physdev.c b/extensions/libipt_physdev.c index 9149d903..0c4c3576 100644 --- a/extensions/libipt_physdev.c +++ b/extensions/libipt_physdev.c @@ -210,20 +210,19 @@ static void save(const struct ipt_ip *ip, const struct ipt_entry_match *match) printf(" "); } -static -struct iptables_match physdev -= { NULL, - "physdev", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ipt_physdev_info)), - IPT_ALIGN(sizeof(struct ipt_physdev_info)), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +static struct iptables_match physdev = { + .next = NULL, + .name = "physdev", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ipt_physdev_info)), + .userspacesize = IPT_ALIGN(sizeof(struct ipt_physdev_info)), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; void _init(void) diff --git a/extensions/libipt_pkttype.c b/extensions/libipt_pkttype.c index 9141e480..af220955 100644 --- a/extensions/libipt_pkttype.c +++ b/extensions/libipt_pkttype.c @@ -152,20 +152,19 @@ static void save(const struct ipt_ip *ip, const struct ipt_entry_match *match) print_pkttype(info); } -static -struct iptables_match pkttype = { - NULL, - "pkttype", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ipt_pkttype_info)), - IPT_ALIGN(sizeof(struct ipt_pkttype_info)), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +static struct iptables_match pkttype = { + .next = NULL, + .name = "pkttype", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ipt_pkttype_info)), + .userspacesize = IPT_ALIGN(sizeof(struct ipt_pkttype_info)), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; void _init(void) diff --git a/extensions/libipt_pool.c b/extensions/libipt_pool.c index 082d76c2..7e204dad 100644 --- a/extensions/libipt_pool.c +++ b/extensions/libipt_pool.c @@ -122,20 +122,19 @@ static void save(const struct ipt_ip *ip, const struct ipt_entry_match *match) ip_pool_get_name(buf, sizeof(buf), info->dst, 0)); } -static -struct iptables_match pool -= { NULL, - "pool", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ipt_pool_info)), - IPT_ALIGN(sizeof(struct ipt_pool_info)), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +static struct iptables_match pool = { + .next = NULL, + .name = "pool", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ipt_pool_info)), + .userspacesize = IPT_ALIGN(sizeof(struct ipt_pool_info)), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; void _init(void) diff --git a/extensions/libipt_psd.c b/extensions/libipt_psd.c index 068430d9..e150e09e 100644 --- a/extensions/libipt_psd.c +++ b/extensions/libipt_psd.c @@ -175,20 +175,19 @@ save(const struct ipt_ip *ip, const struct ipt_entry_match *match) printf("--psd-hi-ports-weight %u ", psdinfo->hi_ports_weight); } -static -struct iptables_match psd -= { NULL, - "psd", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ipt_psd_info)), - IPT_ALIGN(sizeof(struct ipt_psd_info)), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +static struct iptables_match psd = { + .next = NULL, + .name = "psd", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ipt_psd_info)), + .userspacesize = IPT_ALIGN(sizeof(struct ipt_psd_info)), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; void _init(void) diff --git a/extensions/libipt_quota.c b/extensions/libipt_quota.c index 078f9e35..b0de7adb 100644 --- a/extensions/libipt_quota.c +++ b/extensions/libipt_quota.c @@ -93,18 +93,19 @@ final_check(unsigned int flags) { } -struct iptables_match quota = { NULL, - "quota", - IPTABLES_VERSION, - IPT_ALIGN(sizeof (struct ipt_quota_info)), - IPT_ALIGN(sizeof (struct ipt_quota_info)), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +struct iptables_match quota = { + .next = NULL, + .name = "quota", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof (struct ipt_quota_info)), + .userspacesize = IPT_ALIGN(sizeof (struct ipt_quota_info)), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; void diff --git a/extensions/libipt_random.c b/extensions/libipt_random.c index 273501ae..fd815bbc 100644 --- a/extensions/libipt_random.c +++ b/extensions/libipt_random.c @@ -130,19 +130,19 @@ save(const struct ipt_ip *ip, const struct ipt_entry_match *match) printf("--average %u ", result.quot); } -struct iptables_match rand_match -= { NULL, - "random", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ipt_rand_info)), - IPT_ALIGN(sizeof(struct ipt_rand_info)), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +struct iptables_match rand_match = { + .next = NULL, + .name = "random", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ipt_rand_info)), + .userspacesize = IPT_ALIGN(sizeof(struct ipt_rand_info)), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; void _init(void) diff --git a/extensions/libipt_realm.c b/extensions/libipt_realm.c index 13bc17ca..c8b4f8f7 100644 --- a/extensions/libipt_realm.c +++ b/extensions/libipt_realm.c @@ -113,19 +113,18 @@ final_check(unsigned int flags) "REALM match: You must specify `--realm'"); } -struct iptables_match realm -= { NULL, - "realm", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ipt_realm_info)), - IPT_ALIGN(sizeof(struct ipt_realm_info)), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +static struct iptables_match realm = { NULL, + .name = "realm", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ipt_realm_info)), + .userspacesize = IPT_ALIGN(sizeof(struct ipt_realm_info)), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; void _init(void) diff --git a/extensions/libipt_rpc.c b/extensions/libipt_rpc.c index 7fb05866..07177959 100644 --- a/extensions/libipt_rpc.c +++ b/extensions/libipt_rpc.c @@ -352,18 +352,19 @@ static void save(const struct ipt_ip *ip, const struct ipt_entry_match *match) } -static struct iptables_match rpcstruct = { NULL, - "rpc", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ipt_rpc_info)), - IPT_ALIGN(sizeof(struct ipt_rpc_info)), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +static struct iptables_match rpcstruct = { + .next = NULL, + .name = "rpc", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ipt_rpc_info)), + .userspacesize = IPT_ALIGN(sizeof(struct ipt_rpc_info)), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; diff --git a/extensions/libipt_standard.c b/extensions/libipt_standard.c index d79ad7cf..4c5a3f5a 100644 --- a/extensions/libipt_standard.c +++ b/extensions/libipt_standard.c @@ -48,19 +48,19 @@ save(const struct ipt_ip *ip, const struct ipt_entry_target *target) } static -struct iptables_target standard -= { NULL, - "standard", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(int)), - IPT_ALIGN(sizeof(int)), - &help, - &init, - &parse, - &final_check, - NULL, /* print */ - &save, - opts +struct iptables_target standard = { + .next = NULL, + .name = "standard", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(int)), + .userspacesize = IPT_ALIGN(sizeof(int)), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = NULL, + .save = &save, + .extra_opts = opts }; void _init(void) diff --git a/extensions/libipt_state.c b/extensions/libipt_state.c index 3662d949..8e6a90c5 100644 --- a/extensions/libipt_state.c +++ b/extensions/libipt_state.c @@ -151,20 +151,19 @@ static void save(const struct ipt_ip *ip, const struct ipt_entry_match *match) print_state(sinfo->statemask); } -static -struct iptables_match state -= { NULL, - "state", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ipt_state_info)), - IPT_ALIGN(sizeof(struct ipt_state_info)), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +static struct iptables_match state = { + .next = NULL, + .name = "state", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ipt_state_info)), + .userspacesize = IPT_ALIGN(sizeof(struct ipt_state_info)), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; void _init(void) diff --git a/extensions/libipt_tcp.c b/extensions/libipt_tcp.c index 37613ac0..57515006 100644 --- a/extensions/libipt_tcp.c +++ b/extensions/libipt_tcp.c @@ -423,20 +423,20 @@ static void save(const struct ipt_ip *ip, const struct ipt_entry_match *match) } } -static -struct iptables_match tcp -= { NULL, - "tcp", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ipt_tcp)), - IPT_ALIGN(sizeof(struct ipt_tcp)), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts }; +static struct iptables_match tcp = { + .next = NULL, + .name = "tcp", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ipt_tcp)), + .userspacesize = IPT_ALIGN(sizeof(struct ipt_tcp)), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts +}; void _init(void) diff --git a/extensions/libipt_tcpmss.c b/extensions/libipt_tcpmss.c index 2eb9797e..d596ea74 100644 --- a/extensions/libipt_tcpmss.c +++ b/extensions/libipt_tcpmss.c @@ -139,20 +139,19 @@ save(const struct ipt_ip *ip, const struct ipt_entry_match *match) mssinfo->invert, 0); } -static -struct iptables_match tcpmss -= { NULL, - "tcpmss", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ipt_tcpmss_match_info)), - IPT_ALIGN(sizeof(struct ipt_tcpmss_match_info)), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +static struct iptables_match tcpmss = { + .next = NULL, + .name = "tcpmss", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ipt_tcpmss_match_info)), + .userspacesize = IPT_ALIGN(sizeof(struct ipt_tcpmss_match_info)), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; void _init(void) diff --git a/extensions/libipt_time.c b/extensions/libipt_time.c index d700f86d..cceab58d 100644 --- a/extensions/libipt_time.c +++ b/extensions/libipt_time.c @@ -530,19 +530,19 @@ save(const struct ipt_ip *ip, const struct ipt_entry_match *match) /* have to use offsetof() instead of IPT_ALIGN(), since kerneltime must not * be compared when user deletes rule with '-D' */ static -struct iptables_match timestruct -= { NULL, - "time", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ipt_time_info)), - offsetof(struct ipt_time_info, kerneltime), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +struct iptables_match timestruct = { + .next = NULL, + .name = "time", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ipt_time_info)), + .userspacesize = offsetof(struct ipt_time_info, kerneltime), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; void _init(void) diff --git a/extensions/libipt_tos.c b/extensions/libipt_tos.c index 0d6a1d04..6241950a 100644 --- a/extensions/libipt_tos.c +++ b/extensions/libipt_tos.c @@ -159,20 +159,19 @@ save(const struct ipt_ip *ip, const struct ipt_entry_match *match) print_tos(info->tos, 0); } -static -struct iptables_match tos -= { NULL, - "tos", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ipt_tos_info)), - IPT_ALIGN(sizeof(struct ipt_tos_info)), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +static struct iptables_match tos = { + .next = NULL, + .name = "tos", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ipt_tos_info)), + .userspacesize = IPT_ALIGN(sizeof(struct ipt_tos_info)), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; void _init(void) diff --git a/extensions/libipt_ttl.c b/extensions/libipt_ttl.c index ce87368b..8d47dbec 100644 --- a/extensions/libipt_ttl.c +++ b/extensions/libipt_ttl.c @@ -149,20 +149,19 @@ static struct option opts[] = { { 0 } }; -static -struct iptables_match ttl = { - NULL, - "ttl", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ipt_ttl_info)), - IPT_ALIGN(sizeof(struct ipt_ttl_info)), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +static struct iptables_match ttl = { + .next = NULL, + .name = "ttl", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ipt_ttl_info)), + .userspacesize = IPT_ALIGN(sizeof(struct ipt_ttl_info)), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; diff --git a/extensions/libipt_u32.c b/extensions/libipt_u32.c index 1eea83f6..c5f5b4d9 100644 --- a/extensions/libipt_u32.c +++ b/extensions/libipt_u32.c @@ -250,19 +250,19 @@ static void save(const struct ipt_ip *ip, const struct ipt_entry_match *match) print_u32((struct ipt_u32 *)match->data); } -struct iptables_match u32 -= { NULL, - "u32", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ipt_u32)), - IPT_ALIGN(sizeof(struct ipt_u32)), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +struct iptables_match u32 = { + .next = NULL, + .name = "u32", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ipt_u32)), + .userspacesize = IPT_ALIGN(sizeof(struct ipt_u32)), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; void diff --git a/extensions/libipt_udp.c b/extensions/libipt_udp.c index ccea2105..fb52cf01 100644 --- a/extensions/libipt_udp.c +++ b/extensions/libipt_udp.c @@ -234,19 +234,19 @@ static void save(const struct ipt_ip *ip, const struct ipt_entry_match *match) } static -struct iptables_match udp -= { NULL, - "udp", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ipt_udp)), - IPT_ALIGN(sizeof(struct ipt_udp)), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +struct iptables_match udp = { + .next = NULL, + .name = "udp", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ipt_udp)), + .userspacesize = IPT_ALIGN(sizeof(struct ipt_udp)), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; void diff --git a/extensions/libipt_unclean.c b/extensions/libipt_unclean.c index 16cc0a51..a97b0f0e 100644 --- a/extensions/libipt_unclean.c +++ b/extensions/libipt_unclean.c @@ -42,19 +42,19 @@ static void final_check(unsigned int flags) } static -struct iptables_match unclean -= { NULL, - "unclean", - IPTABLES_VERSION, - IPT_ALIGN(0), - IPT_ALIGN(0), - &help, - &init, - &parse, - &final_check, - NULL, /* print */ - NULL, /* save */ - opts +struct iptables_match unclean = { + .next = NULL, + .name = "unclean", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(0), + .userspacesize = IPT_ALIGN(0), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = NULL, + .save = NULL, + .extra_opts = opts }; void _init(void) -- cgit v1.2.3