summaryrefslogtreecommitdiffstats
path: root/extensions/libipt_LOG.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_LOG.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_LOG.c')
-rw-r--r--extensions/libipt_LOG.c41
1 files changed, 16 insertions, 25 deletions
diff --git a/extensions/libipt_LOG.c b/extensions/libipt_LOG.c
index 0f13c244..5614aad0 100644
--- a/extensions/libipt_LOG.c
+++ b/extensions/libipt_LOG.c
@@ -18,8 +18,7 @@
#endif
/* Function which prints out usage message. */
-static void
-help(void)
+static void LOG_help(void)
{
printf(
"LOG v%s options:\n"
@@ -32,7 +31,7 @@ help(void)
IPTABLES_VERSION);
}
-static const struct option opts[] = {
+static const struct option LOG_opts[] = {
{ .name = "log-level", .has_arg = 1, .val = '!' },
{ .name = "log-prefix", .has_arg = 1, .val = '#' },
{ .name = "log-tcp-sequence", .has_arg = 0, .val = '1' },
@@ -43,8 +42,7 @@ static const struct option opts[] = {
};
/* Initialize the target. */
-static void
-init(struct xt_entry_target *t)
+static void LOG_init(struct xt_entry_target *t)
{
struct ipt_log_info *loginfo = (struct ipt_log_info *)t->data;
@@ -108,10 +106,8 @@ parse_level(const char *level)
/* 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 LOG_parse(int c, char **argv, int invert, unsigned int *flags,
+ const void *entry, struct xt_entry_target **target)
{
struct ipt_log_info *loginfo = (struct ipt_log_info *)(*target)->data;
@@ -200,10 +196,8 @@ parse(int c, char **argv, int invert, unsigned int *flags,
}
/* Prints out the targinfo. */
-static void
-print(const void *ip,
- const struct xt_entry_target *target,
- int numeric)
+static void LOG_print(const void *ip, const struct xt_entry_target *target,
+ int numeric)
{
const struct ipt_log_info *loginfo
= (const struct ipt_log_info *)target->data;
@@ -241,8 +235,7 @@ print(const void *ip,
}
/* Saves the union ipt_targinfo in parsable form to stdout. */
-static void
-save(const void *ip, const struct xt_entry_target *target)
+static void LOG_save(const void *ip, const struct xt_entry_target *target)
{
const struct ipt_log_info *loginfo
= (const struct ipt_log_info *)target->data;
@@ -263,22 +256,20 @@ save(const void *ip, const struct xt_entry_target *target)
printf("--log-uid ");
}
-static
-struct iptables_target log
-= {
+static struct iptables_target log_target = {
.name = "LOG",
.version = IPTABLES_VERSION,
.size = IPT_ALIGN(sizeof(struct ipt_log_info)),
.userspacesize = IPT_ALIGN(sizeof(struct ipt_log_info)),
- .help = &help,
- .init = &init,
- .parse = &parse,
- .print = &print,
- .save = &save,
- .extra_opts = opts
+ .help = LOG_help,
+ .init = LOG_init,
+ .parse = LOG_parse,
+ .print = LOG_print,
+ .save = LOG_save,
+ .extra_opts = LOG_opts,
};
void _init(void)
{
- register_target(&log);
+ register_target(&log_target);
}