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