From f3b772c10b782196060fe39ca6da142ba75e43d9 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Thu, 19 Jul 2018 18:32:05 +0200 Subject: 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 Signed-off-by: Florian Westphal --- iptables/nft-shared.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'iptables/nft-shared.h') 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 #include +#include #include @@ -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, -- cgit v1.2.3