tc.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. * netlink-private/tc.h Local Traffic Control Interface
  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-2013 Thomas Graf <tgraf@suug.ch>
  10. */
  11. #ifndef NETLINK_TC_PRIV_H_
  12. #define NETLINK_TC_PRIV_H_
  13. #include <netlink-private/netlink.h>
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17. #define TCA_ATTR_HANDLE 0x0001
  18. #define TCA_ATTR_PARENT 0x0002
  19. #define TCA_ATTR_IFINDEX 0x0004
  20. #define TCA_ATTR_KIND 0x0008
  21. #define TCA_ATTR_FAMILY 0x0010
  22. #define TCA_ATTR_INFO 0x0020
  23. #define TCA_ATTR_OPTS 0x0040
  24. #define TCA_ATTR_STATS 0x0080
  25. #define TCA_ATTR_XSTATS 0x0100
  26. #define TCA_ATTR_LINK 0x0200
  27. #define TCA_ATTR_MTU 0x0400
  28. #define TCA_ATTR_MPU 0x0800
  29. #define TCA_ATTR_OVERHEAD 0x1000
  30. #define TCA_ATTR_LINKTYPE 0x2000
  31. #define TCA_ATTR_MAX TCA_ATTR_LINKTYPE
  32. extern int tca_parse(struct nlattr **, int, struct rtnl_tc *,
  33. struct nla_policy *);
  34. #define RTNL_TC_RTABLE_SIZE 256
  35. extern int rtnl_tc_build_rate_table(struct rtnl_tc *tc, struct rtnl_ratespec *,
  36. uint32_t *);
  37. static inline void *tca_xstats(struct rtnl_tc *tca)
  38. {
  39. return tca->tc_xstats->d_data;
  40. }
  41. #ifdef __cplusplus
  42. }
  43. #endif
  44. #endif