diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2014-04-11 11:57:53 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2016-02-16 19:30:21 +0100 |
commit | 50b056ce99517939cc4c0f5e278d32a252b71ee6 (patch) | |
tree | b3eee77df463719cc6e17eab8fd35a1774ad7c32 /iptables/nft-shared.h | |
parent | 6ee037003ba68d84180dfd7340e38b9c8f4d01fa (diff) |
nft: xtables: add generic parsing infrastructure to interpret commands
Split the code to parse arguments and to issue command so we reuse this
for the iptables to nft translation infrastructure.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'iptables/nft-shared.h')
-rw-r--r-- | iptables/nft-shared.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/iptables/nft-shared.h b/iptables/nft-shared.h index b3dc3c2b..03784ccc 100644 --- a/iptables/nft-shared.h +++ b/iptables/nft-shared.h @@ -217,4 +217,19 @@ struct xtables_args { #define CMD_ZERO_NUM 0x2000U #define CMD_CHECK 0x4000U +struct nft_xt_cmd_parse { + unsigned int command; + unsigned int rulenum; + char *table; + char *chain; + char *newname; + char *policy; + bool restore; + int verbose; +}; + +void do_parse(struct nft_handle *h, int argc, char *argv[], + struct nft_xt_cmd_parse *p, struct iptables_command_state *cs, + struct xtables_args *args); + #endif |