summaryrefslogtreecommitdiffstats
path: root/iptables-xml.c
diff options
context:
space:
mode:
Diffstat (limited to 'iptables-xml.c')
-rw-r--r--iptables-xml.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/iptables-xml.c b/iptables-xml.c
index 307845c5..4bb05578 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)
@@ -30,18 +31,6 @@ const char *program_version;
#ifndef IPTABLES_MULTI
int line = 0;
-void exit_error(enum xtables_exittype status, const char *msg, ...)
-{
- va_list args;
-
- va_start(args, msg);
- fprintf(stderr, "%s v%s: ", program_name, program_version);
- vfprintf(stderr, msg, args);
- va_end(args);
- fprintf(stderr, "\n");
- /* On error paths, make sure that we don't leak memory */
- exit(status);
-}
#endif
static void print_usage(const char *name, const char *version)
@@ -629,6 +618,11 @@ 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",
+};
#ifdef IPTABLES_MULTI
int
@@ -646,6 +640,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':