diff options
author | Jan Engelhardt <jengelh@medozas.de> | 2007-10-04 16:28:39 +0000 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2007-10-04 16:28:39 +0000 |
commit | 59d164019340d110d302634e429320577f0db7be (patch) | |
tree | 69c2cb242bed3041027b2ac047b1214e13be48ce /extensions/libipt_owner.c | |
parent | 932e648f38ac16b1ea14c1f66f23951388448c5a (diff) |
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 <jengelh@gmx.de>
Diffstat (limited to 'extensions/libipt_owner.c')
-rw-r--r-- | extensions/libipt_owner.c | 39 |
1 files changed, 16 insertions, 23 deletions
diff --git a/extensions/libipt_owner.c b/extensions/libipt_owner.c index e11bfb1b..910e011f 100644 --- a/extensions/libipt_owner.c +++ b/extensions/libipt_owner.c @@ -11,8 +11,7 @@ #include <linux/netfilter_ipv4/ipt_owner.h> /* Function which prints out usage message. */ -static void -help(void) +static void owner_help(void) { #ifdef IPT_OWNER_COMM printf( @@ -38,7 +37,7 @@ IPTABLES_VERSION); #endif /* IPT_OWNER_COMM */ } -static const struct option opts[] = { +static const struct option owner_opts[] = { { "uid-owner", 1, NULL, '1' }, { "gid-owner", 1, NULL, '2' }, { "pid-owner", 1, NULL, '3' }, @@ -51,10 +50,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_match **match) +static int owner_parse(int c, char **argv, int invert, unsigned int *flags, + const void *entry, struct xt_entry_match **match) { struct ipt_owner_info *ownerinfo = (struct ipt_owner_info *)(*match)->data; @@ -189,8 +186,7 @@ print_item(struct ipt_owner_info *info, u_int8_t flag, int numeric, char *label) } /* Final check; must have specified --own. */ -static void -final_check(unsigned int flags) +static void owner_check(unsigned int flags) { if (!flags) exit_error(PARAMETER_PROBLEM, @@ -198,10 +194,8 @@ final_check(unsigned int flags) } /* Prints out the matchinfo. */ -static void -print(const void *ip, - const struct xt_entry_match *match, - int numeric) +static void owner_print(const void *ip, const struct xt_entry_match *match, + int numeric) { struct ipt_owner_info *info = (struct ipt_owner_info *)match->data; @@ -215,8 +209,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 owner_save(const void *ip, const struct xt_entry_match *match) { struct ipt_owner_info *info = (struct ipt_owner_info *)match->data; @@ -229,20 +222,20 @@ save(const void *ip, const struct xt_entry_match *match) #endif } -static struct iptables_match owner = { +static struct iptables_match owner_match = { .name = "owner", .version = IPTABLES_VERSION, .size = IPT_ALIGN(sizeof(struct ipt_owner_info)), .userspacesize = IPT_ALIGN(sizeof(struct ipt_owner_info)), - .help = &help, - .parse = &parse, - .final_check = &final_check, - .print = &print, - .save = &save, - .extra_opts = opts + .help = owner_help, + .parse = owner_parse, + .final_check = owner_check, + .print = owner_print, + .save = owner_save, + .extra_opts = owner_opts, }; void _init(void) { - register_match(&owner); + register_match(&owner_match); } |