1 #include <stdio.h>
2 #include <stdlib.h>
3 #include <string.h>
4 #include "xshared.h"
5
6 #include "xtables-multi.h"
7
8 #ifdef ENABLE_IPV4
9 #include "iptables-multi.h"
10 #endif
11
12 #ifdef ENABLE_IPV6
13 #include "ip6tables-multi.h"
14 #endif
15
16 static const struct subcommand multi_subcommands[] = {
17 #ifdef ENABLE_IPV4
18 {"iptables", iptables_main},
19 {"main4", iptables_main},
20 {"iptables-save", iptables_save_main},
21 {"save4", iptables_save_main},
22 {"iptables-restore", iptables_restore_main},
23 {"restore4", iptables_restore_main},
24 #endif
25 {"iptables-xml", iptables_xml_main},
26 {"xml", iptables_xml_main},
27 #ifdef ENABLE_IPV6
28 {"ip6tables", ip6tables_main},
29 {"main6", ip6tables_main},
30 {"ip6tables-save", ip6tables_save_main},
31 {"save6", ip6tables_save_main},
32 {"ip6tables-restore", ip6tables_restore_main},
33 {"restore6", ip6tables_restore_main},
34 #endif
35 {NULL},
36 };
37
main(int argc,char ** argv)38 int main(int argc, char **argv)
39 {
40 return subcmd_main(argc, argv, multi_subcommands);
41 }
42