qdisc.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /*
  2. * netlink/route/qdisc.h Queueing Disciplines
  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_QDISC_H_
  12. #define NETLINK_QDISC_H_
  13. #include <netlink/netlink.h>
  14. #include <netlink/cache.h>
  15. #include <netlink/route/tc.h>
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19. struct rtnl_qdisc;
  20. extern struct rtnl_qdisc *
  21. rtnl_qdisc_alloc(void);
  22. extern void rtnl_qdisc_put(struct rtnl_qdisc *);
  23. extern int rtnl_qdisc_alloc_cache(struct nl_sock *, struct nl_cache **);
  24. extern struct rtnl_qdisc *
  25. rtnl_qdisc_get(struct nl_cache *, int, uint32_t);
  26. extern struct rtnl_qdisc *
  27. rtnl_qdisc_get_by_parent(struct nl_cache *, int, uint32_t);
  28. extern int rtnl_qdisc_build_add_request(struct rtnl_qdisc *, int,
  29. struct nl_msg **);
  30. extern int rtnl_qdisc_add(struct nl_sock *, struct rtnl_qdisc *, int);
  31. extern int rtnl_qdisc_build_update_request(struct rtnl_qdisc *,
  32. struct rtnl_qdisc *,
  33. int, struct nl_msg **);
  34. extern int rtnl_qdisc_update(struct nl_sock *, struct rtnl_qdisc *,
  35. struct rtnl_qdisc *, int);
  36. extern int rtnl_qdisc_build_delete_request(struct rtnl_qdisc *,
  37. struct nl_msg **);
  38. extern int rtnl_qdisc_delete(struct nl_sock *, struct rtnl_qdisc *);
  39. /* Deprecated functions */
  40. extern void rtnl_qdisc_foreach_child(struct rtnl_qdisc *, struct nl_cache *,
  41. void (*cb)(struct nl_object *, void *),
  42. void *) __attribute__ ((deprecated));
  43. extern void rtnl_qdisc_foreach_cls(struct rtnl_qdisc *, struct nl_cache *,
  44. void (*cb)(struct nl_object *, void *),
  45. void *) __attribute__ ((deprecated));
  46. extern int rtnl_qdisc_build_change_request(struct rtnl_qdisc *,
  47. struct rtnl_qdisc *,
  48. struct nl_msg **)
  49. __attribute__ ((deprecated));
  50. extern int rtnl_qdisc_change(struct nl_sock *, struct rtnl_qdisc *,
  51. struct rtnl_qdisc *) __attribute__ ((deprecated));
  52. #ifdef __cplusplus
  53. }
  54. #endif
  55. #endif