diff options
author | Jan Engelhardt <jengelh@medozas.de> | 2007-10-04 16:28:39 +0000 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2007-10-04 16:28:39 +0000 |
commit | 59d164019340d110d302634e429320577f0db7be (patch) | |
tree | 69c2cb242bed3041027b2ac047b1214e13be48ce /extensions/libipt_ttl.c | |
parent | 932e648f38ac16b1ea14c1f66f23951388448c5a (diff) |
Unique names 3/6
Give symbols of libxt matches unique names (2/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/libipt_ttl.c')
-rw-r--r-- | extensions/libipt_ttl.c | 35 |
1 files changed, 16 insertions, 19 deletions
diff --git a/extensions/libipt_ttl.c b/extensions/libipt_ttl.c index b6edbc1a..622e60af 100644 --- a/extensions/libipt_ttl.c +++ b/extensions/libipt_ttl.c @@ -14,7 +14,7 @@ #include <linux/netfilter_ipv4/ip_tables.h> #include <linux/netfilter_ipv4/ipt_ttl.h> -static void help(void) +static void ttl_help(void) { printf( "TTL match v%s options:\n" @@ -24,9 +24,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 ttl_parse(int c, char **argv, int invert, unsigned int *flags, + const void *entry, struct xt_entry_match **match) { struct ipt_ttl_info *info = (struct ipt_ttl_info *) (*match)->data; unsigned int value; @@ -84,7 +83,7 @@ static int parse(int c, char **argv, int invert, unsigned int *flags, return 1; } -static void final_check(unsigned int flags) +static void ttl_check(unsigned int flags) { if (!flags) exit_error(PARAMETER_PROBLEM, @@ -92,9 +91,8 @@ static void final_check(unsigned int flags) "`--ttl-eq', `--ttl-lt', `--ttl-gt"); } -static void print(const void *ip, - const struct xt_entry_match *match, - int numeric) +static void ttl_print(const void *ip, const struct xt_entry_match *match, + int numeric) { const struct ipt_ttl_info *info = (struct ipt_ttl_info *) match->data; @@ -117,8 +115,7 @@ static void print(const void *ip, printf("%u ", info->ttl); } -static void save(const void *ip, - const struct xt_entry_match *match) +static void ttl_save(const void *ip, const struct xt_entry_match *match) { const struct ipt_ttl_info *info = (struct ipt_ttl_info *) match->data; @@ -143,7 +140,7 @@ static void save(const void *ip, printf("%u ", info->ttl); } -static const struct option opts[] = { +static const struct option ttl_opts[] = { { "ttl", 1, NULL, '2' }, { "ttl-eq", 1, NULL, '2'}, { "ttl-lt", 1, NULL, '3'}, @@ -151,21 +148,21 @@ static const struct option opts[] = { { } }; -static struct iptables_match ttl = { +static struct iptables_match ttl_match = { .name = "ttl", .version = IPTABLES_VERSION, .size = IPT_ALIGN(sizeof(struct ipt_ttl_info)), .userspacesize = IPT_ALIGN(sizeof(struct ipt_ttl_info)), - .help = &help, - .parse = &parse, - .final_check = &final_check, - .print = &print, - .save = &save, - .extra_opts = opts + .help = ttl_help, + .parse = ttl_parse, + .final_check = ttl_check, + .print = ttl_print, + .save = ttl_save, + .extra_opts = ttl_opts, }; void _init(void) { - register_match(&ttl); + register_match(&ttl_match); } |