summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJeremy Sowden <jeremy@azazel.net>2021-10-29 21:40:08 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2021-11-03 12:48:19 +0100
commitab0c2b2db6f8fb6153d9f8218895482543d5c072 (patch)
tree4ce6fa0537ff143e5b440bd4a684011437f69c4a /include
parente3d9ed3c09b5cef5ea5a5eaf13783c44dda7f276 (diff)
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 <jeremy@azazel.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include')
-rw-r--r--include/datatype.h4
1 files changed, 4 insertions, 0 deletions
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 */