prio.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. #ifndef NETLINK_PRIO_H_
  12. #define NETLINK_PRIO_H_
  13. #include <netlink/netlink.h>
  14. #include <netlink/route/qdisc.h>
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18. /**
  19. * @name Default Values
  20. * @{
  21. */
  22. /**
  23. * Default number of bands.
  24. * @ingroup prio
  25. */
  26. #define QDISC_PRIO_DEFAULT_BANDS 3
  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. extern void rtnl_qdisc_prio_set_bands(struct rtnl_qdisc *, int);
  35. extern int rtnl_qdisc_prio_get_bands(struct rtnl_qdisc *);
  36. extern int rtnl_qdisc_prio_set_priomap(struct rtnl_qdisc *, uint8_t[], int);
  37. extern uint8_t *rtnl_qdisc_prio_get_priomap(struct rtnl_qdisc *);
  38. extern char * rtnl_prio2str(int, char *, size_t);
  39. extern int rtnl_str2prio(const char *);
  40. #ifdef __cplusplus
  41. }
  42. #endif
  43. #endif