summaryrefslogtreecommitdiffstats
path: root/iptables/xtables-nft-multi.c
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2018-06-18 09:18:28 +0200
committerFlorian Westphal <fw@strlen.de>2018-06-27 23:44:04 +0200
commitbe70918eab26e0c5fe219fefab325056144976d9 (patch)
treeab256347ade0a13ccc8f91da83282436a18c8957 /iptables/xtables-nft-multi.c
parentd49ba500efd4dc50eef10324f3c0b4f7ce5d6e3e (diff)
xtables: rename xt-multi binaries to -nft, -legacy
This adds a clear distinction between old iptables (formerly xtables-multi, now xtables-legacy-multi) and new iptables (formerly xtables-compat-multi, now xtables-nft-multi). Users will get the ip/ip6tables names via symbolic links, having a distinct name postfix for the legacy/nft variants helps to make a clear distinction, as iptables-nft will always use nf_tables and iptables-legacy always uses get/setsockopt wheres "iptables" could be symlinked to either -nft or -legacy. Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'iptables/xtables-nft-multi.c')
-rw-r--r--iptables/xtables-nft-multi.c43
1 files changed, 43 insertions, 0 deletions
diff --git a/iptables/xtables-nft-multi.c b/iptables/xtables-nft-multi.c
new file mode 100644
index 00000000..187da81e
--- /dev/null
+++ b/iptables/xtables-nft-multi.c
@@ -0,0 +1,43 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "xshared.h"
+
+#include "xtables-multi.h"
+
+static const struct subcommand multi_subcommands[] = {
+ {"iptables-xml", iptables_xml_main},
+ {"xml", iptables_xml_main},
+ {"iptables", xtables_ip4_main},
+ {"iptables-nft", xtables_ip4_main},
+ {"main4", xtables_ip4_main},
+ {"save4", xtables_ip4_save_main},
+ {"restore4", xtables_ip4_restore_main},
+ {"iptables-save", xtables_ip4_save_main},
+ {"iptables-restore", xtables_ip4_restore_main},
+ {"iptables-nft-save", xtables_ip4_save_main},
+ {"iptables-nft-restore", xtables_ip4_restore_main},
+ {"ip6tables", xtables_ip6_main},
+ {"ip6tables-nft", xtables_ip6_main},
+ {"main6", xtables_ip6_main},
+ {"save6", xtables_ip6_save_main},
+ {"restore6", xtables_ip6_restore_main},
+ {"ip6tables-save", xtables_ip6_save_main},
+ {"ip6tables-restore", xtables_ip6_restore_main},
+ {"ip6tables-nft-save", xtables_ip6_save_main},
+ {"ip6tables-nft-restore", xtables_ip6_restore_main},
+ {"iptables-translate", xtables_ip4_xlate_main},
+ {"ip6tables-translate", xtables_ip6_xlate_main},
+ {"iptables-restore-translate", xtables_ip4_xlate_restore_main},
+ {"ip6tables-restore-translate", xtables_ip6_xlate_restore_main},
+ {"arptables", xtables_arp_main},
+ {"ebtables-translate", xtables_eb_xlate_main},
+ {"ebtables", xtables_eb_main},
+ {"xtables-monitor", xtables_monitor_main},
+ {NULL},
+};
+
+int main(int argc, char **argv)
+{
+ return subcmd_main(argc, argv, multi_subcommands);
+}