summaryrefslogtreecommitdiffstats
path: root/extensions/libxt_esp.c
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@medozas.de>2007-10-04 16:27:07 +0000
committerPatrick McHardy <kaber@trash.net>2007-10-04 16:27:07 +0000
commit181dead3f13befe02769ef479bcbb51801b7fc4e (patch)
tree37c29ea4f70d8c72a1a9910b8c775fc8d77bd148 /extensions/libxt_esp.c
parent926bde877f8182e7db4d057969dc8293e81fd6cf (diff)
Unique symbols 1/6
Give symbols of libxt matches unique names (1/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/libxt_esp.c')
-rw-r--r--extensions/libxt_esp.c50
1 files changed, 23 insertions, 27 deletions
diff --git a/extensions/libxt_esp.c b/extensions/libxt_esp.c
index 6faaba68..e5b5eaa9 100644
--- a/extensions/libxt_esp.c
+++ b/extensions/libxt_esp.c
@@ -9,8 +9,7 @@
#include <linux/netfilter/xt_esp.h>
/* Function which prints out usage message. */
-static void
-help(void)
+static void esp_help(void)
{
printf(
"ESP v%s options:\n"
@@ -19,7 +18,7 @@ help(void)
IPTABLES_VERSION);
}
-static const struct option opts[] = {
+static const struct option esp_opts[] = {
{ "espspi", 1, NULL, '1' },
{ }
};
@@ -70,8 +69,7 @@ parse_esp_spis(const char *spistring, u_int32_t *spis)
}
/* Initialize the match. */
-static void
-init(struct xt_entry_match *m)
+static void esp_init(struct xt_entry_match *m)
{
struct xt_esp *espinfo = (struct xt_esp *)m->data;
@@ -83,9 +81,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)
+esp_parse(int c, char **argv, int invert, unsigned int *flags,
+ const void *entry, struct xt_entry_match **match)
{
struct xt_esp *espinfo = (struct xt_esp *)(*match)->data;
@@ -123,8 +120,7 @@ print_spis(const char *name, u_int32_t min, u_int32_t max,
/* Prints out the union ipt_matchinfo. */
static void
-print(const void *ip,
- const struct xt_entry_match *match, int numeric)
+esp_print(const void *ip, const struct xt_entry_match *match, int numeric)
{
const struct xt_esp *esp = (struct xt_esp *)match->data;
@@ -137,7 +133,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 esp_save(const void *ip, const struct xt_entry_match *match)
{
const struct xt_esp *espinfo = (struct xt_esp *)match->data;
@@ -157,37 +153,37 @@ static void save(const void *ip, const struct xt_entry_match *match)
}
-static struct xtables_match esp = {
+static struct xtables_match esp_match = {
.family = AF_INET,
.name = "esp",
.version = IPTABLES_VERSION,
.size = XT_ALIGN(sizeof(struct xt_esp)),
.userspacesize = XT_ALIGN(sizeof(struct xt_esp)),
- .help = &help,
- .init = &init,
- .parse = &parse,
- .print = &print,
- .save = &save,
- .extra_opts = opts
+ .help = esp_help,
+ .init = esp_init,
+ .parse = esp_parse,
+ .print = esp_print,
+ .save = esp_save,
+ .extra_opts = esp_opts,
};
-static struct xtables_match esp6 = {
+static struct xtables_match esp_match6 = {
.family = AF_INET6,
.name = "esp",
.version = IPTABLES_VERSION,
.size = XT_ALIGN(sizeof(struct xt_esp)),
.userspacesize = XT_ALIGN(sizeof(struct xt_esp)),
- .help = &help,
- .init = &init,
- .parse = &parse,
- .print = &print,
- .save = &save,
- .extra_opts = opts
+ .help = esp_help,
+ .init = esp_init,
+ .parse = esp_parse,
+ .print = esp_print,
+ .save = esp_save,
+ .extra_opts = esp_opts,
};
void
_init(void)
{
- xtables_register_match(&esp);
- xtables_register_match(&esp6);
+ xtables_register_match(&esp_match);
+ xtables_register_match(&esp_match6);
}