diff options
author | Jan Engelhardt <jengelh@medozas.de> | 2007-10-04 16:29:00 +0000 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2007-10-04 16:29:00 +0000 |
commit | 1d5b63d12984d12c8d87242179855e17657be16d (patch) | |
tree | 9777125dbd44238ad72fbfb4144736cf2339d031 /extensions/libipt_CLUSTERIP.c | |
parent | 59d164019340d110d302634e429320577f0db7be (diff) |
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 <jengelh@gmx.de>
Diffstat (limited to 'extensions/libipt_CLUSTERIP.c')
-rw-r--r-- | extensions/libipt_CLUSTERIP.c | 39 |
1 files changed, 16 insertions, 23 deletions
diff --git a/extensions/libipt_CLUSTERIP.c b/extensions/libipt_CLUSTERIP.c index 7e8bd437..74b434f9 100644 --- a/extensions/libipt_CLUSTERIP.c +++ b/extensions/libipt_CLUSTERIP.c @@ -19,8 +19,7 @@ #include <linux/netfilter_ipv4/ip_tables.h> #include "../include/linux/netfilter_ipv4/ipt_CLUSTERIP.h" -static void -help(void) +static void CLUSTERIP_help(void) { printf( "CLUSTERIP target v%s options:\n" @@ -44,7 +43,7 @@ IPTABLES_VERSION); #define PARAM_LOCALNODE 0x0010 #define PARAM_HASHINIT 0x0020 -static const struct option opts[] = { +static const struct option CLUSTERIP_opts[] = { { "new", 0, NULL, '1' }, { "hashmode", 1, NULL, '2' }, { "clustermac", 1, NULL, '3' }, @@ -78,10 +77,8 @@ parse_mac(const char *mac, char *macbuf) } } -static int -parse(int c, char **argv, int invert, unsigned int *flags, - const void *entry, - struct xt_entry_target **target) +static int CLUSTERIP_parse(int c, char **argv, int invert, unsigned int *flags, + const void *entry, struct xt_entry_target **target) { struct ipt_clusterip_tgt_info *cipinfo = (struct ipt_clusterip_tgt_info *)(*target)->data; @@ -158,8 +155,7 @@ parse(int c, char **argv, int invert, unsigned int *flags, return 1; } -static void -final_check(unsigned int flags) +static void CLUSTERIP_check(unsigned int flags) { if (flags == 0) return; @@ -201,10 +197,8 @@ static char *mac2str(const u_int8_t mac[ETH_ALEN]) /* Prints out the targinfo. */ -static void -print(const void *ip, - const struct xt_entry_target *target, - int numeric) +static void CLUSTERIP_print(const void *ip, + const struct xt_entry_target *target, int numeric) { const struct ipt_clusterip_tgt_info *cipinfo = (const struct ipt_clusterip_tgt_info *)target->data; @@ -223,8 +217,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 CLUSTERIP_save(const void *ip, const struct xt_entry_target *target) { const struct ipt_clusterip_tgt_info *cipinfo = (const struct ipt_clusterip_tgt_info *)target->data; @@ -242,20 +235,20 @@ save(const void *ip, const struct xt_entry_target *target) cipinfo->hash_initval); } -static struct iptables_target clusterip = { +static struct iptables_target clusterip_target = { .name = "CLUSTERIP", .version = IPTABLES_VERSION, .size = IPT_ALIGN(sizeof(struct ipt_clusterip_tgt_info)), .userspacesize = offsetof(struct ipt_clusterip_tgt_info, config), - .help = &help, - .parse = &parse, - .final_check = &final_check, - .print = &print, - .save = &save, - .extra_opts = opts + .help = CLUSTERIP_help, + .parse = CLUSTERIP_parse, + .final_check = CLUSTERIP_check, + .print = CLUSTERIP_print, + .save = CLUSTERIP_save, + .extra_opts = CLUSTERIP_opts, }; void _init(void) { - register_target(&clusterip); + register_target(&clusterip_target); } |