summaryrefslogtreecommitdiffstats
path: root/include/netlink.h
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2023-06-15 15:24:28 +0200
committerPhil Sutter <phil@nwl.cc>2023-07-13 16:57:56 +0200
commit83e0f4402fb731633975b54ee043820d3cc7ed8e (patch)
tree36fa5f53e74d9e9c457305accd6196140709e4f1 /include/netlink.h
parente2431ab955fe453b5fd25a3ab3090fbf4bf3e653 (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/netlink.h')
-rw-r--r--include/netlink.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/netlink.h b/include/netlink.h
index d52434c7..6766d7e8 100644
--- a/include/netlink.h
+++ b/include/netlink.h
@@ -165,10 +165,11 @@ extern struct stmt *netlink_parse_set_expr(const struct set *set,
const struct nftnl_expr *nle);
extern int netlink_list_setelems(struct netlink_ctx *ctx,
- const struct handle *h, struct set *set);
+ const struct handle *h, struct set *set,
+ bool reset);
extern int netlink_get_setelem(struct netlink_ctx *ctx, const struct handle *h,
const struct location *loc, struct set *cache_set,
- struct set *set, struct expr *init);
+ struct set *set, struct expr *init, bool reset);
extern int netlink_delinearize_setelem(struct nftnl_set_elem *nlse,
struct set *set,
struct nft_cache *cache);