diff options
author | Phil Sutter <phil@nwl.cc> | 2023-06-15 15:24:28 +0200 |
---|---|---|
committer | Phil Sutter <phil@nwl.cc> | 2023-07-13 16:57:56 +0200 |
commit | 83e0f4402fb731633975b54ee043820d3cc7ed8e (patch) | |
tree | 36fa5f53e74d9e9c457305accd6196140709e4f1 /include/mnl.h | |
parent | e2431ab955fe453b5fd25a3ab3090fbf4bf3e653 (diff) |
Implement 'reset {set,map,element}' commands
All these are used to reset state in set/map elements, i.e. reset the
timeout or zero quota and counter values.
While 'reset element' expects a (list of) elements to be specified which
should be reset, 'reset set/map' will reset all elements in the given
set/map.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'include/mnl.h')
-rw-r--r-- | include/mnl.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/mnl.h b/include/mnl.h index c0676691..cd5a2053 100644 --- a/include/mnl.h +++ b/include/mnl.h @@ -68,9 +68,11 @@ int mnl_nft_setelem_add(struct netlink_ctx *ctx, struct cmd *cmd, int mnl_nft_setelem_del(struct netlink_ctx *ctx, struct cmd *cmd, const struct handle *h, const struct expr *init); int mnl_nft_setelem_flush(struct netlink_ctx *ctx, const struct cmd *cmd); -int mnl_nft_setelem_get(struct netlink_ctx *ctx, struct nftnl_set *nls); +int mnl_nft_setelem_get(struct netlink_ctx *ctx, struct nftnl_set *nls, + bool reset); struct nftnl_set *mnl_nft_setelem_get_one(struct netlink_ctx *ctx, - struct nftnl_set *nls); + struct nftnl_set *nls, + bool reset); struct nftnl_obj_list *mnl_nft_obj_dump(struct netlink_ctx *ctx, int family, const char *table, |