1 /* SPDX-License-Identifier: LGPL-2.1-or-later */ 2 #pragma once 3 4 #include "conf-parser.h" 5 #include "qdisc.h" 6 #include "tclass.h" 7 8 typedef struct HierarchyTokenBucket { 9 QDisc meta; 10 11 uint32_t default_class; 12 uint32_t rate_to_quantum; 13 } HierarchyTokenBucket; 14 15 DEFINE_QDISC_CAST(HTB, HierarchyTokenBucket); 16 extern const QDiscVTable htb_vtable; 17 18 CONFIG_PARSER_PROTOTYPE(config_parse_hierarchy_token_bucket_default_class); 19 CONFIG_PARSER_PROTOTYPE(config_parse_hierarchy_token_bucket_u32); 20 21 typedef struct HierarchyTokenBucketClass { 22 TClass meta; 23 24 uint32_t priority; 25 uint32_t quantum; 26 uint32_t mtu; 27 uint16_t overhead; 28 uint64_t rate; 29 uint32_t buffer; 30 uint64_t ceil_rate; 31 uint32_t ceil_buffer; 32 } HierarchyTokenBucketClass; 33 34 DEFINE_TCLASS_CAST(HTB, HierarchyTokenBucketClass); 35 extern const TClassVTable htb_tclass_vtable; 36 37 CONFIG_PARSER_PROTOTYPE(config_parse_hierarchy_token_bucket_class_u32); 38 CONFIG_PARSER_PROTOTYPE(config_parse_hierarchy_token_bucket_class_size); 39 CONFIG_PARSER_PROTOTYPE(config_parse_hierarchy_token_bucket_class_rate); 40