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:27:30 +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:27:30 +0000 |
commit | 6e98c4b10565df96d2b4d3e5520e6f0db2e6cff6 (patch) | |
tree | 71983cde1da7010142071d4cdef88da810a18890 /extensions/libxt_CONNMARK.c | |
parent | 0a0a8dbc129729e0028b64b2e9cc8f099f13c4dd (diff) |
[PATCH 08/13] 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_CONNMARK.c')
-rw-r--r-- | extensions/libxt_CONNMARK.c | 46 |
1 files changed, 20 insertions, 26 deletions
diff --git a/extensions/libxt_CONNMARK.c b/extensions/libxt_CONNMARK.c index 9a13074..52359a0 100644 --- a/extensions/libxt_CONNMARK.c +++ b/extensions/libxt_CONNMARK.c @@ -36,8 +36,7 @@ struct markinfo { #endif /* Function which prints out usage message. */ -static void -help(void) +static void CONNMARK_help(void) { printf( "CONNMARK target v%s options:\n" @@ -48,7 +47,7 @@ help(void) IPTABLES_VERSION); } -static const struct option opts[] = { +static const struct option CONNMARK_opts[] = { { "set-mark", 1, NULL, '1' }, { "save-mark", 0, NULL, '2' }, { "restore-mark", 0, NULL, '3' }, @@ -59,9 +58,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) +CONNMARK_parse(int c, char **argv, int invert, unsigned int *flags, + const void *entry, struct xt_entry_target **target) { struct xt_connmark_target_info *markinfo = (struct xt_connmark_target_info *)(*target)->data; @@ -114,8 +112,7 @@ parse(int c, char **argv, int invert, unsigned int *flags, return 1; } -static void -final_check(unsigned int flags) +static void CONNMARK_check(unsigned int flags) { if (!flags) exit_error(PARAMETER_PROBLEM, @@ -137,10 +134,8 @@ print_mask(const char *text, unsigned long mask) /* Prints out the target info. */ -static void -print(const void *ip, - const struct xt_entry_target *target, - int numeric) +static void CONNMARK_print(const void *ip, + const struct xt_entry_target *target, int numeric) { const struct xt_connmark_target_info *markinfo = (const struct xt_connmark_target_info *)target->data; @@ -167,8 +162,7 @@ print(const void *ip, } /* Saves the target into in parsable form to stdout. */ -static void -save(const void *ip, const struct xt_entry_target *target) +static void CONNMARK_save(const void *ip, const struct xt_entry_target *target) { const struct xt_connmark_target_info *markinfo = (const struct xt_connmark_target_info *)target->data; @@ -200,12 +194,12 @@ static struct xtables_target connmark_target = { .version = IPTABLES_VERSION, .size = XT_ALIGN(sizeof(struct xt_connmark_target_info)), .userspacesize = XT_ALIGN(sizeof(struct xt_connmark_target_info)), - .help = &help, - .parse = &parse, - .final_check = &final_check, - .print = &print, - .save = &save, - .extra_opts = opts, + .help = CONNMARK_help, + .parse = CONNMARK_parse, + .final_check = CONNMARK_check, + .print = CONNMARK_print, + .save = CONNMARK_save, + .extra_opts = CONNMARK_opts, }; static struct xtables_target connmark_target6 = { @@ -214,12 +208,12 @@ static struct xtables_target connmark_target6 = { .version = IPTABLES_VERSION, .size = XT_ALIGN(sizeof(struct xt_connmark_target_info)), .userspacesize = XT_ALIGN(sizeof(struct xt_connmark_target_info)), - .help = &help, - .parse = &parse, - .final_check = &final_check, - .print = &print, - .save = &save, - .extra_opts = opts, + .help = CONNMARK_help, + .parse = CONNMARK_parse, + .final_check = CONNMARK_check, + .print = CONNMARK_print, + .save = CONNMARK_save, + .extra_opts = CONNMARK_opts, }; void _init(void) |