libnl 3.5.0

htb.h
1 /*
2 * netlink/route/sch/htb.h HTB Qdisc
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation version 2.1
7 * of the License.
8 *
9 * Copyright (c) 2003-2011 Thomas Graf <tgraf@suug.ch>
10 * Copyright (c) 2005 Petr Gotthard <petr.gotthard@siemens.com>
11 * Copyright (c) 2005 Siemens AG Oesterreich
12 */
13
14 #ifndef NETLINK_HTB_H_
15 #define NETLINK_HTB_H_
16
17 #include <netlink/netlink.h>
18 #include <netlink/route/tc.h>
19 #include <netlink/route/qdisc.h>
20 #include <netlink/route/class.h>
21
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25
26 extern uint32_t rtnl_htb_get_rate2quantum(struct rtnl_qdisc *);
27 extern int rtnl_htb_set_rate2quantum(struct rtnl_qdisc *, uint32_t);
28 extern uint32_t rtnl_htb_get_defcls(struct rtnl_qdisc *);
29 extern int rtnl_htb_set_defcls(struct rtnl_qdisc *, uint32_t);
30
31 extern uint32_t rtnl_htb_get_prio(struct rtnl_class *);
32 extern int rtnl_htb_set_prio(struct rtnl_class *, uint32_t);
33
34 extern uint32_t rtnl_htb_get_rate(struct rtnl_class *);
35 extern int rtnl_htb_set_rate(struct rtnl_class *, uint32_t);
36 extern uint32_t rtnl_htb_get_ceil(struct rtnl_class *);
37 extern int rtnl_htb_set_ceil(struct rtnl_class *, uint32_t);
38
39 extern int rtnl_htb_get_rate64(struct rtnl_class *, uint64_t *);
40 extern int rtnl_htb_set_rate64(struct rtnl_class *, uint64_t);
41 extern int rtnl_htb_get_ceil64(struct rtnl_class *, uint64_t *);
42 extern int rtnl_htb_set_ceil64(struct rtnl_class *, uint64_t);
43
44 extern uint32_t rtnl_htb_get_rbuffer(struct rtnl_class *);
45 extern int rtnl_htb_set_rbuffer(struct rtnl_class *, uint32_t);
46 extern uint32_t rtnl_htb_get_cbuffer(struct rtnl_class *);
47 extern int rtnl_htb_set_cbuffer(struct rtnl_class *, uint32_t);
48 extern uint32_t rtnl_htb_get_quantum(struct rtnl_class *);
49 extern int rtnl_htb_set_quantum(struct rtnl_class *, uint32_t);
50 extern int rtnl_htb_set_level(struct rtnl_class *, int);
51 extern int rtnl_htb_get_level(struct rtnl_class *);
52
53 #ifdef __cplusplus
54 }
55 #endif
56
57 #endif
rtnl_htb_get_level
int rtnl_htb_get_level(struct rtnl_class *)
Return level of HTB class.
Definition: htb.c:675
rtnl_htb_set_rbuffer
int rtnl_htb_set_rbuffer(struct rtnl_class *, uint32_t)
Set size of the rate bucket of HTB class.
Definition: htb.c:573
rtnl_htb_set_cbuffer
int rtnl_htb_set_cbuffer(struct rtnl_class *, uint32_t)
Set size of the ceil bucket of HTB class.
Definition: htb.c:609
rtnl_htb_get_rate
uint32_t rtnl_htb_get_rate(struct rtnl_class *)
Return rate of HTB class.
Definition: htb.c:407
rtnl_htb_set_level
int rtnl_htb_set_level(struct rtnl_class *, int)
Set level of HTB class.
Definition: htb.c:699
rtnl_htb_get_quantum
uint32_t rtnl_htb_get_quantum(struct rtnl_class *)
Return quantum of HTB class.
Definition: htb.c:631
rtnl_htb_set_ceil64
int rtnl_htb_set_ceil64(struct rtnl_class *, uint64_t)
Set ceil rate of HTB class.
Definition: htb.c:536
rtnl_htb_get_defcls
uint32_t rtnl_htb_get_defcls(struct rtnl_qdisc *)
Return default class of HTB qdisc.
Definition: htb.c:344
rtnl_htb_set_rate64
int rtnl_htb_set_rate64(struct rtnl_class *, uint64_t)
Set rate of HTB class.
Definition: htb.c:460
rtnl_htb_get_ceil64
int rtnl_htb_get_ceil64(struct rtnl_class *, uint64_t *)
Return ceil rate of HTB class.
Definition: htb.c:504
rtnl_htb_get_rbuffer
uint32_t rtnl_htb_get_rbuffer(struct rtnl_class *)
Return burst buffer size of HTB class.
Definition: htb.c:557
rtnl_htb_get_cbuffer
uint32_t rtnl_htb_get_cbuffer(struct rtnl_class *)
Return ceil burst buffer size of HTB class.
Definition: htb.c:593
rtnl_htb_get_rate64
int rtnl_htb_get_rate64(struct rtnl_class *, uint64_t *)
Return rate of HTB class.
Definition: htb.c:428
rtnl_htb_set_ceil
int rtnl_htb_set_ceil(struct rtnl_class *, uint32_t)
Set ceil rate of HTB class.
Definition: htb.c:524
rtnl_htb_set_rate
int rtnl_htb_set_rate(struct rtnl_class *, uint32_t)
Set rate of HTB class.
Definition: htb.c:448
rtnl_htb_set_quantum
int rtnl_htb_set_quantum(struct rtnl_class *, uint32_t)
Set quantum of HTB class (overwrites value calculated based on r2q)
Definition: htb.c:651
rtnl_htb_set_defcls
int rtnl_htb_set_defcls(struct rtnl_qdisc *, uint32_t)
Set default class of the htb qdisc to the specified value.
Definition: htb.c:360
rtnl_htb_get_rate2quantum
uint32_t rtnl_htb_get_rate2quantum(struct rtnl_qdisc *)
Return rate/quantum ratio of HTB qdisc.
Definition: htb.c:310
rtnl_htb_get_ceil
uint32_t rtnl_htb_get_ceil(struct rtnl_class *)
Return ceil rate of HTB class.
Definition: htb.c:483