genl.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. * netlink/genl/genl.h Generic Netlink
  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-2012 Thomas Graf <tgraf@suug.ch>
  10. */
  11. #ifndef NETLINK_GENL_H_
  12. #define NETLINK_GENL_H_
  13. #include <netlink/netlink.h>
  14. #include <netlink/msg.h>
  15. #include <netlink/attr.h>
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19. extern int genl_connect(struct nl_sock *);
  20. extern int genl_send_simple(struct nl_sock *, int, int,
  21. int, int);
  22. extern void * genlmsg_put(struct nl_msg *, uint32_t, uint32_t,
  23. int, int, int, uint8_t, uint8_t);
  24. extern int genlmsg_valid_hdr(struct nlmsghdr *, int);
  25. extern int genlmsg_validate(struct nlmsghdr *, int, int,
  26. struct nla_policy *);
  27. extern int genlmsg_parse(struct nlmsghdr *, int, struct nlattr **,
  28. int, struct nla_policy *);
  29. extern struct genlmsghdr *
  30. genlmsg_hdr(struct nlmsghdr *);
  31. extern void * genlmsg_data(const struct genlmsghdr *);
  32. extern void * genlmsg_user_hdr(const struct genlmsghdr *);
  33. extern void * genlmsg_user_data(const struct genlmsghdr *, const int);
  34. extern int genlmsg_user_datalen(const struct genlmsghdr *,
  35. const int);
  36. extern int genlmsg_len(const struct genlmsghdr *);
  37. extern struct nlattr * genlmsg_attrdata(const struct genlmsghdr *, int);
  38. extern int genlmsg_attrlen(const struct genlmsghdr *, int);
  39. extern char * genl_op2name(int, int, char *, size_t);
  40. #ifdef __cplusplus
  41. }
  42. #endif
  43. #endif