diff options
author | Jan Engelhardt <jengelh@medozas.de> | 2007-10-04 16:29:00 +0000 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2007-10-04 16:29:00 +0000 |
commit | 1d5b63d12984d12c8d87242179855e17657be16d (patch) | |
tree | 9777125dbd44238ad72fbfb4144736cf2339d031 /extensions/libipt_TTL.c | |
parent | 59d164019340d110d302634e429320577f0db7be (diff) |
Unique names 4/6
Give symbols of libxt targets 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 | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/extensions/libipt_TTL.c b/extensions/libipt_TTL.c index 6af5c76b..4dfac063 100644 --- a/extensions/libipt_TTL.c +++ b/extensions/libipt_TTL.c @@ -16,7 +16,7 @@ #define IPT_TTL_USED 1 -static void help(void) +static void TTL_help(void) { printf( "TTL 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 TTL_parse(int c, char **argv, int invert, unsigned int *flags, + const void *entry, struct xt_entry_target **target) { struct ipt_TTL_info *info = (struct ipt_TTL_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 TTL_check(unsigned int flags) { if (!(flags & IPT_TTL_USED)) exit_error(PARAMETER_PROBLEM, "TTL: You must specify an action"); } -static void save(const void *ip, - const struct xt_entry_target *target) +static void TTL_save(const void *ip, const struct xt_entry_target *target) { const struct ipt_TTL_info *info = (struct ipt_TTL_info *) target->data; @@ -113,8 +111,8 @@ static void save(const void *ip, printf("%u ", info->ttl); } -static void print(const void *ip, - const struct xt_entry_target *target, int numeric) +static void TTL_print(const void *ip, const struct xt_entry_target *target, + int numeric) { const struct ipt_TTL_info *info = (struct ipt_TTL_info *) target->data; @@ -134,28 +132,28 @@ static void print(const void *ip, printf("%u ", info->ttl); } -static const struct option opts[] = { +static const struct option TTL_opts[] = { { "ttl-set", 1, NULL, '1' }, { "ttl-dec", 1, NULL, '2' }, { "ttl-inc", 1, NULL, '3' }, { } }; -static struct iptables_target TTL = { +static struct iptables_target ttl_target = { .next = NULL, .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_target(&TTL); + register_target(&ttl_target); } |