summaryrefslogtreecommitdiffstats
path: root/extensions/libipt_CLUSTERIP.c
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/libipt_CLUSTERIP.c')
-rw-r--r--extensions/libipt_CLUSTERIP.c39
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);
}