summaryrefslogtreecommitdiffstats
path: root/xtables-multi.c
diff options
context:
space:
mode:
authorMaciej ┼╗enczykowski <maze@google.com>2011-04-04 22:30:16 -0700
committerMaciej ┼╗enczykowski <maze@google.com>2011-04-19 18:22:11 -0700
commit26ed9ea93564bb5ffdb5238eaa202cd9bcf6d6d1 (patch)
tree46bfaccb3adf072476a35dfd2b1aa3828844fc11 /xtables-multi.c
parent9a9694fbf1796a6a5011b60b2a15c01fa3c61368 (diff)
combine ip6?tables-multi into xtables-multi
Signed-off-by: Maciej Zenczykowski <maze@google.com>
Diffstat (limited to 'xtables-multi.c')
-rw-r--r--xtables-multi.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/xtables-multi.c b/xtables-multi.c
new file mode 100644
index 00000000..f8d56ce9
--- /dev/null
+++ b/xtables-multi.c
@@ -0,0 +1,39 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "xshared.h"
+
+#ifdef ENABLE_IPV4
+#include "iptables-multi.h"
+#endif
+
+#ifdef ENABLE_IPV6
+#include "ip6tables-multi.h"
+#endif
+
+static const struct subcommand multi_subcommands[] = {
+#ifdef ENABLE_IPV4
+ {"iptables", iptables_main},
+ {"main4", iptables_main},
+ {"iptables-save", iptables_save_main},
+ {"save4", iptables_save_main},
+ {"iptables-restore", iptables_restore_main},
+ {"restore4", iptables_restore_main},
+ {"iptables-xml", iptables_xml_main},
+ {"xml4", iptables_xml_main},
+#endif
+#ifdef ENABLE_IPV6
+ {"ip6tables", ip6tables_main},
+ {"main6", ip6tables_main},
+ {"ip6tables-save", ip6tables_save_main},
+ {"save6", ip6tables_save_main},
+ {"ip6tables-restore", ip6tables_restore_main},
+ {"restore6", ip6tables_restore_main},
+#endif
+ {NULL},
+};
+
+int main(int argc, char **argv)
+{
+ return subcmd_main(argc, argv, multi_subcommands);
+}