summaryrefslogtreecommitdiffstats
path: root/extensions/libip6t_rt.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_rt.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_rt.c')
-rw-r--r--extensions/libip6t_rt.c37
1 files changed, 16 insertions, 21 deletions
diff --git a/extensions/libip6t_rt.c b/extensions/libip6t_rt.c
index 036f1011..89469008 100644
--- a/extensions/libip6t_rt.c
+++ b/extensions/libip6t_rt.c
@@ -15,8 +15,7 @@
/*#define DEBUG 1*/
/* Function which prints out usage message. */
-static void
-help(void)
+static void rt_help(void)
{
printf(
"RT v%s options:\n"
@@ -29,7 +28,7 @@ help(void)
IPTABLES_VERSION, IP6T_RT_HOPS);
}
-static const struct option opts[] = {
+static const struct option rt_opts[] = {
{ "rt-type", 1, NULL, '1' },
{ "rt-segsleft", 1, NULL, '2' },
{ "rt-len", 1, NULL, '3' },
@@ -138,8 +137,7 @@ parse_addresses(const char *addrstr, struct in6_addr *addrp)
}
/* Initialize the match. */
-static void
-init(struct xt_entry_match *m)
+static void rt_init(struct xt_entry_match *m)
{
struct ip6t_rt *rtinfo = (struct ip6t_rt *)m->data;
@@ -154,10 +152,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 rt_parse(int c, char **argv, int invert, unsigned int *flags,
+ const void *entry, struct xt_entry_match **match)
{
struct ip6t_rt *rtinfo = (struct ip6t_rt *)(*match)->data;
@@ -269,9 +265,8 @@ print_addresses(int addrnr, struct in6_addr *addrp)
}
/* Prints out the union ip6t_matchinfo. */
-static void
-print(const void *ip,
- const struct xt_entry_match *match, int numeric)
+static void rt_print(const void *ip, const struct xt_entry_match *match,
+ int numeric)
{
const struct ip6t_rt *rtinfo = (struct ip6t_rt *)match->data;
@@ -297,7 +292,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 rt_save(const void *ip, const struct xt_entry_match *match)
{
const struct ip6t_rt *rtinfo = (struct ip6t_rt *)match->data;
@@ -334,21 +329,21 @@ static void save(const void *ip, const struct xt_entry_match *match)
}
-static struct ip6tables_match rt = {
+static struct ip6tables_match rt_match6 = {
.name = "rt",
.version = IPTABLES_VERSION,
.size = IP6T_ALIGN(sizeof(struct ip6t_rt)),
.userspacesize = IP6T_ALIGN(sizeof(struct ip6t_rt)),
- .help = &help,
- .init = &init,
- .parse = &parse,
- .print = &print,
- .save = &save,
- .extra_opts = opts,
+ .help = rt_help,
+ .init = rt_init,
+ .parse = rt_parse,
+ .print = rt_print,
+ .save = rt_save,
+ .extra_opts = rt_opts,
};
void
_init(void)
{
- register_match6(&rt);
+ register_match6(&rt_match6);
}