libipulog.h 880 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #ifndef _LIBIPULOG_H
  2. #define _LIBIPULOG_H
  3. /* libipulog.h,v 1.3 2001/05/21 19:15:16 laforge Exp */
  4. #include <errno.h>
  5. #include <unistd.h>
  6. #include <fcntl.h>
  7. #include <sys/types.h>
  8. #include <sys/socket.h>
  9. #include <sys/uio.h>
  10. #include <asm/types.h>
  11. #include <linux/netlink.h>
  12. #include <net/if.h>
  13. #include <linux/netfilter_ipv4/ipt_ULOG.h>
  14. /* FIXME: glibc sucks */
  15. #ifndef MSG_TRUNC
  16. #define MSG_TRUNC 0x20
  17. #endif
  18. struct ipulog_handle;
  19. u_int32_t ipulog_group2gmask(u_int32_t group);
  20. struct ipulog_handle *ipulog_create_handle(u_int32_t gmask);
  21. void ipulog_destroy_handle(struct ipulog_handle *h);
  22. ssize_t ipulog_read(struct ipulog_handle *h,
  23. unsigned char *buf, size_t len, int timeout);
  24. ulog_packet_msg_t *ipulog_get_packet(struct ipulog_handle *h,
  25. const unsigned char *buf,
  26. size_t len);
  27. void ipulog_perror(const char *s);
  28. #endif /* _LIBULOG_H */