summaryrefslogtreecommitdiffstats
path: root/extensions/libip6t_hl.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_hl.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_hl.c')
-rw-r--r--extensions/libip6t_hl.c36
1 files changed, 16 insertions, 20 deletions
diff --git a/extensions/libip6t_hl.c b/extensions/libip6t_hl.c
index e4d2ffe4..87a1eeb7 100644
--- a/extensions/libip6t_hl.c
+++ b/extensions/libip6t_hl.c
@@ -15,7 +15,7 @@
#include <linux/netfilter_ipv6/ip6_tables.h>
#include <linux/netfilter_ipv6/ip6t_hl.h>
-static void help(void)
+static void hl_help(void)
{
printf(
"HL match v%s options:\n"
@@ -25,9 +25,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 hl_parse(int c, char **argv, int invert, unsigned int *flags,
+ const void *entry, struct xt_entry_match **match)
{
struct ip6t_hl_info *info = (struct ip6t_hl_info *) (*match)->data;
u_int8_t value;
@@ -81,7 +80,7 @@ static int parse(int c, char **argv, int invert, unsigned int *flags,
return 1;
}
-static void final_check(unsigned int flags)
+static void hl_check(unsigned int flags)
{
if (!flags)
exit_error(PARAMETER_PROBLEM,
@@ -89,9 +88,8 @@ static void final_check(unsigned int flags)
"`--hl-eq', `--hl-lt', `--hl-gt'");
}
-static void print(const void *ip,
- const struct xt_entry_match *match,
- int numeric)
+static void hl_print(const void *ip, const struct xt_entry_match *match,
+ int numeric)
{
static const char *op[] = {
[IP6T_HL_EQ] = "==",
@@ -105,8 +103,7 @@ static void print(const void *ip,
printf("HL match HL %s %u ", op[info->mode], info->hop_limit);
}
-static void save(const void *ip,
- const struct xt_entry_match *match)
+static void hl_save(const void *ip, const struct xt_entry_match *match)
{
static const char *op[] = {
[IP6T_HL_EQ] = "eq",
@@ -120,7 +117,7 @@ static void save(const void *ip,
printf("--hl-%s %u ", op[info->mode], info->hop_limit);
}
-static const struct option opts[] = {
+static const struct option hl_opts[] = {
{ .name = "hl", .has_arg = 1, .val = '2' },
{ .name = "hl-eq", .has_arg = 1, .val = '2' },
{ .name = "hl-lt", .has_arg = 1, .val = '3' },
@@ -128,22 +125,21 @@ static const struct option opts[] = {
{ }
};
-static
-struct ip6tables_match hl = {
+static struct ip6tables_match hl_match6 = {
.name = "hl",
.version = IPTABLES_VERSION,
.size = IP6T_ALIGN(sizeof(struct ip6t_hl_info)),
.userspacesize = IP6T_ALIGN(sizeof(struct ip6t_hl_info)),
- .help = &help,
- .parse = &parse,
- .final_check = &final_check,
- .print = &print,
- .save = &save,
- .extra_opts = opts
+ .help = hl_help,
+ .parse = hl_parse,
+ .final_check = hl_check,
+ .print = hl_print,
+ .save = hl_save,
+ .extra_opts = hl_opts,
};
void _init(void)
{
- register_match6(&hl);
+ register_match6(&hl_match6);
}