libnl  3.2.24-rc1
prio.h
1 /*
2  * netlink/route/sch/prio.c PRIO 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  */
11 
12 #ifndef NETLINK_PRIO_H_
13 #define NETLINK_PRIO_H_
14 
15 #include <netlink/netlink.h>
16 #include <netlink/route/qdisc.h>
17 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21 
22 /**
23  * @name Default Values
24  * @{
25  */
26 
27 /**
28  * Default number of bands.
29  * @ingroup prio
30  */
31 #define QDISC_PRIO_DEFAULT_BANDS 3
32 
33 /**
34  * Default priority mapping.
35  * @ingroup prio
36  */
37 #define QDISC_PRIO_DEFAULT_PRIOMAP \
38  { 1, 2, 2, 2, 1, 2, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1 }
39 
40 /** @} */
41 
42 extern void rtnl_qdisc_prio_set_bands(struct rtnl_qdisc *, int);
43 extern int rtnl_qdisc_prio_get_bands(struct rtnl_qdisc *);
44 extern int rtnl_qdisc_prio_set_priomap(struct rtnl_qdisc *, uint8_t[], int);
45 extern uint8_t *rtnl_qdisc_prio_get_priomap(struct rtnl_qdisc *);
46 
47 extern char * rtnl_prio2str(int, char *, size_t);
48 extern int rtnl_str2prio(const char *);
49 
50 #ifdef __cplusplus
51 }
52 #endif
53 
54 #endif