diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2016-11-27 23:35:25 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2017-01-03 14:21:53 +0100 |
commit | 4756d92e517ae1f7d662c0ed083b54d8dc822e4a (patch) | |
tree | 5130faa44f2f3e72b257f4d30fd1752749109049 /include/statement.h | |
parent | d156fd17ee7ff9a2822d7714e1c8dfe7b6b18f55 (diff) |
src: listing of stateful objects
This patch allows you to dump existing stateful objects, eg.
# nft list ruleset
table ip filter {
counter test {
packets 64 bytes 1268
}
quota test {
over 1 mbytes used 1268 bytes
}
chain input {
type filter hook input priority 0; policy accept;
quota name test drop
counter name test
}
}
# nft list quotas
table ip filter {
quota test {
over 1 mbytes used 1268 bytes
}
}
# nft list counters
table ip filter {
counter test {
packets 64 bytes 1268
}
}
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/statement.h')
-rw-r--r-- | include/statement.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/statement.h b/include/statement.h index d317ae36..9d0f601f 100644 --- a/include/statement.h +++ b/include/statement.h @@ -66,6 +66,7 @@ struct limit_stmt { }; extern struct stmt *limit_stmt_alloc(const struct location *loc); +extern void __limit_stmt_print(const struct limit_stmt *limit); struct reject_stmt { struct expr *expr; @@ -301,4 +302,6 @@ extern void stmt_free(struct stmt *stmt); extern void stmt_list_free(struct list_head *list); extern void stmt_print(const struct stmt *stmt); +const char *get_rate(uint64_t byte_rate, uint64_t *rate); + #endif /* NFTABLES_STATEMENT_H */ |