libnl  3.7.0
htb.h
1 /* SPDX-License-Identifier: LGPL-2.1-only */
2 /*
3  * Copyright (c) 2003-2011 Thomas Graf <tgraf@suug.ch>
4  * Copyright (c) 2005 Petr Gotthard <petr.gotthard@siemens.com>
5  * Copyright (c) 2005 Siemens AG Oesterreich
6  */
7 
8 #ifndef NETLINK_HTB_H_
9 #define NETLINK_HTB_H_
10 
11 #include <netlink/netlink.h>
12 #include <netlink/route/tc.h>
13 #include <netlink/route/qdisc.h>
14 #include <netlink/route/class.h>
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19 
20 extern uint32_t rtnl_htb_get_rate2quantum(struct rtnl_qdisc *);
21 extern int rtnl_htb_set_rate2quantum(struct rtnl_qdisc *, uint32_t);
22 extern uint32_t rtnl_htb_get_defcls(struct rtnl_qdisc *);
23 extern int rtnl_htb_set_defcls(struct rtnl_qdisc *, uint32_t);
24 
25 extern uint32_t rtnl_htb_get_prio(struct rtnl_class *);
26 extern int rtnl_htb_set_prio(struct rtnl_class *, uint32_t);
27 
28 extern uint32_t rtnl_htb_get_rate(struct rtnl_class *);
29 extern int rtnl_htb_set_rate(struct rtnl_class *, uint32_t);
30 extern uint32_t rtnl_htb_get_ceil(struct rtnl_class *);
31 extern int rtnl_htb_set_ceil(struct rtnl_class *, uint32_t);
32 
33 extern int rtnl_htb_get_rate64(struct rtnl_class *, uint64_t *);
34 extern int rtnl_htb_set_rate64(struct rtnl_class *, uint64_t);
35 extern int rtnl_htb_get_ceil64(struct rtnl_class *, uint64_t *);
36 extern int rtnl_htb_set_ceil64(struct rtnl_class *, uint64_t);
37 
38 extern uint32_t rtnl_htb_get_rbuffer(struct rtnl_class *);
39 extern int rtnl_htb_set_rbuffer(struct rtnl_class *, uint32_t);
40 extern uint32_t rtnl_htb_get_cbuffer(struct rtnl_class *);
41 extern int rtnl_htb_set_cbuffer(struct rtnl_class *, uint32_t);
42 extern uint32_t rtnl_htb_get_quantum(struct rtnl_class *);
43 extern int rtnl_htb_set_quantum(struct rtnl_class *, uint32_t);
44 extern int rtnl_htb_set_level(struct rtnl_class *, int);
45 extern int rtnl_htb_get_level(struct rtnl_class *);
46 
47 #ifdef __cplusplus
48 }
49 #endif
50 
51 #endif
int rtnl_htb_set_rbuffer(struct rtnl_class *, uint32_t)
Set size of the rate bucket of HTB class.
Definition: htb.c:567
int rtnl_htb_set_level(struct rtnl_class *, int)
Set level of HTB class.
Definition: htb.c:693
uint32_t rtnl_htb_get_ceil(struct rtnl_class *)
Return ceil rate of HTB class.
Definition: htb.c:477
int rtnl_htb_set_defcls(struct rtnl_qdisc *, uint32_t)
Set default class of the htb qdisc to the specified value.
Definition: htb.c:354
uint32_t rtnl_htb_get_defcls(struct rtnl_qdisc *)
Return default class of HTB qdisc.
Definition: htb.c:338
int rtnl_htb_set_quantum(struct rtnl_class *, uint32_t)
Set quantum of HTB class (overwrites value calculated based on r2q)
Definition: htb.c:645
int rtnl_htb_set_rate(struct rtnl_class *, uint32_t)
Set rate of HTB class.
Definition: htb.c:442
int rtnl_htb_get_ceil64(struct rtnl_class *, uint64_t *)
Return ceil rate of HTB class.
Definition: htb.c:498
int rtnl_htb_get_rate64(struct rtnl_class *, uint64_t *)
Return rate of HTB class.
Definition: htb.c:422
uint32_t rtnl_htb_get_rate2quantum(struct rtnl_qdisc *)
Return rate/quantum ratio of HTB qdisc.
Definition: htb.c:304
int rtnl_htb_set_rate64(struct rtnl_class *, uint64_t)
Set rate of HTB class.
Definition: htb.c:454
uint32_t rtnl_htb_get_rbuffer(struct rtnl_class *)
Return burst buffer size of HTB class.
Definition: htb.c:551
int rtnl_htb_set_ceil(struct rtnl_class *, uint32_t)
Set ceil rate of HTB class.
Definition: htb.c:518
int rtnl_htb_set_cbuffer(struct rtnl_class *, uint32_t)
Set size of the ceil bucket of HTB class.
Definition: htb.c:603
int rtnl_htb_set_ceil64(struct rtnl_class *, uint64_t)
Set ceil rate of HTB class.
Definition: htb.c:530
uint32_t rtnl_htb_get_quantum(struct rtnl_class *)
Return quantum of HTB class.
Definition: htb.c:625
uint32_t rtnl_htb_get_rate(struct rtnl_class *)
Return rate of HTB class.
Definition: htb.c:401
uint32_t rtnl_htb_get_cbuffer(struct rtnl_class *)
Return ceil burst buffer size of HTB class.
Definition: htb.c:587
int rtnl_htb_get_level(struct rtnl_class *)
Return level of HTB class.
Definition: htb.c:669