From 23b760a774cf12dd18fb68a84d502662ae6eebd8 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Mon, 5 Dec 2016 22:45:22 +0100 Subject: 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 --- include/netlink.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') 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); -- cgit v1.2.3