From 59d164019340d110d302634e429320577f0db7be Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Thu, 4 Oct 2007 16:28:39 +0000 Subject: Unique names 3/6 Give symbols of libxt matches 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_ah.c | 37 ++++++++++++++++--------------------- 1 file changed, 16 insertions(+), 21 deletions(-) (limited to 'extensions/libipt_ah.c') diff --git a/extensions/libipt_ah.c b/extensions/libipt_ah.c index 22a13d15..70ba03eb 100644 --- a/extensions/libipt_ah.c +++ b/extensions/libipt_ah.c @@ -9,8 +9,7 @@ #include /* Function which prints out usage message. */ -static void -help(void) +static void ah_help(void) { printf( "AH v%s options:\n" @@ -19,7 +18,7 @@ help(void) IPTABLES_VERSION); } -static const struct option opts[] = { +static const struct option ah_opts[] = { { "ahspi", 1, NULL, '1' }, { } }; @@ -67,8 +66,7 @@ parse_ah_spis(const char *spistring, u_int32_t *spis) } /* Initialize the match. */ -static void -init(struct xt_entry_match *m) +static void ah_init(struct xt_entry_match *m) { struct ipt_ah *ahinfo = (struct ipt_ah *)m->data; @@ -79,10 +77,8 @@ init(struct xt_entry_match *m) /* 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_match **match) +static int ah_parse(int c, char **argv, int invert, unsigned int *flags, + const void *entry, struct xt_entry_match **match) { struct ipt_ah *ahinfo = (struct ipt_ah *)(*match)->data; @@ -126,9 +122,8 @@ print_spis(const char *name, u_int32_t min, u_int32_t max, } /* Prints out the union ipt_matchinfo. */ -static void -print(const void *ip, - const struct xt_entry_match *match, int numeric) +static void ah_print(const void *ip, const struct xt_entry_match *match, + int numeric) { const struct ipt_ah *ah = (struct ipt_ah *)match->data; @@ -141,7 +136,7 @@ print(const void *ip, } /* Saves the union ipt_matchinfo in parsable form to stdout. */ -static void save(const void *ip, const struct xt_entry_match *match) +static void ah_save(const void *ip, const struct xt_entry_match *match) { const struct ipt_ah *ahinfo = (struct ipt_ah *)match->data; @@ -161,21 +156,21 @@ static void save(const void *ip, const struct xt_entry_match *match) } -static struct iptables_match ah = { +static struct iptables_match ah_match = { .name = "ah", .version = IPTABLES_VERSION, .size = IPT_ALIGN(sizeof(struct ipt_ah)), .userspacesize = IPT_ALIGN(sizeof(struct ipt_ah)), - .help = &help, - .init = &init, - .parse = &parse, - .print = &print, - .save = &save, - .extra_opts = opts + .help = ah_help, + .init = ah_init, + .parse = ah_parse, + .print = ah_print, + .save = ah_save, + .extra_opts = ah_opts, }; void _init(void) { - register_match(&ah); + register_match(&ah_match); } -- cgit v1.2.3