xtables: add multi-registration functions
Similar to the ones that are present in the kernel.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
diff --git a/xtables.c b/xtables.c
index 05154dd..1ff6e82 100644
--- a/xtables.c
+++ b/xtables.c
@@ -794,6 +794,13 @@
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 @@
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