diff options
author | /C=EU/ST=EU/CN=Patrick McHardy/emailAddress=kaber@trash.net </C=EU/ST=EU/CN=Patrick McHardy/emailAddress=kaber@trash.net> | 2007-10-04 16:29:21 +0000 |
---|---|---|
committer | /C=EU/ST=EU/CN=Patrick McHardy/emailAddress=kaber@trash.net </C=EU/ST=EU/CN=Patrick McHardy/emailAddress=kaber@trash.net> | 2007-10-04 16:29:21 +0000 |
commit | 2df127b923c944f82e4fff5bd59793b5eee6834f (patch) | |
tree | 42f7b0e1bf015f92f7191dcc34da8b0d7a37412a /extensions/libip6t_condition.c | |
parent | b9f8667c366415051abe9f147385bd92562701b5 (diff) |
[PATCH 11/13] 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_condition.c')
-rw-r--r-- | extensions/libip6t_condition.c | 43 |
1 files changed, 16 insertions, 27 deletions
diff --git a/extensions/libip6t_condition.c b/extensions/libip6t_condition.c index d299902..03e2722 100644 --- a/extensions/libip6t_condition.c +++ b/extensions/libip6t_condition.c @@ -8,9 +8,7 @@ #include<linux/netfilter_ipv6/ip6_tables.h> #include<linux/netfilter_ipv6/ip6t_condition.h> - -static void -help(void) +static void condition_help(void) { printf("condition match v%s options:\n" "--condition [!] filename " @@ -18,16 +16,14 @@ help(void) IPTABLES_VERSION); } - -static const struct option opts[] = { +static const struct option condition_opts[] = { { .name = "condition", .has_arg = 1, .flag = 0, .val = 'X' }, { .name = 0 } }; static int -parse(int c, char **argv, int invert, unsigned int *flags, - const void *entry, - struct xt_entry_match **match) +condition_parse(int c, char **argv, int invert, unsigned int *flags, + const void *entry, struct xt_entry_match **match) { struct condition6_info *info = (struct condition6_info *) (*match)->data; @@ -53,19 +49,15 @@ parse(int c, char **argv, int invert, unsigned int *flags, return 0; } - -static void -final_check(unsigned int flags) +static void condition_check(unsigned int flags) { if (!flags) exit_error(PARAMETER_PROBLEM, "Condition match: must specify --condition"); } - -static void -print(const void *ip, - const struct xt_entry_match *match, int numeric) +static void condition_print(const void *ip, const struct xt_entry_match *match, + int numeric) { const struct condition6_info *info = (const struct condition6_info *) match->data; @@ -74,9 +66,7 @@ print(const void *ip, } -static void -save(const void *ip, - const struct xt_entry_match *match) +static void condition_save(const void *ip, const struct xt_entry_match *match) { const struct condition6_info *info = (const struct condition6_info *) match->data; @@ -84,23 +74,22 @@ save(const void *ip, printf("--condition %s\"%s\" ", (info->invert) ? "! " : "", info->name); } - -static struct ip6tables_match condition = { +static struct ip6tables_match condition_match6 = { .name = "condition", .version = IPTABLES_VERSION, .size = IP6T_ALIGN(sizeof(struct condition6_info)), .userspacesize = IP6T_ALIGN(sizeof(struct condition6_info)), - .help = &help, - .parse = &parse, - .final_check = &final_check, - .print = &print, - .save = &save, - .extra_opts = opts + .help = condition_help, + .parse = condition_parse, + .final_check = condition_check, + .print = condition_print, + .save = condition_save, + .extra_opts = condition_opts, }; void _init(void) { - register_match6(&condition); + register_match6(&condition_match6); } |