action.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * netlink/route/action.h Actions
  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) 2013 Cong Wang <xiyou.wangcong@gmail.com>
  10. */
  11. #ifndef NETLINK_ACTION_H_
  12. #define NETLINK_ACTION_H_
  13. #include <netlink/netlink.h>
  14. #include <netlink/cache.h>
  15. #include <netlink/route/tc.h>
  16. #include <netlink/utils.h>
  17. #ifdef __cplusplus
  18. extern "C" {
  19. #endif
  20. extern struct rtnl_act *rtnl_act_alloc(void);
  21. extern void rtnl_act_get(struct rtnl_act *);
  22. extern void rtnl_act_put(struct rtnl_act *);
  23. extern int rtnl_act_build_add_request(struct rtnl_act *, int,
  24. struct nl_msg **);
  25. extern int rtnl_act_add(struct nl_sock *, struct rtnl_act *, int);
  26. extern int rtnl_act_change(struct nl_sock *, struct rtnl_act *, int);
  27. extern int rtnl_act_build_change_request(struct rtnl_act *, int,
  28. struct nl_msg **);
  29. extern int rtnl_act_build_delete_request(struct rtnl_act *, int,
  30. struct nl_msg **);
  31. extern int rtnl_act_delete(struct nl_sock *, struct rtnl_act *,
  32. int);
  33. extern int rtnl_act_append(struct rtnl_act **, struct rtnl_act *);
  34. extern int rtnl_act_remove(struct rtnl_act **, struct rtnl_act *);
  35. extern int rtnl_act_fill(struct nl_msg *, int, struct rtnl_act *);
  36. extern void rtnl_act_put_all(struct rtnl_act **);
  37. extern int rtnl_act_parse(struct rtnl_act **, struct nlattr *);
  38. #ifdef __cplusplus
  39. }
  40. #endif
  41. #endif