From: Jan Engelhardt <jengelh@medozas.de>
To: netfilter-devel@vger.kernel.org
Cc: kaber@trash.net
Subject: [PATCH 07/10] xtables: add multi-registration functions
Date: Fri, 26 Jun 2009 21:19:49 +0200 [thread overview]
Message-ID: <1246043992-379-8-git-send-email-jengelh@medozas.de> (raw)
In-Reply-To: <1246043992-379-1-git-send-email-jengelh@medozas.de>
Similar to the ones that are present in the kernel.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
---
include/xtables.h.in | 2 ++
xtables.c | 14 ++++++++++++++
2 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/include/xtables.h.in b/include/xtables.h.in
index 037fae1..222e2a9 100644
--- a/include/xtables.h.in
+++ b/include/xtables.h.in
@@ -233,7 +233,9 @@ extern struct xtables_target *xtables_find_target(const char *name,
/* Your shared library should call one of these. */
extern void xtables_register_match(struct xtables_match *me);
+extern void xtables_register_matches(struct xtables_match *, unsigned int);
extern void xtables_register_target(struct xtables_target *me);
+extern void xtables_register_targets(struct xtables_target *, unsigned int);
extern bool xtables_strtoul(const char *, char **, unsigned long *,
unsigned long, unsigned long);
diff --git a/xtables.c b/xtables.c
index 05154dd..1ff6e82 100644
--- a/xtables.c
+++ b/xtables.c
@@ -794,6 +794,13 @@ void xtables_register_match(struct xtables_match *me)
me->mflags = 0;
}
+void xtables_register_matches(struct xtables_match *match, unsigned int n)
+{
+ do {
+ xtables_register_match(&match[--n]);
+ } while (n > 0);
+}
+
void xtables_register_target(struct xtables_target *me)
{
struct xtables_target *old;
@@ -868,6 +875,13 @@ void xtables_register_target(struct xtables_target *me)
me->tflags = 0;
}
+void xtables_register_targets(struct xtables_target *target, unsigned int n)
+{
+ do {
+ xtables_register_target(&target[--n]);
+ } while (n > 0);
+}
+
/**
* xtables_param_act - act on condition
* @status: a constant from enum xtables_exittype
--
1.6.3.2
next prev parent reply other threads:[~2009-06-26 19:20 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-26 19:19 (unknown), Jan Engelhardt
2009-06-26 19:19 ` [PATCH 01/10] iptables: accept multiple IP address specifications for -s, -d Jan Engelhardt
2009-06-26 19:19 ` [PATCH 02/10] libiptc: split v4 and v6 Jan Engelhardt
2009-06-26 19:19 ` [PATCH 03/10] extensions: collapse registration structures Jan Engelhardt
2009-06-26 19:19 ` [PATCH 04/10] iptables: allow for parse-less extensions Jan Engelhardt
2009-06-26 19:19 ` [PATCH 05/10] iptables: allow for help-less extensions Jan Engelhardt
2009-06-26 19:19 ` [PATCH 06/10] extensions: remove empty help and parse functions Jan Engelhardt
2009-06-26 19:19 ` Jan Engelhardt [this message]
2009-06-26 19:19 ` [PATCH 08/10] extensions: collapse data variables to use multi-reg calls Jan Engelhardt
2009-06-26 19:19 ` [PATCH 09/10] xtables: warn of missing version identifier in extensions Jan Engelhardt
2009-06-26 19:19 ` [PATCH 10/10] COMMIT_NOTES: notice to check for soversion bumps Jan Engelhardt
2009-06-29 12:56 ` Patrick McHardy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1246043992-379-8-git-send-email-jengelh@medozas.de \
--to=jengelh@medozas.de \
--cc=kaber@trash.net \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).