xtables-legacy-multi.c 1.4 KB
Newer Older
1
#include <config.h>
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "xshared.h"

#include "xtables-multi.h"

#ifdef ENABLE_IPV4
#include "iptables-multi.h"
#endif

#ifdef ENABLE_IPV6
#include "ip6tables-multi.h"
#endif

17
18
19
20
#ifdef ENABLE_NFTABLES
#include "xtables-multi.h"
#endif

21
22
23
24
25
26
27
28
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},
29
30
31
32
33
	{"iptables-legacy",     iptables_main},
	{"iptables-legacy-save",iptables_save_main},
	{"iptables-legacy-restore",iptables_restore_main},


34
35
36
37
38
39
40
41
42
43
#endif
	{"iptables-xml",        iptables_xml_main},
	{"xml",                 iptables_xml_main},
#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},
44
45
46
	{"ip6tables-legacy",    ip6tables_main},
	{"ip6tables-legacy-save",ip6tables_save_main},
	{"ip6tables-legacy-restore",ip6tables_restore_main},
47
48
49
50
51
52
53
54
#endif
	{NULL},
};

int main(int argc, char **argv)
{
	return subcmd_main(argc, argv, multi_subcommands);
}