From ab0c2b2db6f8fb6153d9f8218895482543d5c072 Mon Sep 17 00:00:00 2001 From: Jeremy Sowden Date: Fri, 29 Oct 2021 21:40:08 +0100 Subject: parser: add `limit_rate_pkts` and `limit_rate_bytes` rules Factor the `N / time-unit` and `N byte-unit / time-unit` expressions from limit expressions out into separate `limit_rate_pkts` and `limit_rate_bytes` rules respectively. Signed-off-by: Jeremy Sowden Signed-off-by: Pablo Neira Ayuso --- include/datatype.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/datatype.h b/include/datatype.h index 448be57f..7ddd3566 100644 --- a/include/datatype.h +++ b/include/datatype.h @@ -309,6 +309,10 @@ extern struct error_record *rate_parse(const struct location *loc, extern struct error_record *data_unit_parse(const struct location *loc, const char *str, uint64_t *rate); +struct limit_rate { + uint64_t rate, unit; +}; + extern void expr_chain_export(const struct expr *e, char *chain); #endif /* NFTABLES_DATATYPE_H */ -- cgit v1.2.3