diff options
author | Jan Engelhardt <jengelh@medozas.de> | 2007-10-04 16:27:30 +0000 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2007-10-04 16:27:30 +0000 |
commit | 932e648f38ac16b1ea14c1f66f23951388448c5a (patch) | |
tree | 71983cde1da7010142071d4cdef88da810a18890 /extensions/libxt_SECMARK.c | |
parent | 181dead3f13befe02769ef479bcbb51801b7fc4e (diff) |
Unique names 2/6
Give symbols of libxt targets unique names (1/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/libxt_SECMARK.c')
-rw-r--r-- | extensions/libxt_SECMARK.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/extensions/libxt_SECMARK.c b/extensions/libxt_SECMARK.c index 9db1514d..0aeaee93 100644 --- a/extensions/libxt_SECMARK.c +++ b/extensions/libxt_SECMARK.c @@ -14,7 +14,7 @@ #define PFX "SECMARK target: " -static void help(void) +static void SECMARK_help(void) { printf( "SECMARK target v%s options:\n" @@ -23,7 +23,7 @@ static void help(void) IPTABLES_VERSION); } -static const struct option opts[] = { +static const struct option SECMARK_opts[] = { { "selctx", 1, 0, '1' }, { 0 } }; @@ -32,8 +32,8 @@ static const struct option opts[] = { * 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_target **target) +static int SECMARK_parse(int c, char **argv, int invert, unsigned int *flags, + const void *entry, struct xt_entry_target **target) { struct xt_secmark_target_info *info = (struct xt_secmark_target_info*)(*target)->data; @@ -61,7 +61,7 @@ static int parse(int c, char **argv, int invert, unsigned int *flags, return 1; } -static void final_check(unsigned int flags) +static void SECMARK_check(unsigned int flags) { if (!flags) exit_error(PARAMETER_PROBLEM, PFX "parameter required"); @@ -79,8 +79,8 @@ static void print_secmark(struct xt_secmark_target_info *info) } } -static void print(const void *ip, - const struct xt_entry_target *target, int numeric) +static void SECMARK_print(const void *ip, const struct xt_entry_target *target, + int numeric) { struct xt_secmark_target_info *info = (struct xt_secmark_target_info*)(target)->data; @@ -90,7 +90,7 @@ static void print(const void *ip, } /* Saves the target info in parsable form to stdout. */ -static void save(const void *ip, const struct xt_entry_target *target) +static void SECMARK_save(const void *ip, const struct xt_entry_target *target) { struct xt_secmark_target_info *info = (struct xt_secmark_target_info*)target->data; @@ -99,38 +99,38 @@ static void save(const void *ip, const struct xt_entry_target *target) print_secmark(info); } -static struct xtables_target secmark = { +static struct xtables_target secmark_target = { .family = AF_INET, .name = "SECMARK", .version = IPTABLES_VERSION, .revision = 0, .size = XT_ALIGN(sizeof(struct xt_secmark_target_info)), .userspacesize = XT_ALIGN(sizeof(struct xt_secmark_target_info)), - .help = &help, - .parse = &parse, - .final_check = &final_check, - .print = &print, - .save = &save, - .extra_opts = opts + .help = SECMARK_help, + .parse = SECMARK_parse, + .final_check = SECMARK_check, + .print = SECMARK_print, + .save = SECMARK_save, + .extra_opts = SECMARK_opts, }; -static struct xtables_target secmark6 = { +static struct xtables_target secmark_target6 = { .family = AF_INET6, .name = "SECMARK", .version = IPTABLES_VERSION, .revision = 0, .size = XT_ALIGN(sizeof(struct xt_secmark_target_info)), .userspacesize = XT_ALIGN(sizeof(struct xt_secmark_target_info)), - .help = &help, - .parse = &parse, - .final_check = &final_check, - .print = &print, - .save = &save, - .extra_opts = opts + .help = SECMARK_help, + .parse = SECMARK_parse, + .final_check = SECMARK_check, + .print = SECMARK_print, + .save = SECMARK_save, + .extra_opts = SECMARK_opts, }; void _init(void) { - xtables_register_target(&secmark); - xtables_register_target(&secmark6); + xtables_register_target(&secmark_target); + xtables_register_target(&secmark_target6); } |