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_NOTRACK.c | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) (limited to 'extensions/libxt_NOTRACK.c') diff --git a/extensions/libxt_NOTRACK.c b/extensions/libxt_NOTRACK.c index 3a01475d..18ad5e13 100644 --- a/extensions/libxt_NOTRACK.c +++ b/extensions/libxt_NOTRACK.c @@ -8,8 +8,7 @@ #include /* Function which prints out usage message. */ -static void -help(void) +static void NOTRACK_help(void) { printf( "NOTRACK target v%s takes no options\n", @@ -19,39 +18,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) +NOTRACK_parse(int c, char **argv, int invert, unsigned int *flags, + const void *entry, struct xt_entry_target **target) { return 0; } -static -struct xtables_target notrack = -{ +static struct xtables_target notrack_target = { .family = AF_INET, .name = "NOTRACK", .version = IPTABLES_VERSION, .size = XT_ALIGN(0), .userspacesize = XT_ALIGN(0), - .help = &help, - .parse = &parse, + .help = NOTRACK_help, + .parse = NOTRACK_parse, }; -static -struct xtables_target notrack6 = -{ +static struct xtables_target notrack_target6 = { .family = AF_INET6, .name = "NOTRACK", .version = IPTABLES_VERSION, .size = XT_ALIGN(0), .userspacesize = XT_ALIGN(0), - .help = &help, - .parse = &parse, + .help = NOTRACK_help, + .parse = NOTRACK_parse, }; void _init(void) { - xtables_register_target(¬rack); - xtables_register_target(¬rack6); + xtables_register_target(¬rack_target); + xtables_register_target(¬rack_target6); } -- cgit v1.2.3