class.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /*
  2. * netlink/route/class.h Traffic Classes
  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_CLASS_H_
  12. #define NETLINK_CLASS_H_
  13. #include <netlink/netlink.h>
  14. #include <netlink/route/tc.h>
  15. #include <netlink/route/qdisc.h>
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19. struct rtnl_class;
  20. extern struct rtnl_class *
  21. rtnl_class_alloc(void);
  22. extern void rtnl_class_put(struct rtnl_class *);
  23. extern int rtnl_class_alloc_cache(struct nl_sock *, int,
  24. struct nl_cache **);
  25. extern struct rtnl_class *
  26. rtnl_class_get(struct nl_cache *, int, uint32_t);
  27. extern struct rtnl_qdisc *
  28. rtnl_class_leaf_qdisc(struct rtnl_class *,
  29. struct nl_cache *);
  30. extern int rtnl_class_build_add_request(struct rtnl_class *, int,
  31. struct nl_msg **);
  32. extern int rtnl_class_add(struct nl_sock *, struct rtnl_class *,
  33. int);
  34. extern int rtnl_class_build_delete_request(struct rtnl_class *,
  35. struct nl_msg **);
  36. extern int rtnl_class_delete(struct nl_sock *,
  37. struct rtnl_class *);
  38. /* deprecated functions */
  39. extern void rtnl_class_foreach_child(struct rtnl_class *,
  40. struct nl_cache *,
  41. void (*cb)(struct nl_object *,
  42. void *),
  43. void *)
  44. __attribute__((deprecated));
  45. extern void rtnl_class_foreach_cls(struct rtnl_class *,
  46. struct nl_cache *,
  47. void (*cb)(struct nl_object *,
  48. void *),
  49. void *)
  50. __attribute__((deprecated));
  51. #ifdef __cplusplus
  52. }
  53. #endif
  54. #endif