From 6615676d825e02d271fe7a9ca78a77ac3773ab93 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Mon, 3 Aug 2015 15:50:03 +0200 Subject: 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 --- include/datatype.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/datatype.h') 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 */ -- cgit v1.2.3