libnl: /data/src/libnl3/include/netlink/route/qdisc/prio.h Source File

libnl 3.7.0

prio.h
1 /* SPDX-License-Identifier: LGPL-2.1-only */
2 /*
3 * Copyright (c) 2003-2011 Thomas Graf <tgraf@suug.ch>
4 */
5
6 #ifndef NETLINK_PRIO_H_
7 #define NETLINK_PRIO_H_
8
9 #include <netlink/netlink.h>
10 #include <netlink/route/qdisc.h>
11
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15
16 /**
17 * @name Default Values
18 * @{
19 */
20
21 /**
22 * Default number of bands.
23 * @ingroup prio
24 */
25 #define QDISC_PRIO_DEFAULT_BANDS 3
26
27 /**
28 * Default priority mapping.
29 * @ingroup prio
30 */
31 #define QDISC_PRIO_DEFAULT_PRIOMAP \
32 { 1, 2, 2, 2, 1, 2, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1 }
33
34 /** @} */
35
36 extern void rtnl_qdisc_prio_set_bands(struct rtnl_qdisc *, int);
37 extern int rtnl_qdisc_prio_get_bands(struct rtnl_qdisc *);
38 extern int rtnl_qdisc_prio_set_priomap(struct rtnl_qdisc *, uint8_t[], int);
39 extern uint8_t *rtnl_qdisc_prio_get_priomap(struct rtnl_qdisc *);
40
41 extern char * rtnl_prio2str(int, char *, size_t);
42 extern int rtnl_str2prio(const char *);
43
44 #ifdef __cplusplus
45 }
46 #endif
47
48 #endif
rtnl_prio2str
char * rtnl_prio2str(int, char *, size_t)
Convert priority to character string.
Definition: prio.c:231
rtnl_qdisc_prio_get_bands
int rtnl_qdisc_prio_get_bands(struct rtnl_qdisc *)
Get number of bands of PRIO qdisc.
Definition: prio.c:139
rtnl_str2prio
int rtnl_str2prio(const char *)
Convert character string to priority.
Definition: prio.c:245
rtnl_qdisc_prio_set_priomap
int rtnl_qdisc_prio_set_priomap(struct rtnl_qdisc *, uint8_t[], int)
Set priomap of the PRIO qdisc.
Definition: prio.c:159
rtnl_qdisc_prio_set_bands
void rtnl_qdisc_prio_set_bands(struct rtnl_qdisc *, int)
Set number of bands of PRIO qdisc.
Definition: prio.c:123
rtnl_qdisc_prio_get_priomap
uint8_t * rtnl_qdisc_prio_get_priomap(struct rtnl_qdisc *)
Get priomap of a PRIO qdisc.
Definition: prio.c:191