summaryrefslogtreecommitdiffstats
path: root/iptables-xml.c
diff options
context:
space:
mode:
authorJamal Hadi Salim <hadi@cyberus.ca>2009-02-11 13:03:34 +0100
committerPatrick McHardy <kaber@trash.net>2009-02-11 13:03:34 +0100
commit4dcdc9b3f8f42eb3b5a1d12e1b3d2fc1e2675725 (patch)
tree0b5de7caba3187728582de15e2a13feced3b3dec /iptables-xml.c
parent40a8343d3ad0cdbc3a7e69c8d970ad75807c29ed (diff)
libxtables: Make ip6tables, iptables and iptables-xml use xtables_globals
convert ip6tables, iptables and iptables-xml to use xtables_globals/xtables_set_params() Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca> Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'iptables-xml.c')
-rw-r--r--iptables-xml.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/iptables-xml.c b/iptables-xml.c
index 307845c5..329c5983 100644
--- a/iptables-xml.c
+++ b/iptables-xml.c
@@ -17,6 +17,7 @@
#include "iptables.h"
#include "libiptc/libiptc.h"
#include "iptables-multi.h"
+#include <xtables.h>
#ifdef DEBUG
#define DEBUGP(x, args...) fprintf(stderr, x, ## args)
@@ -629,6 +630,12 @@ do_rule(char *pcnt, char *bcnt, int argc, char *argv[], int argvattr[])
do_rule_part(NULL, NULL, 1, argc, argv, argvattr);
}
+struct xtables_globals iptables_xml_globals = {
+ .option_offset = 0,
+ .program_version = IPTABLES_VERSION,
+ .program_name = "iptables-xml",
+ .exit_error = exit_error,
+};
#ifdef IPTABLES_MULTI
int
@@ -646,6 +653,7 @@ main(int argc, char *argv[])
program_version = IPTABLES_VERSION;
line = 0;
+ xtables_set_params(&iptables_xml_globals);
while ((c = getopt_long(argc, argv, "cvh", options, NULL)) != -1) {
switch (c) {
case 'c':