libnl
3.2.3
|
00001 /* 00002 * netlink/route/sch/prio.c PRIO Qdisc 00003 * 00004 * This library is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU Lesser General Public 00006 * License as published by the Free Software Foundation version 2.1 00007 * of the License. 00008 * 00009 * Copyright (c) 2003-2011 Thomas Graf <tgraf@suug.ch> 00010 */ 00011 00012 #ifndef NETLINK_PRIO_H_ 00013 #define NETLINK_PRIO_H_ 00014 00015 #include <netlink/netlink.h> 00016 00017 #ifdef __cplusplus 00018 extern "C" { 00019 #endif 00020 00021 /** 00022 * @name Default Values 00023 * @{ 00024 */ 00025 00026 /** 00027 * Default number of bands. 00028 * @ingroup prio 00029 */ 00030 #define QDISC_PRIO_DEFAULT_BANDS 3 00031 00032 /** 00033 * Default priority mapping. 00034 * @ingroup prio 00035 */ 00036 #define QDISC_PRIO_DEFAULT_PRIOMAP \ 00037 { 1, 2, 2, 2, 1, 2, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1 } 00038 00039 /** @} */ 00040 00041 extern void rtnl_qdisc_prio_set_bands(struct rtnl_qdisc *, int); 00042 extern int rtnl_qdisc_prio_get_bands(struct rtnl_qdisc *); 00043 extern int rtnl_qdisc_prio_set_priomap(struct rtnl_qdisc *, uint8_t[], int); 00044 extern uint8_t *rtnl_qdisc_prio_get_priomap(struct rtnl_qdisc *); 00045 00046 extern char * rtnl_prio2str(int, char *, size_t); 00047 extern int rtnl_str2prio(const char *); 00048 00049 #ifdef __cplusplus 00050 } 00051 #endif 00052 00053 #endif