| 1 |
/* SPDX-License-Identifier: LGPL-2.1-only */ |
| 2 |
/* |
| 3 |
* Copyright (c) 2003-2011 Thomas Graf <[email protected]> |
| 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 |