diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2016-12-05 22:45:22 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2016-12-05 22:50:46 +0100 |
commit | 23b760a774cf12dd18fb68a84d502662ae6eebd8 (patch) | |
tree | 243a95e6647ab44bcf1815e15ff229823257aaa9 /include | |
parent | 1d398465831066c5e98fb2a58d7aa0547595de33 (diff) |
src: add support to flush sets
You can use this new command to remove all existing elements in a set:
# nft flush set filter xyz
After this command, the set 'xyz' in table 'filter' becomes empty.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/netlink.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/netlink.h b/include/netlink.h index 28c11f60..363b5251 100644 --- a/include/netlink.h +++ b/include/netlink.h @@ -165,6 +165,8 @@ extern int netlink_delete_setelems(struct netlink_ctx *ctx, const struct handle const struct expr *expr); extern int netlink_get_setelems(struct netlink_ctx *ctx, const struct handle *h, const struct location *loc, struct set *set); +extern int netlink_flush_setelems(struct netlink_ctx *ctx, const struct handle *h, + const struct location *loc); extern void netlink_dump_table(const struct nftnl_table *nlt); extern void netlink_dump_chain(const struct nftnl_chain *nlc); |