summaryrefslogtreecommitdiffstats
path: root/extensions/libip6t_frag.c
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@medozas.de>2007-10-04 16:29:21 +0000
committerPatrick McHardy <kaber@trash.net>2007-10-04 16:29:21 +0000
commit997045f536026c0d643bf884da5ff5de2605197f (patch)
tree42f7b0e1bf015f92f7191dcc34da8b0d7a37412a /extensions/libip6t_frag.c
parent1d5b63d12984d12c8d87242179855e17657be16d (diff)
Unique names 5/6
Give symbols of libxt matches unique names (3/3). Adds unique prefixes to all functions (most of them - especially the hook functions) so that debugging programs can unambiguously map a symbol to an address. Also unifies the names of the xtables_match/xtables_target structs, (based upon libxt_connmark.c/libip6t_*.c). Signed-off-by: Jan Engelhardt <jengelh@gmx.de>
Diffstat (limited to 'extensions/libip6t_frag.c')
-rw-r--r--extensions/libip6t_frag.c38
1 files changed, 16 insertions, 22 deletions
diff --git a/extensions/libip6t_frag.c b/extensions/libip6t_frag.c
index 49044a53..b8e15d3d 100644
--- a/extensions/libip6t_frag.c
+++ b/extensions/libip6t_frag.c
@@ -9,8 +9,7 @@
#include <linux/netfilter_ipv6/ip6t_frag.h>
/* Function which prints out usage message. */
-static void
-help(void)
+static void frag_help(void)
{
printf(
"FRAG v%s options:\n"
@@ -23,7 +22,7 @@ help(void)
IPTABLES_VERSION);
}
-static const struct option opts[] = {
+static const struct option frag_opts[] = {
{ .name = "fragid", .has_arg = 1, .val = '1' },
{ .name = "fraglen", .has_arg = 1, .val = '2' },
{ .name = "fragres", .has_arg = 0, .val = '3' },
@@ -77,8 +76,7 @@ parse_frag_ids(const char *idstring, u_int32_t *ids)
}
/* Initialize the match. */
-static void
-init(struct xt_entry_match *m)
+static void frag_init(struct xt_entry_match *m)
{
struct ip6t_frag *fraginfo = (struct ip6t_frag *)m->data;
@@ -91,10 +89,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 frag_parse(int c, char **argv, int invert, unsigned int *flags,
+ const void *entry, struct xt_entry_match **match)
{
struct ip6t_frag *fraginfo = (struct ip6t_frag *)(*match)->data;
@@ -172,9 +168,8 @@ print_ids(const char *name, u_int32_t min, u_int32_t max,
}
/* Prints out the union ip6t_matchinfo. */
-static void
-print(const void *ip,
- const struct xt_entry_match *match, int numeric)
+static void frag_print(const void *ip, const struct xt_entry_match *match,
+ int numeric)
{
const struct ip6t_frag *frag = (struct ip6t_frag *)match->data;
@@ -206,7 +201,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 frag_save(const void *ip, const struct xt_entry_match *match)
{
const struct ip6t_frag *fraginfo = (struct ip6t_frag *)match->data;
@@ -243,22 +238,21 @@ static void save(const void *ip, const struct xt_entry_match *match)
printf("--fraglast ");
}
-static
-struct ip6tables_match frag = {
+static struct ip6tables_match frag_match6 = {
.name = "frag",
.version = IPTABLES_VERSION,
.size = IP6T_ALIGN(sizeof(struct ip6t_frag)),
.userspacesize = IP6T_ALIGN(sizeof(struct ip6t_frag)),
- .help = &help,
- .init = &init,
- .parse = &parse,
- .print = &print,
- .save = &save,
- .extra_opts = opts
+ .help = frag_help,
+ .init = frag_init,
+ .parse = frag_parse,
+ .print = frag_print,
+ .save = frag_save,
+ .extra_opts = frag_opts,
};
void
_init(void)
{
- register_match6(&frag);
+ register_match6(&frag_match6);
}