summaryrefslogtreecommitdiffstats
path: root/extensions/libip6t_ah.c
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/libip6t_ah.c')
-rw-r--r--extensions/libip6t_ah.c38
1 files changed, 16 insertions, 22 deletions
diff --git a/extensions/libip6t_ah.c b/extensions/libip6t_ah.c
index 0b8652d5..c372af5d 100644
--- a/extensions/libip6t_ah.c
+++ b/extensions/libip6t_ah.c
@@ -9,8 +9,7 @@
#include <linux/netfilter_ipv6/ip6t_ah.h>
/* Function which prints out usage message. */
-static void
-help(void)
+static void ah_help(void)
{
printf(
"AH v%s options:\n"
@@ -20,7 +19,7 @@ help(void)
IPTABLES_VERSION);
}
-static const struct option opts[] = {
+static const struct option ah_opts[] = {
{ .name = "ahspi", .has_arg = 1, .val = '1' },
{ .name = "ahlen", .has_arg = 1, .val = '2' },
{ .name = "ahres", .has_arg = 0, .val = '3' },
@@ -71,8 +70,7 @@ parse_ah_spis(const char *spistring, u_int32_t *spis)
}
/* Initialize the match. */
-static void
-init(struct xt_entry_match *m)
+static void ah_init(struct xt_entry_match *m)
{
struct ip6t_ah *ahinfo = (struct ip6t_ah *)m->data;
@@ -83,10 +81,8 @@ init(struct xt_entry_match *m)
/* 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 ah_parse(int c, char **argv, int invert, unsigned int *flags,
+ const void *entry, struct xt_entry_match **match)
{
struct ip6t_ah *ahinfo = (struct ip6t_ah *)(*match)->data;
@@ -149,9 +145,8 @@ print_len(const char *name, u_int32_t len, int invert)
}
/* Prints out the union ip6t_matchinfo. */
-static void
-print(const void *ip,
- const struct xt_entry_match *match, int numeric)
+static void ah_print(const void *ip, const struct xt_entry_match *match,
+ int numeric)
{
const struct ip6t_ah *ah = (struct ip6t_ah *)match->data;
@@ -170,7 +165,7 @@ print(const void *ip,
}
/* Saves the union ip6t_matchinfo in parsable form to stdout. */
-static void save(const void *ip, const struct xt_entry_match *match)
+static void ah_save(const void *ip, const struct xt_entry_match *match)
{
const struct ip6t_ah *ahinfo = (struct ip6t_ah *)match->data;
@@ -198,22 +193,21 @@ static void save(const void *ip, const struct xt_entry_match *match)
printf("--ahres ");
}
-static
-struct ip6tables_match ah = {
+static struct ip6tables_match ah_match6 = {
.name = "ah",
.version = IPTABLES_VERSION,
.size = IP6T_ALIGN(sizeof(struct ip6t_ah)),
.userspacesize = IP6T_ALIGN(sizeof(struct ip6t_ah)),
- .help = &help,
- .init = &init,
- .parse = &parse,
- .print = &print,
- .save = &save,
- .extra_opts = opts
+ .help = ah_help,
+ .init = ah_init,
+ .parse = ah_parse,
+ .print = ah_print,
+ .save = ah_save,
+ .extra_opts = ah_opts,
};
void
_init(void)
{
- register_match6(&ah);
+ register_match6(&ah_match6);
}