From 1694df2de79f39c5037f82601e02226022b2e38f Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Fri, 14 Oct 2022 23:19:22 +0200 Subject: Implement 'reset rule' and 'reset rules' commands Reset rule counters and quotas in kernel, i.e. without having to reload them. Requires respective kernel patch to support NFT_MSG_GETRULE_RESET message type. Signed-off-by: Phil Sutter --- include/netlink.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/netlink.h') diff --git a/include/netlink.h b/include/netlink.h index 5a7f6a1e..0d97f71c 100644 --- a/include/netlink.h +++ b/include/netlink.h @@ -183,6 +183,9 @@ extern int netlink_list_flowtables(struct netlink_ctx *ctx, extern struct flowtable *netlink_delinearize_flowtable(struct netlink_ctx *ctx, struct nftnl_flowtable *nlo); +extern int netlink_reset_rules(struct netlink_ctx *ctx, const struct cmd *cmd, + bool dump); + extern void netlink_dump_chain(const struct nftnl_chain *nlc, struct netlink_ctx *ctx); extern void netlink_dump_rule(const struct nftnl_rule *nlr, -- cgit v1.2.3