1/* Header file for IP tables userspace logging, Version 1.8
2 *
3 * (C) 2000-2002 by Harald Welte <laforge@gnumonks.org>
4 *
5 * Distributed under the terms of GNU GPL */
6
7#ifndef _IPT_ULOG_H
8#define _IPT_ULOG_H
9
10#ifndef NETLINK_NFLOG
11#define NETLINK_NFLOG 	5
12#endif
13
14#define ULOG_MAC_LEN	80
15#define ULOG_PREFIX_LEN	32
16
17#define ULOG_MAX_QLEN	50
18/* Why 50? Well... there is a limit imposed by the slab cache 131000
19 * bytes. So the multipart netlink-message has to be < 131000 bytes.
20 * Assuming a standard ethernet-mtu of 1500, we could define this up
21 * to 80... but even 50 seems to be big enough. */
22
23/* private data structure for each rule with a ULOG target */
24struct ipt_ulog_info {
25	unsigned int nl_group;
26	size_t copy_range;
27	size_t qthreshold;
28	char prefix[ULOG_PREFIX_LEN];
29};
30
31/* Format of the ULOG packets passed through netlink */
32typedef struct ulog_packet_msg {
33	unsigned long mark;
34	long timestamp_sec;
35	long timestamp_usec;
36	unsigned int hook;
37	char indev_name[IFNAMSIZ];
38	char outdev_name[IFNAMSIZ];
39	size_t data_len;
40	char prefix[ULOG_PREFIX_LEN];
41	unsigned char mac_len;
42	unsigned char mac[ULOG_MAC_LEN];
43	unsigned char payload[0];
44} ulog_packet_msg_t;
45
46#endif /*_IPT_ULOG_H*/
47