From 8ec2e8438a7c4c48c8005a5f352c8ea6cd40d2fe Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Sun, 27 Nov 2016 23:42:54 +0100 Subject: src: reset internal stateful objects This patch allows you to atomically dump and reset stateful objects, eg. # nft list counters table ip filter { counter test { packets 1024 bytes 100000 } } # nft reset quotas table filter counter test { packets 1024 bytes 100000 } # nft reset quotas table filter counter test { packets 0 bytes 0 } Signed-off-by: Pablo Neira Ayuso --- include/rule.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/rule.h') diff --git a/include/rule.h b/include/rule.h index 88acbcc7..9028c84b 100644 --- a/include/rule.h +++ b/include/rule.h @@ -294,6 +294,7 @@ const char *obj_type_name(uint32_t type); * @CMD_INSERT: insert object * @CMD_DELETE: delete object * @CMD_LIST: list container + * @CMD_RESET: reset container * @CMD_FLUSH: flush container * @CMD_RENAME: rename object * @CMD_EXPORT: export the ruleset in a given format @@ -308,6 +309,7 @@ enum cmd_ops { CMD_INSERT, CMD_DELETE, CMD_LIST, + CMD_RESET, CMD_FLUSH, CMD_RENAME, CMD_EXPORT, -- cgit v1.2.3