summaryrefslogtreecommitdiffstats
path: root/extensions/libipt_icmp.c
diff options
context:
space:
mode:
author/C=EU/ST=EU/CN=Patrick McHardy/emailAddress=kaber@trash.net </C=EU/ST=EU/CN=Patrick McHardy/emailAddress=kaber@trash.net>2007-10-04 16:28:39 +0000
committer/C=EU/ST=EU/CN=Patrick McHardy/emailAddress=kaber@trash.net </C=EU/ST=EU/CN=Patrick McHardy/emailAddress=kaber@trash.net>2007-10-04 16:28:39 +0000
commit002261fba0ede5a039d1a65e26d2fa7a37a2f50e (patch)
tree69c2cb242bed3041027b2ac047b1214e13be48ce /extensions/libipt_icmp.c
parent6e98c4b10565df96d2b4d3e5520e6f0db2e6cff6 (diff)
[PATCH 09/13] 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_icmp.c')
-rw-r--r--extensions/libipt_icmp.c38
1 files changed, 16 insertions, 22 deletions
diff --git a/extensions/libipt_icmp.c b/extensions/libipt_icmp.c
index 0c1fbe7..fa76601 100644
--- a/extensions/libipt_icmp.c
+++ b/extensions/libipt_icmp.c
@@ -98,8 +98,7 @@ print_icmptypes(void)
}
/* Function which prints out usage message. */
-static void
-help(void)
+static void icmp_help(void)
{
printf(
"ICMP v%s options:\n"
@@ -109,7 +108,7 @@ help(void)
print_icmptypes();
}
-static const struct option opts[] = {
+static const struct option icmp_opts[] = {
{ "icmp-type", 1, NULL, '1' },
{ }
};
@@ -168,8 +167,7 @@ parse_icmp(const char *icmptype, u_int8_t *type, u_int8_t code[])
}
/* Initialize the match. */
-static void
-init(struct xt_entry_match *m)
+static void icmp_init(struct xt_entry_match *m)
{
struct ipt_icmp *icmpinfo = (struct ipt_icmp *)m->data;
@@ -179,10 +177,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 icmp_parse(int c, char **argv, int invert, unsigned int *flags,
+ const void *entry, struct xt_entry_match **match)
{
struct ipt_icmp *icmpinfo = (struct ipt_icmp *)(*match)->data;
@@ -244,10 +240,8 @@ static void print_icmptype(u_int8_t type,
}
/* Prints out the union ipt_matchinfo. */
-static void
-print(const void *ip,
- const struct xt_entry_match *match,
- int numeric)
+static void icmp_print(const void *ip, const struct xt_entry_match *match,
+ int numeric)
{
const struct ipt_icmp *icmp = (struct ipt_icmp *)match->data;
@@ -262,7 +256,7 @@ print(const void *ip,
}
/* Saves the match in parsable form to stdout. */
-static void save(const void *ip, const struct xt_entry_match *match)
+static void icmp_save(const void *ip, const struct xt_entry_match *match)
{
const struct ipt_icmp *icmp = (struct ipt_icmp *)match->data;
@@ -280,20 +274,20 @@ static void save(const void *ip, const struct xt_entry_match *match)
}
}
-static struct iptables_match icmp = {
+static struct iptables_match icmp_match = {
.name = "icmp",
.version = IPTABLES_VERSION,
.size = IPT_ALIGN(sizeof(struct ipt_icmp)),
.userspacesize = IPT_ALIGN(sizeof(struct ipt_icmp)),
- .help = &help,
- .init = &init,
- .parse = &parse,
- .print = &print,
- .save = &save,
- .extra_opts = opts
+ .help = icmp_help,
+ .init = icmp_init,
+ .parse = icmp_parse,
+ .print = icmp_print,
+ .save = icmp_save,
+ .extra_opts = icmp_opts,
};
void _init(void)
{
- register_match(&icmp);
+ register_match(&icmp_match);
}