diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2015-08-03 15:50:03 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2015-09-23 12:16:13 +0200 |
commit | 6615676d825e02d271fe7a9ca78a77ac3773ab93 (patch) | |
tree | 4b87a754e50301cb2f8c6c47e44670cc6a27356f /include/datatype.h | |
parent | 5174b6850291b67769ebd018e5c90837897969c2 (diff) |
src: add per-bytes limit
This example show how to accept packets below the ratelimit:
... limit rate 1024 mbytes/second counter accept
You need a Linux kernel >= 4.3-rc1.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/datatype.h')
-rw-r--r-- | include/datatype.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/datatype.h b/include/datatype.h index 2a6a4fca..ebafa655 100644 --- a/include/datatype.h +++ b/include/datatype.h @@ -235,4 +235,8 @@ extern void time_print(uint64_t seconds); extern struct error_record *time_parse(const struct location *loc, const char *c, uint64_t *res); +extern struct error_record *rate_parse(const struct location *loc, + const char *str, uint64_t *rate, + uint64_t *unit); + #endif /* NFTABLES_DATATYPE_H */ |