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:28:39 +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:28:39 +0000 |
commit | 002261fba0ede5a039d1a65e26d2fa7a37a2f50e (patch) | |
tree | 69c2cb242bed3041027b2ac047b1214e13be48ce /extensions/libipt_condition.c | |
parent | 6e98c4b10565df96d2b4d3e5520e6f0db2e6cff6 (diff) |
[PATCH 09/13] Unique names 3/6
Give symbols of libxt matches unique names (2/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/libipt_condition.c')
-rw-r--r-- | extensions/libipt_condition.c | 44 |
1 files changed, 16 insertions, 28 deletions
diff --git a/extensions/libipt_condition.c b/extensions/libipt_condition.c index 8ce9b53..4a98dd8 100644 --- a/extensions/libipt_condition.c +++ b/extensions/libipt_condition.c @@ -8,9 +8,7 @@ #include<linux/netfilter_ipv4/ip_tables.h> #include<linux/netfilter_ipv4/ipt_condition.h> - -static void -help(void) +static void condition_help(void) { printf("condition match v%s options:\n" "--condition [!] filename " @@ -18,16 +16,13 @@ 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) +static int condition_parse(int c, char **argv, int invert, unsigned int *flags, + const void *entry, struct xt_entry_match **match) { struct condition_info *info = (struct condition_info *) (*match)->data; @@ -53,19 +48,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 condition_info *info = (const struct condition_info *) match->data; @@ -74,9 +65,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 condition_info *info = (const struct condition_info *) match->data; @@ -84,23 +73,22 @@ save(const void *ip, printf("--condition %s\"%s\" ", (info->invert) ? "! " : "", info->name); } - -static struct iptables_match condition = { +static struct iptables_match condition_match = { .name = "condition", .version = IPTABLES_VERSION, .size = IPT_ALIGN(sizeof(struct condition_info)), .userspacesize = IPT_ALIGN(sizeof(struct condition_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_match(&condition); + register_match(&condition_match); } |