summaryrefslogtreecommitdiffstats
path: root/extensions/libipt_realm.c
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/libipt_realm.c')
-rw-r--r--extensions/libipt_realm.c39
1 files changed, 16 insertions, 23 deletions
diff --git a/extensions/libipt_realm.c b/extensions/libipt_realm.c
index 2bd04c34..4f3416f0 100644
--- a/extensions/libipt_realm.c
+++ b/extensions/libipt_realm.c
@@ -15,8 +15,7 @@
#include <linux/netfilter_ipv4/ipt_realm.h>
/* Function which prints out usage message. */
-static void
-help(void)
+static void realm_help(void)
{
printf(
"realm v%s options:\n"
@@ -25,7 +24,7 @@ help(void)
"\n", IPTABLES_VERSION);
}
-static const struct option opts[] = {
+static const struct option realm_opts[] = {
{ "realm", 1, NULL, '1' },
{ }
};
@@ -154,10 +153,8 @@ static const char *realm_id2name(int id)
/* 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 realm_parse(int c, char **argv, int invert, unsigned int *flags,
+ const void *entry, struct xt_entry_match **match)
{
struct ipt_realm_info *realminfo = (struct ipt_realm_info *)(*match)->data;
int id;
@@ -213,10 +210,8 @@ print_realm(unsigned long id, unsigned long mask, int numeric)
}
/* Prints out the matchinfo. */
-static void
-print(const void *ip,
- const struct xt_entry_match *match,
- int numeric)
+static void realm_print(const void *ip, const struct xt_entry_match *match,
+ int numeric)
{
struct ipt_realm_info *ri = (struct ipt_realm_info *) match->data;
@@ -229,8 +224,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 realm_save(const void *ip, const struct xt_entry_match *match)
{
struct ipt_realm_info *ri = (struct ipt_realm_info *) match->data;
@@ -242,30 +236,29 @@ save(const void *ip, const struct xt_entry_match *match)
}
/* Final check; must have specified --mark. */
-static void
-final_check(unsigned int flags)
+static void realm_check(unsigned int flags)
{
if (!flags)
exit_error(PARAMETER_PROBLEM,
"realm match: You must specify `--realm'");
}
-static struct iptables_match realm = {
+static struct iptables_match realm_match = {
.name = "realm",
.version = IPTABLES_VERSION,
.size = IPT_ALIGN(sizeof(struct ipt_realm_info)),
.userspacesize = IPT_ALIGN(sizeof(struct ipt_realm_info)),
- .help = &help,
- .parse = &parse,
- .final_check = &final_check,
- .print = &print,
- .save = &save,
- .extra_opts = opts
+ .help = realm_help,
+ .parse = realm_parse,
+ .final_check = realm_check,
+ .print = realm_print,
+ .save = realm_save,
+ .extra_opts = realm_opts,
};
void _init(void)
{
- register_match(&realm);
+ register_match(&realm_match);
}