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