summaryrefslogtreecommitdiffstats
path: root/extensions/libip6t_icmp6.c
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@medozas.de>2007-10-04 16:29:21 +0000
committerPatrick McHardy <kaber@trash.net>2007-10-04 16:29:21 +0000
commit997045f536026c0d643bf884da5ff5de2605197f (patch)
tree42f7b0e1bf015f92f7191dcc34da8b0d7a37412a /extensions/libip6t_icmp6.c
parent1d5b63d12984d12c8d87242179855e17657be16d (diff)
Unique names 5/6
Give symbols of libxt matches unique names (3/3). Adds unique prefixes to all functions (most of them - especially the hook functions) so that debugging programs can unambiguously map a symbol to an address. Also unifies the names of the xtables_match/xtables_target structs, (based upon libxt_connmark.c/libip6t_*.c). Signed-off-by: Jan Engelhardt <jengelh@gmx.de>
Diffstat (limited to 'extensions/libip6t_icmp6.c')
-rw-r--r--extensions/libip6t_icmp6.c42
1 files changed, 18 insertions, 24 deletions
diff --git a/extensions/libip6t_icmp6.c b/extensions/libip6t_icmp6.c
index 02108497..febf5237 100644
--- a/extensions/libip6t_icmp6.c
+++ b/extensions/libip6t_icmp6.c
@@ -74,8 +74,7 @@ print_icmpv6types(void)
}
/* Function which prints out usage message. */
-static void
-help(void)
+static void icmp6_help(void)
{
printf(
"ICMPv6 v%s options:\n"
@@ -85,7 +84,7 @@ help(void)
print_icmpv6types();
}
-static const struct option opts[] = {
+static const struct option icmp6_opts[] = {
{ "icmpv6-type", 1, NULL, '1' },
{ }
};
@@ -144,8 +143,7 @@ parse_icmpv6(const char *icmpv6type, u_int8_t *type, u_int8_t code[])
}
/* Initialize the match. */
-static void
-init(struct xt_entry_match *m)
+static void icmp6_init(struct xt_entry_match *m)
{
struct ip6t_icmp *icmpv6info = (struct ip6t_icmp *)m->data;
@@ -154,10 +152,8 @@ init(struct xt_entry_match *m)
/* Function which parses command options; returns true if it
ate an option */
-static int
-parse(int c, char **argv, int invert, unsigned int *flags,
- const void *entry,
- struct xt_entry_match **match)
+static int icmp6_parse(int c, char **argv, int invert, unsigned int *flags,
+ const void *entry, struct xt_entry_match **match)
{
struct ip6t_icmp *icmpv6info = (struct ip6t_icmp *)(*match)->data;
@@ -219,10 +215,8 @@ static void print_icmpv6type(u_int8_t type,
}
/* Prints out the union ipt_matchinfo. */
-static void
-print(const void *ip,
- const struct xt_entry_match *match,
- int numeric)
+static void icmp6_print(const void *ip, const struct xt_entry_match *match,
+ int numeric)
{
const struct ip6t_icmp *icmpv6 = (struct ip6t_icmp *)match->data;
@@ -237,7 +231,7 @@ print(const void *ip,
}
/* Saves the match in parsable form to stdout. */
-static void save(const void *ip, const struct xt_entry_match *match)
+static void icmp6_save(const void *ip, const struct xt_entry_match *match)
{
const struct ip6t_icmp *icmpv6 = (struct ip6t_icmp *)match->data;
@@ -250,28 +244,28 @@ static void save(const void *ip, const struct xt_entry_match *match)
printf(" ");
}
-static void final_check(unsigned int flags)
+static void icmp6_check(unsigned int flags)
{
if (!flags)
exit_error(PARAMETER_PROBLEM,
"icmpv6 match: You must specify `--icmpv6-type'");
}
-static struct ip6tables_match icmpv6 = {
+static struct ip6tables_match icmp6_match6 = {
.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,
+ .help = icmp6_help,
+ .init = icmp6_init,
+ .parse = icmp6_parse,
+ .final_check = icmp6_check,
+ .print = icmp6_print,
+ .save = icmp6_save,
+ .extra_opts = icmp6_opts,
};
void _init(void)
{
- register_match6(&icmpv6);
+ register_match6(&icmp6_match6);
}