summaryrefslogtreecommitdiffstats
path: root/extensions/libxt_quota.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_quota.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_quota.c')
-rw-r--r--extensions/libxt_quota.c42
1 files changed, 20 insertions, 22 deletions
diff --git a/extensions/libxt_quota.c b/extensions/libxt_quota.c
index 0e04d203..9f962260 100644
--- a/extensions/libxt_quota.c
+++ b/extensions/libxt_quota.c
@@ -11,14 +11,13 @@
#include <linux/netfilter/xt_quota.h>
-static const struct option opts[] = {
+static const struct option quota_opts[] = {
{"quota", 1, NULL, '1'},
{ }
};
/* print usage */
-static void
-help(void)
+static void quota_help(void)
{
printf("quota options:\n"
" --quota quota quota (bytes)\n" "\n");
@@ -26,7 +25,7 @@ help(void)
/* print matchinfo */
static void
-print(const void *ip, const struct xt_entry_match *match, int numeric)
+quota_print(const void *ip, const struct xt_entry_match *match, int numeric)
{
struct xt_quota_info *q = (struct xt_quota_info *) match->data;
printf("quota: %llu bytes", (unsigned long long) q->quota);
@@ -34,7 +33,7 @@ print(const void *ip, const struct xt_entry_match *match, int numeric)
/* save matchinfo */
static void
-save(const void *ip, const struct xt_entry_match *match)
+quota_save(const void *ip, const struct xt_entry_match *match)
{
struct xt_quota_info *q = (struct xt_quota_info *) match->data;
printf("--quota %llu ", (unsigned long long) q->quota);
@@ -58,9 +57,8 @@ parse_quota(const char *s, u_int64_t * quota)
/* parse all options, returning true if we found any for us */
static int
-parse(int c, char **argv, int invert, unsigned int *flags,
- const void *entry,
- struct xt_entry_match **match)
+quota_parse(int c, char **argv, int invert, unsigned int *flags,
+ const void *entry, struct xt_entry_match **match)
{
struct xt_quota_info *info = (struct xt_quota_info *) (*match)->data;
@@ -79,35 +77,35 @@ parse(int c, char **argv, int invert, unsigned int *flags,
return 1;
}
-struct xtables_match quota = {
+struct xtables_match quota_match = {
.family = AF_INET,
.name = "quota",
.version = IPTABLES_VERSION,
.size = XT_ALIGN(sizeof (struct xt_quota_info)),
.userspacesize = offsetof(struct xt_quota_info, quota),
- .help = &help,
- .parse = &parse,
- .print = &print,
- .save = &save,
- .extra_opts = opts
+ .help = quota_help,
+ .parse = quota_parse,
+ .print = quota_print,
+ .save = quota_save,
+ .extra_opts = quota_opts,
};
-struct xtables_match quota6 = {
+struct xtables_match quota_match6 = {
.family = AF_INET6,
.name = "quota",
.version = IPTABLES_VERSION,
.size = XT_ALIGN(sizeof (struct xt_quota_info)),
.userspacesize = offsetof(struct xt_quota_info, quota),
- .help = &help,
- .parse = &parse,
- .print = &print,
- .save = &save,
- .extra_opts = opts
+ .help = quota_help,
+ .parse = quota_parse,
+ .print = quota_print,
+ .save = quota_save,
+ .extra_opts = quota_opts,
};
void
_init(void)
{
- xtables_register_match(&quota);
- xtables_register_match(&quota6);
+ xtables_register_match(&quota_match);
+ xtables_register_match(&quota_match6);
}