summaryrefslogtreecommitdiffstats
path: root/extensions/libipt_REJECT.c
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@medozas.de>2007-10-04 16:29:00 +0000
committerPatrick McHardy <kaber@trash.net>2007-10-04 16:29:00 +0000
commit1d5b63d12984d12c8d87242179855e17657be16d (patch)
tree9777125dbd44238ad72fbfb4144736cf2339d031 /extensions/libipt_REJECT.c
parent59d164019340d110d302634e429320577f0db7be (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_REJECT.c')
-rw-r--r--extensions/libipt_REJECT.c38
1 files changed, 16 insertions, 22 deletions
diff --git a/extensions/libipt_REJECT.c b/extensions/libipt_REJECT.c
index c2b3b35e..7e23ada7 100644
--- a/extensions/libipt_REJECT.c
+++ b/extensions/libipt_REJECT.c
@@ -67,8 +67,7 @@ print_reject_types(void)
/* Saves the union ipt_targinfo in parsable form to stdout. */
/* Function which prints out usage message. */
-static void
-help(void)
+static void REJECT_help(void)
{
printf(
"REJECT options:\n"
@@ -80,14 +79,13 @@ help(void)
printf("(*) See man page or read the INCOMPATIBILITES file for compatibility issues.\n");
}
-static const struct option opts[] = {
+static const struct option REJECT_opts[] = {
{ "reject-with", 1, NULL, '1' },
{ }
};
/* Allocate and initialize the target. */
-static void
-init(struct xt_entry_target *t)
+static void REJECT_init(struct xt_entry_target *t)
{
struct ipt_reject_info *reject = (struct ipt_reject_info *)t->data;
@@ -98,10 +96,8 @@ init(struct xt_entry_target *t)
/* 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_target **target)
+static int REJECT_parse(int c, char **argv, int invert, unsigned int *flags,
+ const void *entry, struct xt_entry_target **target)
{
struct ipt_reject_info *reject = (struct ipt_reject_info *)(*target)->data;
unsigned int limit = sizeof(reject_table)/sizeof(struct reject_names);
@@ -133,10 +129,8 @@ parse(int c, char **argv, int invert, unsigned int *flags,
}
/* Prints out ipt_reject_info. */
-static void
-print(const void *ip,
- const struct xt_entry_target *target,
- int numeric)
+static void REJECT_print(const void *ip, const struct xt_entry_target *target,
+ int numeric)
{
const struct ipt_reject_info *reject
= (const struct ipt_reject_info *)target->data;
@@ -150,7 +144,7 @@ print(const void *ip,
}
/* Saves ipt_reject in parsable form to stdout. */
-static void save(const void *ip, const struct xt_entry_target *target)
+static void REJECT_save(const void *ip, const struct xt_entry_target *target)
{
const struct ipt_reject_info *reject
= (const struct ipt_reject_info *)target->data;
@@ -163,20 +157,20 @@ static void save(const void *ip, const struct xt_entry_target *target)
printf("--reject-with %s ", reject_table[i].name);
}
-static struct iptables_target reject = {
+static struct iptables_target reject_target = {
.name = "REJECT",
.version = IPTABLES_VERSION,
.size = IPT_ALIGN(sizeof(struct ipt_reject_info)),
.userspacesize = IPT_ALIGN(sizeof(struct ipt_reject_info)),
- .help = &help,
- .init = &init,
- .parse = &parse,
- .print = &print,
- .save = &save,
- .extra_opts = opts
+ .help = REJECT_help,
+ .init = REJECT_init,
+ .parse = REJECT_parse,
+ .print = REJECT_print,
+ .save = REJECT_save,
+ .extra_opts = REJECT_opts,
};
void _init(void)
{
- register_target(&reject);
+ register_target(&reject_target);
}