summaryrefslogtreecommitdiffstats
path: root/extensions/libip6t_HL.c
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@medozas.de>2007-10-04 16:29:39 +0000
committerPatrick McHardy <kaber@trash.net>2007-10-04 16:29:39 +0000
commit4d150eb5934fd4343b5fac2419c994e2bf97a96c (patch)
treeba3bb1a905f1f98f893340da6d824d350c48718b /extensions/libip6t_HL.c
parent997045f536026c0d643bf884da5ff5de2605197f (diff)
Unique symbols 6/6
Give symbols of libxt targets 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.c35
1 files changed, 16 insertions, 19 deletions
diff --git a/extensions/libip6t_HL.c b/extensions/libip6t_HL.c
index c8bdd027..73cb3bad 100644
--- a/extensions/libip6t_HL.c
+++ b/extensions/libip6t_HL.c
@@ -16,7 +16,7 @@
#define IP6T_HL_USED 1
-static void help(void)
+static void HL_help(void)
{
printf(
"HL target v%s options\n"
@@ -26,9 +26,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_target **target)
+static int HL_parse(int c, char **argv, int invert, unsigned int *flags,
+ const void *entry, struct xt_entry_target **target)
{
struct ip6t_HL_info *info = (struct ip6t_HL_info *) (*target)->data;
unsigned int value;
@@ -85,15 +84,14 @@ 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 & IP6T_HL_USED))
exit_error(PARAMETER_PROBLEM,
"HL: You must specify an action");
}
-static void save(const void *ip,
- const struct xt_entry_target *target)
+static void HL_save(const void *ip, const struct xt_entry_target *target)
{
const struct ip6t_HL_info *info =
(struct ip6t_HL_info *) target->data;
@@ -113,8 +111,8 @@ static void save(const void *ip,
printf("%u ", info->hop_limit);
}
-static void print(const void *ip,
- const struct xt_entry_target *target, int numeric)
+static void HL_print(const void *ip, const struct xt_entry_target *target,
+ int numeric)
{
const struct ip6t_HL_info *info =
(struct ip6t_HL_info *) target->data;
@@ -134,28 +132,27 @@ static void print(const void *ip,
printf("%u ", info->hop_limit);
}
-static const struct option opts[] = {
+static const struct option HL_opts[] = {
{ "hl-set", 1, NULL, '1' },
{ "hl-dec", 1, NULL, '2' },
{ "hl-inc", 1, NULL, '3' },
{ }
};
-static
-struct ip6tables_target HL = {
+static struct ip6tables_target hl_target6 = {
.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_target6(&HL);
+ register_target6(&hl_target6);
}