summaryrefslogtreecommitdiffstats
path: root/extensions/libipt_ttl.c
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/libipt_ttl.c')
-rw-r--r--extensions/libipt_ttl.c35
1 files changed, 16 insertions, 19 deletions
diff --git a/extensions/libipt_ttl.c b/extensions/libipt_ttl.c
index b6edbc1a..622e60af 100644
--- a/extensions/libipt_ttl.c
+++ b/extensions/libipt_ttl.c
@@ -14,7 +14,7 @@
#include <linux/netfilter_ipv4/ip_tables.h>
#include <linux/netfilter_ipv4/ipt_ttl.h>
-static void help(void)
+static void ttl_help(void)
{
printf(
"TTL match v%s options:\n"
@@ -24,9 +24,8 @@ static void help(void)
, IPTABLES_VERSION);
}
-static int parse(int c, char **argv, int invert, unsigned int *flags,
- const void *entry,
- struct xt_entry_match **match)
+static int ttl_parse(int c, char **argv, int invert, unsigned int *flags,
+ const void *entry, struct xt_entry_match **match)
{
struct ipt_ttl_info *info = (struct ipt_ttl_info *) (*match)->data;
unsigned int value;
@@ -84,7 +83,7 @@ static int parse(int c, char **argv, int invert, unsigned int *flags,
return 1;
}
-static void final_check(unsigned int flags)
+static void ttl_check(unsigned int flags)
{
if (!flags)
exit_error(PARAMETER_PROBLEM,
@@ -92,9 +91,8 @@ static void final_check(unsigned int flags)
"`--ttl-eq', `--ttl-lt', `--ttl-gt");
}
-static void print(const void *ip,
- const struct xt_entry_match *match,
- int numeric)
+static void ttl_print(const void *ip, const struct xt_entry_match *match,
+ int numeric)
{
const struct ipt_ttl_info *info =
(struct ipt_ttl_info *) match->data;
@@ -117,8 +115,7 @@ static void print(const void *ip,
printf("%u ", info->ttl);
}
-static void save(const void *ip,
- const struct xt_entry_match *match)
+static void ttl_save(const void *ip, const struct xt_entry_match *match)
{
const struct ipt_ttl_info *info =
(struct ipt_ttl_info *) match->data;
@@ -143,7 +140,7 @@ static void save(const void *ip,
printf("%u ", info->ttl);
}
-static const struct option opts[] = {
+static const struct option ttl_opts[] = {
{ "ttl", 1, NULL, '2' },
{ "ttl-eq", 1, NULL, '2'},
{ "ttl-lt", 1, NULL, '3'},
@@ -151,21 +148,21 @@ static const struct option opts[] = {
{ }
};
-static struct iptables_match ttl = {
+static struct iptables_match ttl_match = {
.name = "ttl",
.version = IPTABLES_VERSION,
.size = IPT_ALIGN(sizeof(struct ipt_ttl_info)),
.userspacesize = IPT_ALIGN(sizeof(struct ipt_ttl_info)),
- .help = &help,
- .parse = &parse,
- .final_check = &final_check,
- .print = &print,
- .save = &save,
- .extra_opts = opts
+ .help = ttl_help,
+ .parse = ttl_parse,
+ .final_check = ttl_check,
+ .print = ttl_print,
+ .save = ttl_save,
+ .extra_opts = ttl_opts,
};
void _init(void)
{
- register_match(&ttl);
+ register_match(&ttl_match);
}