From 932e648f38ac16b1ea14c1f66f23951388448c5a Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Thu, 4 Oct 2007 16:27:30 +0000 Subject: 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 --- extensions/libxt_TRACE.c | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) (limited to 'extensions/libxt_TRACE.c') diff --git a/extensions/libxt_TRACE.c b/extensions/libxt_TRACE.c index 93610365..c70df6ab 100644 --- a/extensions/libxt_TRACE.c +++ b/extensions/libxt_TRACE.c @@ -8,8 +8,7 @@ #include /* Function which prints out usage message. */ -static void -help(void) +static void TRACE_help(void) { printf( "TRACE target v%s takes no options\n", @@ -18,36 +17,34 @@ IPTABLES_VERSION); /* 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 TRACE_parse(int c, char **argv, int invert, unsigned int *flags, + const void *entry, struct xt_entry_target **target) { return 0; } -static struct xtables_target trace = { +static struct xtables_target trace_target = { .family = AF_INET, .name = "TRACE", .version = IPTABLES_VERSION, .size = XT_ALIGN(0), .userspacesize = XT_ALIGN(0), - .help = &help, - .parse = &parse, + .help = TRACE_help, + .parse = TRACE_parse, }; -static struct xtables_target trace6 = { +static struct xtables_target trace_target6 = { .family = AF_INET6, .name = "TRACE", .version = IPTABLES_VERSION, .size = XT_ALIGN(0), .userspacesize = XT_ALIGN(0), - .help = &help, - .parse = &parse, + .help = TRACE_help, + .parse = TRACE_parse, }; void _init(void) { - xtables_register_target(&trace); - xtables_register_target(&trace6); + xtables_register_target(&trace_target); + xtables_register_target(&trace_target6); } -- cgit v1.2.3