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_ecn.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_ecn.c')
-rw-r--r-- | extensions/libipt_ecn.c | 41 |
1 files changed, 17 insertions, 24 deletions
diff --git a/extensions/libipt_ecn.c b/extensions/libipt_ecn.c index 52bdf66f..d32d3142 100644 --- a/extensions/libipt_ecn.c +++ b/extensions/libipt_ecn.c @@ -16,7 +16,7 @@ #include <linux/netfilter_ipv4/ip_tables.h> #include <linux/netfilter_ipv4/ipt_ecn.h> -static void help(void) +static void ecn_help(void) { printf( "ECN match v%s options\n" @@ -26,17 +26,15 @@ static void help(void) IPTABLES_VERSION); } -static const struct option opts[] = { +static const struct option ecn_opts[] = { { .name = "ecn-tcp-cwr", .has_arg = 0, .val = 'F' }, { .name = "ecn-tcp-ece", .has_arg = 0, .val = 'G' }, { .name = "ecn-ip-ect", .has_arg = 1, .val = 'H' }, { } }; -static int -parse(int c, char **argv, int invert, unsigned int *flags, - const void *entry, - struct xt_entry_match **match) +static int ecn_parse(int c, char **argv, int invert, unsigned int *flags, + const void *entry, struct xt_entry_match **match) { unsigned int result; struct ipt_ecn_info *einfo @@ -86,8 +84,7 @@ parse(int c, char **argv, int invert, unsigned int *flags, return 1; } -static void -final_check(unsigned int flags) +static void ecn_check(unsigned int flags) { if (!flags) exit_error(PARAMETER_PROBLEM, @@ -95,10 +92,8 @@ final_check(unsigned int flags) } /* Prints out the matchinfo. */ -static void -print(const void *ip, - const struct xt_entry_match *match, - int numeric) +static void ecn_print(const void *ip, const struct xt_entry_match *match, + int numeric) { const struct ipt_ecn_info *einfo = (const struct ipt_ecn_info *)match->data; @@ -125,8 +120,7 @@ print(const void *ip, } /* Saves the union ipt_matchinfo in parsable form to stdout. */ -static void -save(const void *ip, const struct xt_entry_match *match) +static void ecn_save(const void *ip, const struct xt_entry_match *match) { const struct ipt_ecn_info *einfo = (const struct ipt_ecn_info *)match->data; @@ -150,21 +144,20 @@ save(const void *ip, const struct xt_entry_match *match) } } -static -struct iptables_match ecn -= { .name = "ecn", +static struct iptables_match ecn_match = { + .name = "ecn", .version = IPTABLES_VERSION, .size = IPT_ALIGN(sizeof(struct ipt_ecn_info)), .userspacesize = IPT_ALIGN(sizeof(struct ipt_ecn_info)), - .help = &help, - .parse = &parse, - .final_check = &final_check, - .print = &print, - .save = &save, - .extra_opts = opts + .help = ecn_help, + .parse = ecn_parse, + .final_check = ecn_check, + .print = ecn_print, + .save = ecn_save, + .extra_opts = ecn_opts, }; void _init(void) { - register_match(&ecn); + register_match(&ecn_match); } |