diff options
author | Jan Engelhardt <jengelh@medozas.de> | 2007-10-04 16:29:21 +0000 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2007-10-04 16:29:21 +0000 |
commit | 997045f536026c0d643bf884da5ff5de2605197f (patch) | |
tree | 42f7b0e1bf015f92f7191dcc34da8b0d7a37412a /extensions/libip6t_mh.c | |
parent | 1d5b63d12984d12c8d87242179855e17657be16d (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_mh.c')
-rw-r--r-- | extensions/libip6t_mh.c | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/extensions/libip6t_mh.c b/extensions/libip6t_mh.c index 24ab4995..717a8bee 100644 --- a/extensions/libip6t_mh.c +++ b/extensions/libip6t_mh.c @@ -58,7 +58,7 @@ static void print_types_all(void) printf("\n"); } -static void help(void) +static void mh_help(void) { printf( "MH v%s options:\n" @@ -67,7 +67,7 @@ IPTABLES_VERSION); print_types_all(); } -static void init(struct xt_entry_match *m) +static void mh_init(struct xt_entry_match *m) { struct ip6t_mh *mhinfo = (struct ip6t_mh *)m->data; @@ -125,9 +125,8 @@ static void parse_mh_types(const char *mhtype, u_int8_t *types) #define MH_TYPES 0x01 -static int parse(int c, char **argv, int invert, unsigned int *flags, - const void *entry, - struct xt_entry_match **match) +static int mh_parse(int c, char **argv, int invert, unsigned int *flags, + const void *entry, struct xt_entry_match **match) { struct ip6t_mh *mhinfo = (struct ip6t_mh *)(*match)->data; @@ -189,9 +188,8 @@ static void print_types(u_int8_t min, u_int8_t max, int invert, int numeric) } } -static void print(const void *ip, - const struct xt_entry_match *match, - int numeric) +static void mh_print(const void *ip, const struct xt_entry_match *match, + int numeric) { const struct ip6t_mh *mhinfo = (struct ip6t_mh *)match->data; @@ -204,7 +202,7 @@ static void print(const void *ip, mhinfo->invflags & ~IP6T_MH_INV_MASK); } -static void save(const void *ip, const struct xt_entry_match *match) +static void mh_save(const void *ip, const struct xt_entry_match *match) { const struct ip6t_mh *mhinfo = (struct ip6t_mh *)match->data; @@ -220,25 +218,25 @@ static void save(const void *ip, const struct xt_entry_match *match) printf("--mh-type %u ", mhinfo->types[0]); } -static const struct option opts[] = { +static const struct option mh_opts[] = { { "mh-type", 1, NULL, '1' }, { } }; -static struct ip6tables_match mh = { +static struct ip6tables_match mh_match6 = { .name = "mh", .version = IPTABLES_VERSION, .size = IP6T_ALIGN(sizeof(struct ip6t_mh)), .userspacesize = IP6T_ALIGN(sizeof(struct ip6t_mh)), - .help = &help, - .init = &init, - .parse = &parse, - .print = &print, - .save = &save, - .extra_opts = opts, + .help = mh_help, + .init = mh_init, + .parse = mh_parse, + .print = mh_print, + .save = mh_save, + .extra_opts = mh_opts, }; void _init(void) { - register_match6(&mh); + register_match6(&mh_match6); } |