From 1d5b63d12984d12c8d87242179855e17657be16d Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Thu, 4 Oct 2007 16:29:00 +0000 Subject: Unique names 4/6 Give symbols of libxt targets 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 --- extensions/libipt_ECN.c | 39 ++++++++++++++++----------------------- 1 file changed, 16 insertions(+), 23 deletions(-) (limited to 'extensions/libipt_ECN.c') diff --git a/extensions/libipt_ECN.c b/extensions/libipt_ECN.c index 8a73d9b5..817559a5 100644 --- a/extensions/libipt_ECN.c +++ b/extensions/libipt_ECN.c @@ -17,7 +17,7 @@ #include #include -static void help(void) +static void ECN_help(void) { printf( "ECN target v%s options\n" @@ -33,7 +33,7 @@ static void help(void) #endif -static const struct option opts[] = { +static const struct option ECN_opts[] = { { "ecn-tcp-remove", 0, NULL, 'F' }, { "ecn-tcp-cwr", 1, NULL, 'G' }, { "ecn-tcp-ece", 1, NULL, 'H' }, @@ -41,10 +41,8 @@ static const struct option opts[] = { { } }; -static int -parse(int c, char **argv, int invert, unsigned int *flags, - const void *entry, - struct xt_entry_target **target) +static int ECN_parse(int c, char **argv, int invert, unsigned int *flags, + const void *entry, struct xt_entry_target **target) { unsigned int result; struct ipt_ECN_info *einfo @@ -100,8 +98,7 @@ parse(int c, char **argv, int invert, unsigned int *flags, return 1; } -static void -final_check(unsigned int flags) +static void ECN_check(unsigned int flags) { if (!flags) exit_error(PARAMETER_PROBLEM, @@ -109,10 +106,8 @@ final_check(unsigned int flags) } /* Prints out the targinfo. */ -static void -print(const void *ip, - const struct xt_entry_target *target, - int numeric) +static void ECN_print(const void *ip, const struct xt_entry_target *target, + int numeric) { const struct ipt_ECN_info *einfo = (const struct ipt_ECN_info *)target->data; @@ -136,8 +131,7 @@ print(const void *ip, } /* Saves the union ipt_targinfo in parsable form to stdout. */ -static void -save(const void *ip, const struct xt_entry_target *target) +static void ECN_save(const void *ip, const struct xt_entry_target *target) { const struct ipt_ECN_info *einfo = (const struct ipt_ECN_info *)target->data; @@ -159,21 +153,20 @@ save(const void *ip, const struct xt_entry_target *target) } } -static -struct iptables_target ecn = { +static struct iptables_target ecn_target = { .name = "ECN", .version = IPTABLES_VERSION, .size = IPT_ALIGN(sizeof(struct ipt_ECN_info)), .userspacesize = IPT_ALIGN(sizeof(struct ipt_ECN_info)), - .help = &help, - .parse = &parse, - .final_check = &final_check, - .print = &print, - .save = &save, - .extra_opts = opts + .help = ECN_help, + .parse = ECN_parse, + .final_check = ECN_check, + .print = ECN_print, + .save = ECN_save, + .extra_opts = ECN_opts, }; void _init(void) { - register_target(&ecn); + register_target(&ecn_target); } -- cgit v1.2.3