summaryrefslogtreecommitdiffstats
path: root/iptables/nft-shared.h
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2018-07-19 18:32:05 +0200
committerFlorian Westphal <fw@strlen.de>2018-07-19 23:11:03 +0200
commitf3b772c10b782196060fe39ca6da142ba75e43d9 (patch)
treeaf2af6d6dd327d65f4301d6402a33e6fc36090b1 /iptables/nft-shared.h
parentfa1681f170e2b8d80d9ef9d4564797f0f5969fd0 (diff)
xtables: introduce save_chain callback
In preparation for ebtables-save implementation, introduce a callback for convenient per-family formatting of chains in save output. Signed-off-by: Phil Sutter <phil@nwl.cc> Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'iptables/nft-shared.h')
-rw-r--r--iptables/nft-shared.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/iptables/nft-shared.h b/iptables/nft-shared.h
index 20c19863..882f60e8 100644
--- a/iptables/nft-shared.h
+++ b/iptables/nft-shared.h
@@ -5,6 +5,7 @@
#include <libnftnl/rule.h>
#include <libnftnl/expr.h>
+#include <libnftnl/chain.h>
#include <linux/netfilter_arp/arp_tables.h>
@@ -95,6 +96,7 @@ struct nft_family_ops {
unsigned int format);
void (*save_rule)(const void *data, unsigned int format);
void (*save_counters)(const void *data);
+ void (*save_chain)(const struct nftnl_chain *c, const char *policy);
void (*proto_parse)(struct iptables_command_state *cs,
struct xtables_args *args);
void (*post_parse)(int command, struct iptables_command_state *cs,
@@ -166,6 +168,7 @@ void save_rule_details(const struct iptables_command_state *cs,
const char *outiface,
unsigned const char *outiface_mask);
void save_counters(const void *data);
+void nft_ipv46_save_chain(const struct nftnl_chain *c, const char *policy);
void save_matches_and_target(struct xtables_rule_match *m,
struct xtables_target *target,
const char *jumpto,