summaryrefslogtreecommitdiffstats
path: root/extensions/libipt_recent.c
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/libipt_recent.c')
-rw-r--r--extensions/libipt_recent.c44
1 files changed, 18 insertions, 26 deletions
diff --git a/extensions/libipt_recent.c b/extensions/libipt_recent.c
index 002fecb1..76f9771e 100644
--- a/extensions/libipt_recent.c
+++ b/extensions/libipt_recent.c
@@ -22,7 +22,7 @@
#endif /* IPT_RECENT_NAME_LEN */
/* Options for this module */
-static const struct option opts[] = {
+static const struct option recent_opts[] = {
{ .name = "set", .has_arg = 0, .val = 201 },
{ .name = "rcheck", .has_arg = 0, .val = 202 },
{ .name = "update", .has_arg = 0, .val = 203 },
@@ -37,8 +37,7 @@ static const struct option opts[] = {
};
/* Function which prints out usage message. */
-static void
-help(void)
+static void recent_help(void)
{
printf(
"recent v%s options:\n"
@@ -67,8 +66,7 @@ IPTABLES_VERSION);
}
/* Initialize the match. */
-static void
-init(struct xt_entry_match *match)
+static void recent_init(struct xt_entry_match *match)
{
struct ipt_recent_info *info = (struct ipt_recent_info *)(match)->data;
@@ -82,10 +80,8 @@ init(struct xt_entry_match *match)
/* 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 recent_parse(int c, char **argv, int invert, unsigned int *flags,
+ const void *entry, struct xt_entry_match **match)
{
struct ipt_recent_info *info = (struct ipt_recent_info *)(*match)->data;
switch (c) {
@@ -162,8 +158,7 @@ parse(int c, char **argv, int invert, unsigned int *flags,
}
/* Final check; must have specified a specific option. */
-static void
-final_check(unsigned int flags)
+static void recent_check(unsigned int flags)
{
if (!flags)
@@ -173,10 +168,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 recent_print(const void *ip, const struct xt_entry_match *match,
+ int numeric)
{
struct ipt_recent_info *info = (struct ipt_recent_info *)match->data;
@@ -197,8 +190,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 recent_save(const void *ip, const struct xt_entry_match *match)
{
struct ipt_recent_info *info = (struct ipt_recent_info *)match->data;
@@ -218,21 +210,21 @@ save(const void *ip, const struct xt_entry_match *match)
}
/* Structure for iptables to use to communicate with module */
-static struct iptables_match recent = {
+static struct iptables_match recent_match = {
.name = "recent",
.version = IPTABLES_VERSION,
.size = IPT_ALIGN(sizeof(struct ipt_recent_info)),
.userspacesize = IPT_ALIGN(sizeof(struct ipt_recent_info)),
- .help = &help,
- .init = &init,
- .parse = &parse,
- .final_check = &final_check,
- .print = &print,
- .save = &save,
- .extra_opts = opts
+ .help = recent_help,
+ .init = recent_init,
+ .parse = recent_parse,
+ .final_check = recent_check,
+ .print = recent_print,
+ .save = recent_save,
+ .extra_opts = recent_opts,
};
void _init(void)
{
- register_match(&recent);
+ register_match(&recent_match);
}