summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--extensions/libip6t_REJECT.c25
-rw-r--r--extensions/libip6t_ROUTE.c26
-rw-r--r--extensions/libip6t_eui64.c26
-rw-r--r--extensions/libip6t_hbh.c28
-rw-r--r--extensions/libip6t_icmpv6.c25
-rw-r--r--extensions/libip6t_ipv6header.c25
-rw-r--r--extensions/libip6t_length.c25
-rw-r--r--extensions/libip6t_limit.c26
-rw-r--r--extensions/libip6t_mac.c26
-rw-r--r--extensions/libip6t_mark.c26
-rw-r--r--extensions/libip6t_multiport.c26
-rw-r--r--extensions/libip6t_nth.c25
-rw-r--r--extensions/libip6t_owner.c26
-rw-r--r--extensions/libip6t_physdev.c26
-rw-r--r--extensions/libip6t_random.c25
-rw-r--r--extensions/libip6t_rt.c26
-rw-r--r--extensions/libip6t_standard.c25
-rw-r--r--extensions/libip6t_tcp.c27
-rw-r--r--extensions/libip6t_udp.c26
19 files changed, 229 insertions, 261 deletions
diff --git a/extensions/libip6t_REJECT.c b/extensions/libip6t_REJECT.c
index 8c4cc7f..702f6b3 100644
--- a/extensions/libip6t_REJECT.c
+++ b/extensions/libip6t_REJECT.c
@@ -152,19 +152,18 @@ static void save(const struct ip6t_ip6 *ip,
printf("--reject-with %s ", reject_table[i].name);
}
-struct ip6tables_target reject
-= { NULL,
- "REJECT",
- IPTABLES_VERSION,
- IP6T_ALIGN(sizeof(struct ip6t_reject_info)),
- IP6T_ALIGN(sizeof(struct ip6t_reject_info)),
- &help,
- &init,
- &parse,
- &final_check,
- &print,
- &save,
- opts
+struct ip6tables_target reject = {
+ .name = "REJECT",
+ .version = IPTABLES_VERSION,
+ .size = IP6T_ALIGN(sizeof(struct ip6t_reject_info)),
+ .userspacesize = IP6T_ALIGN(sizeof(struct ip6t_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/libip6t_ROUTE.c b/extensions/libip6t_ROUTE.c
index 94a9180..ad83a1d 100644
--- a/extensions/libip6t_ROUTE.c
+++ b/extensions/libip6t_ROUTE.c
@@ -220,20 +220,18 @@ static void save(const struct ip6t_ip6 *ip,
}
-static
-struct ip6tables_target route
-= { NULL,
- "ROUTE",
- IPTABLES_VERSION,
- IP6T_ALIGN(sizeof(struct ip6t_route_target_info)),
- IP6T_ALIGN(sizeof(struct ip6t_route_target_info)),
- &help,
- &init,
- &parse,
- &final_check,
- &print,
- &save,
- opts
+static struct ip6tables_target route = {
+ .name = "ROUTE",
+ .version = IPTABLES_VERSION,
+ .size = IP6T_ALIGN(sizeof(struct ip6t_route_target_info)),
+ .userspacesize = IP6T_ALIGN(sizeof(struct ip6t_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/libip6t_eui64.c b/extensions/libip6t_eui64.c
index 56dca06..f8962c6 100644
--- a/extensions/libip6t_eui64.c
+++ b/extensions/libip6t_eui64.c
@@ -65,20 +65,18 @@ static void save(const struct ip6t_ip6 *ip, const struct ip6t_entry_match *match
}
-static
-struct ip6tables_match eui64
-= { NULL,
- "eui64",
- IPTABLES_VERSION,
- IP6T_ALIGN(sizeof(int)),
- IP6T_ALIGN(sizeof(int)),
- &help,
- &init,
- &parse,
- &final_check,
- &print,
- &save,
- opts
+static struct ip6tables_match eui64 = {
+ .name = "eui64",
+ .version = IPTABLES_VERSION,
+ .size = IP6T_ALIGN(sizeof(int)),
+ .userspacesize = IP6T_ALIGN(sizeof(int)),
+ .help = &help,
+ .init = &init,
+ .parse = &parse,
+ .final_check = &final_check,
+ .print = &print,
+ .save = &save,
+ .extra_opts = opts,
};
void _init(void)
diff --git a/extensions/libip6t_hbh.c b/extensions/libip6t_hbh.c
index d0acd42..bdcbf9b 100644
--- a/extensions/libip6t_hbh.c
+++ b/extensions/libip6t_hbh.c
@@ -237,24 +237,22 @@ static void save(const struct ip6t_ip6 *ip, const struct ip6t_entry_match *match
}
-static
-struct ip6tables_match optstruct
-= { NULL,
+static struct ip6tables_match optstruct = {
#if HOPBYHOP
- "hbh",
+ .name = "hbh",
#else
- "dst",
+ .name = "dst",
#endif
- IPTABLES_VERSION,
- IP6T_ALIGN(sizeof(struct ip6t_opts)),
- IP6T_ALIGN(sizeof(struct ip6t_opts)),
- &help,
- &init,
- &parse,
- &final_check,
- &print,
- &save,
- opts
+ .version = IPTABLES_VERSION,
+ .size = IP6T_ALIGN(sizeof(struct ip6t_opts)),
+ .userspacesize = IP6T_ALIGN(sizeof(struct ip6t_opts)),
+ .help = &help,
+ .init = &init,
+ .parse = &parse,
+ .final_check = &final_check,
+ .print = &print,
+ .save = &save,
+ .extra_opts = opts,
};
void
diff --git a/extensions/libip6t_icmpv6.c b/extensions/libip6t_icmpv6.c
index 52d7871..62ee90f 100644
--- a/extensions/libip6t_icmpv6.c
+++ b/extensions/libip6t_icmpv6.c
@@ -257,19 +257,18 @@ static void final_check(unsigned int flags)
{
}
-static struct ip6tables_match icmpv6
-= { NULL,
- "icmp6",
- IPTABLES_VERSION,
- IP6T_ALIGN(sizeof(struct ip6t_icmp)),
- IP6T_ALIGN(sizeof(struct ip6t_icmp)),
- &help,
- &init,
- &parse,
- &final_check,
- &print,
- &save,
- opts
+static struct ip6tables_match icmpv6 = {
+ .name = "icmp6",
+ .version = IPTABLES_VERSION,
+ .size = IP6T_ALIGN(sizeof(struct ip6t_icmp)),
+ .userspacesize = IP6T_ALIGN(sizeof(struct ip6t_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/libip6t_ipv6header.c b/extensions/libip6t_ipv6header.c
index 3437e22..a06ced6 100644
--- a/extensions/libip6t_ipv6header.c
+++ b/extensions/libip6t_ipv6header.c
@@ -298,19 +298,18 @@ save(const struct ip6t_ip6 *ip,
}
static
-struct ip6tables_match ipv6header
-= { NULL,
- "ipv6header",
- IPTABLES_VERSION,
- IP6T_ALIGN(sizeof(struct ip6t_ipv6header_info)),
- IP6T_ALIGN(sizeof(struct ip6t_ipv6header_info)),
- &help,
- &init,
- &parse,
- &final_check,
- &print,
- &save,
- opts
+struct ip6tables_match ipv6header = {
+ .name = "ipv6header",
+ .version = IPTABLES_VERSION,
+ .size = IP6T_ALIGN(sizeof(struct ip6t_ipv6header_info)),
+ .userspacesize = IP6T_ALIGN(sizeof(struct ip6t_ipv6header_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/libip6t_length.c b/extensions/libip6t_length.c
index b8fa15b..0d531ae 100644
--- a/extensions/libip6t_length.c
+++ b/extensions/libip6t_length.c
@@ -140,19 +140,18 @@ save(const struct ip6t_ip6 *ip, const struct ip6t_entry_match *match)
print_length((struct ip6t_length_info *)match->data);
}
-struct ip6tables_match length
-= { NULL,
- "length",
- IPTABLES_VERSION,
- IP6T_ALIGN(sizeof(struct ip6t_length_info)),
- IP6T_ALIGN(sizeof(struct ip6t_length_info)),
- &help,
- &init,
- &parse,
- &final_check,
- &print,
- &save,
- opts
+struct ip6tables_match length = {
+ .name = "length",
+ .version = IPTABLES_VERSION,
+ .size = IP6T_ALIGN(sizeof(struct ip6t_length_info)),
+ .userspacesize = IP6T_ALIGN(sizeof(struct ip6t_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/libip6t_limit.c b/extensions/libip6t_limit.c
index 5084946..927b6d1 100644
--- a/extensions/libip6t_limit.c
+++ b/extensions/libip6t_limit.c
@@ -177,20 +177,18 @@ static void save(const struct ip6t_ip6 *ip, const struct ip6t_entry_match *match
printf("--limit-burst %u ", r->burst);
}
-static
-struct ip6tables_match limit
-= { NULL,
- "limit",
- IPTABLES_VERSION,
- IP6T_ALIGN(sizeof(struct ip6t_rateinfo)),
- offsetof(struct ip6t_rateinfo, prev),
- &help,
- &init,
- &parse,
- &final_check,
- &print,
- &save,
- opts
+static struct ip6tables_match limit = {
+ .name = "limit",
+ .version = IPTABLES_VERSION,
+ .size = IP6T_ALIGN(sizeof(struct ip6t_rateinfo)),
+ .userspacesize = offsetof(struct ip6t_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/libip6t_mac.c b/extensions/libip6t_mac.c
index 617b353..353f746 100644
--- a/extensions/libip6t_mac.c
+++ b/extensions/libip6t_mac.c
@@ -128,20 +128,18 @@ static void save(const struct ip6t_ip6 *ip, const struct ip6t_entry_match *match
print_mac(((struct ip6t_mac_info *)match->data)->srcaddr);
}
-static
-struct ip6tables_match mac
-= { NULL,
- "mac",
- IPTABLES_VERSION,
- IP6T_ALIGN(sizeof(struct ip6t_mac_info)),
- IP6T_ALIGN(sizeof(struct ip6t_mac_info)),
- &help,
- &init,
- &parse,
- &final_check,
- &print,
- &save,
- opts
+static struct ip6tables_match mac = {
+ .name = "mac",
+ .version = IPTABLES_VERSION,
+ .size = IP6T_ALIGN(sizeof(struct ip6t_mac_info)),
+ .userspacesize = IP6T_ALIGN(sizeof(struct ip6t_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/libip6t_mark.c b/extensions/libip6t_mark.c
index 5f335eb..54a279e 100644
--- a/extensions/libip6t_mark.c
+++ b/extensions/libip6t_mark.c
@@ -131,20 +131,18 @@ save(const struct ip6t_ip6 *ip, const struct ip6t_entry_match *match)
print_mark(info->mark, info->mask, 0);
}
-static
-struct ip6tables_match mark
-= { NULL,
- "mark",
- IPTABLES_VERSION,
- IP6T_ALIGN(sizeof(struct ip6t_mark_info)),
- IP6T_ALIGN(sizeof(struct ip6t_mark_info)),
- &help,
- &init,
- &parse,
- &final_check,
- &print,
- &save,
- opts
+static struct ip6tables_match mark = {
+ .name = "mark",
+ .version = IPTABLES_VERSION,
+ .size = IP6T_ALIGN(sizeof(struct ip6t_mark_info)),
+ .userspacesize = IP6T_ALIGN(sizeof(struct ip6t_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/libip6t_multiport.c b/extensions/libip6t_multiport.c
index 2dc406d..0206c1d 100644
--- a/extensions/libip6t_multiport.c
+++ b/extensions/libip6t_multiport.c
@@ -249,20 +249,18 @@ static void save(const struct ip6t_ip6 *ip, const struct ip6t_entry_match *match
printf(" ");
}
-static
-struct ip6tables_match multiport
-= { NULL,
- "multiport",
- IPTABLES_VERSION,
- IP6T_ALIGN(sizeof(struct ip6t_multiport)),
- IP6T_ALIGN(sizeof(struct ip6t_multiport)),
- &help,
- &init,
- &parse,
- &final_check,
- &print,
- &save,
- opts
+static struct ip6tables_match multiport = {
+ .name = "multiport",
+ .version = IPTABLES_VERSION,
+ .size = IP6T_ALIGN(sizeof(struct ip6t_multiport)),
+ .userspacesize = IP6T_ALIGN(sizeof(struct ip6t_multiport)),
+ .help = &help,
+ .init = &init,
+ .parase = &parse,
+ .final_check = &final_check,
+ .print = &print,
+ .save = &save,
+ .extra_opts = opts,
};
void
diff --git a/extensions/libip6t_nth.c b/extensions/libip6t_nth.c
index 638074d..26eeb26 100644
--- a/extensions/libip6t_nth.c
+++ b/extensions/libip6t_nth.c
@@ -217,19 +217,18 @@ save(const struct ip6t_ip6 *ip, const struct ip6t_entry_match *match)
printf("--packet %u ", nthinfo->packet );
}
-struct ip6tables_match nth
-= { NULL,
- "nth",
- IPTABLES_VERSION,
- IP6T_ALIGN(sizeof(struct ip6t_nth_info)),
- IP6T_ALIGN(sizeof(struct ip6t_nth_info)),
- &help,
- &init,
- &parse,
- &final_check,
- &print,
- &save,
- opts
+struct ip6tables_match nth = {
+ .name = "nth",
+ .version = IPTABLES_VERSION,
+ .size = IP6T_ALIGN(sizeof(struct ip6t_nth_info)),
+ .userspacesize = IP6T_ALIGN(sizeof(struct ip6t_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/libip6t_owner.c b/extensions/libip6t_owner.c
index 6d7258d..ec5c4fd 100644
--- a/extensions/libip6t_owner.c
+++ b/extensions/libip6t_owner.c
@@ -237,20 +237,18 @@ save(const struct ip6t_ip6 *ip, const struct ip6t_entry_match *match)
#endif
}
-static
-struct ip6tables_match owner
-= { NULL,
- "owner",
- IPTABLES_VERSION,
- IP6T_ALIGN(sizeof(struct ip6t_owner_info)),
- IP6T_ALIGN(sizeof(struct ip6t_owner_info)),
- &help,
- &init,
- &parse,
- &final_check,
- &print,
- &save,
- opts
+static struct ip6tables_match owner = {
+ .name = "owner",
+ .version = IPTABLES_VERSION,
+ .size = IP6T_ALIGN(sizeof(struct ip6t_owner_info)),
+ .userspacesize = IP6T_ALIGN(sizeof(struct ip6t_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/libip6t_physdev.c b/extensions/libip6t_physdev.c
index d5fc506..ab2087c 100644
--- a/extensions/libip6t_physdev.c
+++ b/extensions/libip6t_physdev.c
@@ -210,20 +210,18 @@ static void save(const struct ip6t_ip6 *ip, const struct ip6t_entry_match *match
printf(" ");
}
-static
-struct ip6tables_match physdev
-= { NULL,
- "physdev",
- IPTABLES_VERSION,
- IP6T_ALIGN(sizeof(struct ip6t_physdev_info)),
- IP6T_ALIGN(sizeof(struct ip6t_physdev_info)),
- &help,
- &init,
- &parse,
- &final_check,
- &print,
- &save,
- opts
+static struct ip6tables_match physdev = {
+ .name = "physdev",
+ .version = IPTABLES_VERSION,
+ .size = IP6T_ALIGN(sizeof(struct ip6t_physdev_info)),
+ .userspacesize = IP6T_ALIGN(sizeof(struct ip6t_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/libip6t_random.c b/extensions/libip6t_random.c
index 5f151ea..a4d1d29 100644
--- a/extensions/libip6t_random.c
+++ b/extensions/libip6t_random.c
@@ -131,19 +131,18 @@ save(const struct ip6t_ip6 *ip, const struct ip6t_entry_match *match)
printf("--average %u ", result.quot);
}
-struct ip6tables_match rand_match
-= { NULL,
- "random",
- IPTABLES_VERSION,
- IP6T_ALIGN(sizeof(struct ip6t_rand_info)),
- IP6T_ALIGN(sizeof(struct ip6t_rand_info)),
- &help,
- &init,
- &parse,
- &final_check,
- &print,
- &save,
- opts
+struct ip6tables_match rand_match = {
+ .name = "random",
+ .version = IPTABLES_VERSION,
+ .size = IP6T_ALIGN(sizeof(struct ip6t_rand_info)),
+ .userspacesize = IP6T_ALIGN(sizeof(struct ip6t_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/libip6t_rt.c b/extensions/libip6t_rt.c
index 06cab16..251604b 100644
--- a/extensions/libip6t_rt.c
+++ b/extensions/libip6t_rt.c
@@ -341,20 +341,18 @@ static void save(const struct ip6t_ip6 *ip, const struct ip6t_entry_match *match
}
-static
-struct ip6tables_match rt
-= { NULL,
- "rt",
- IPTABLES_VERSION,
- IP6T_ALIGN(sizeof(struct ip6t_rt)),
- IP6T_ALIGN(sizeof(struct ip6t_rt)),
- &help,
- &init,
- &parse,
- &final_check,
- &print,
- &save,
- opts
+static struct ip6tables_match rt = {
+ .name = "rt",
+ .version = IPTABLES_VERSION,
+ .size = IP6T_ALIGN(sizeof(struct ip6t_rt)),
+ .userspacesize = IP6T_ALIGN(sizeof(struct ip6t_rt)),
+ .help = &help,
+ .init = &init,
+ .parse = &parse,
+ .final_check = &final_check,
+ .print = &print,
+ .save = &save,
+ .extra_opts = opts,
};
void
diff --git a/extensions/libip6t_standard.c b/extensions/libip6t_standard.c
index b8a0ce7..c48882f 100644
--- a/extensions/libip6t_standard.c
+++ b/extensions/libip6t_standard.c
@@ -47,20 +47,17 @@ save(const struct ip6t_ip6 *ip6, const struct ip6t_entry_target *target)
{
}
-static
-struct ip6tables_target standard
-= { NULL,
- "standard",
- IPTABLES_VERSION,
- IP6T_ALIGN(sizeof(int)),
- IP6T_ALIGN(sizeof(int)),
- &help,
- &init,
- &parse,
- &final_check,
- NULL, /* print */
- &save,
- opts
+static struct ip6tables_target standard = {
+ .name = "standard",
+ .version = IPTABLES_VERSION,
+ .size = IP6T_ALIGN(sizeof(int)),
+ .userspacesize = IP6T_ALIGN(sizeof(int)),
+ .help = &help,
+ .init = &init,
+ .parse = &parse,
+ .final_check = &final_check,
+ .save = &save,
+ .extra_opts = opts,
};
void _init(void)
diff --git a/extensions/libip6t_tcp.c b/extensions/libip6t_tcp.c
index a1a912c..3cd2352 100644
--- a/extensions/libip6t_tcp.c
+++ b/extensions/libip6t_tcp.c
@@ -424,20 +424,19 @@ static void save(const struct ip6t_ip6 *ip, const struct ip6t_entry_match *match
}
}
-static
-struct ip6tables_match tcp
-= { NULL,
- "tcp",
- IPTABLES_VERSION,
- IP6T_ALIGN(sizeof(struct ip6t_tcp)),
- IP6T_ALIGN(sizeof(struct ip6t_tcp)),
- &help,
- &init,
- &parse,
- &final_check,
- &print,
- &save,
- opts };
+static struct ip6tables_match tcp = {
+ .name = "tcp",
+ .version = IPTABLES_VERSION,
+ .size = IP6T_ALIGN(sizeof(struct ip6t_tcp)),
+ .userspacesize = IP6T_ALIGN(sizeof(struct ip6t_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/libip6t_udp.c b/extensions/libip6t_udp.c
index 139386c..73e1d1e 100644
--- a/extensions/libip6t_udp.c
+++ b/extensions/libip6t_udp.c
@@ -233,20 +233,18 @@ static void save(const struct ip6t_ip6 *ip, const struct ip6t_entry_match *match
}
}
-static
-struct ip6tables_match udp
-= { NULL,
- "udp",
- IPTABLES_VERSION,
- IP6T_ALIGN(sizeof(struct ip6t_udp)),
- IP6T_ALIGN(sizeof(struct ip6t_udp)),
- &help,
- &init,
- &parse,
- &final_check,
- &print,
- &save,
- opts
+static struct ip6tables_match udp = {
+ .name = "udp",
+ .version = IPTABLES_VERSION,
+ .size = IP6T_ALIGN(sizeof(struct ip6t_udp)),
+ .userspacesize = IP6T_ALIGN(sizeof(struct ip6t_udp)),
+ .help = &help,
+ .init = &init,
+ .parse = &parse,
+ .final_check = &final_check,
+ .print = &print,
+ .save = &save,
+ .extra_opts = opts,
};
void