1 /* SPDX-License-Identifier: LGPL-2.1-or-later 2 * Copyright © 2019 VMware, Inc. */ 3 #pragma once 4 5 #include "conf-parser.h" 6 #include "qdisc.h" 7 #include "time-util.h" 8 9 typedef struct TokenBucketFilter { 10 QDisc meta; 11 12 uint64_t rate; 13 uint64_t peak_rate; 14 uint32_t burst; 15 uint32_t mtu; 16 usec_t latency; 17 size_t limit; 18 size_t mpu; 19 } TokenBucketFilter; 20 21 DEFINE_QDISC_CAST(TBF, TokenBucketFilter); 22 extern const QDiscVTable tbf_vtable; 23 24 CONFIG_PARSER_PROTOTYPE(config_parse_token_bucket_filter_latency); 25 CONFIG_PARSER_PROTOTYPE(config_parse_token_bucket_filter_size); 26 CONFIG_PARSER_PROTOTYPE(config_parse_token_bucket_filter_rate); 27