nfnl.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * netlink/nfnl/nfnl.h Netfilter 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-2008 Thomas Graf <tgraf@suug.ch>
  10. * Copyright (c) 2007 Philip Craig <philipc@snapgear.com>
  11. * Copyright (c) 2007 Secure Computing Corporation
  12. */
  13. #ifndef NETLINK_NFNL_H_
  14. #define NETLINK_NFNL_H_
  15. #include <netlink/netlink.h>
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19. #define NFNL_HDRLEN NLMSG_ALIGN(sizeof(struct nfgenmsg))
  20. #define NFNLMSG_TYPE(subsys, subtype) (((subsys) << 8) | (subtype))
  21. extern int nfnl_connect(struct nl_sock *);
  22. extern uint8_t nfnlmsg_subsys(struct nlmsghdr *);
  23. extern uint8_t nfnlmsg_subtype(struct nlmsghdr *);
  24. extern uint8_t nfnlmsg_family(struct nlmsghdr *);
  25. extern uint16_t nfnlmsg_res_id(struct nlmsghdr *);
  26. extern int nfnl_send_simple(struct nl_sock *, uint8_t, uint8_t,
  27. int, uint8_t, uint16_t);
  28. extern struct nl_msg * nfnlmsg_alloc_simple(uint8_t, uint8_t, int,
  29. uint8_t, uint16_t);
  30. extern int nfnlmsg_put(struct nl_msg *, uint32_t, uint32_t,
  31. uint8_t, uint8_t, int, uint8_t, uint16_t);
  32. #ifdef __cplusplus
  33. }
  34. #endif
  35. #endif