]> bbs.cooldavid.org Git - net-next-2.6.git/blame - include/linux/netfilter/nfnetlink_log.h
Merge branch 'master' of /repos/git/net-next-2.6
[net-next-2.6.git] / include / linux / netfilter / nfnetlink_log.h
CommitLineData
0597f268
HW
1#ifndef _NFNETLINK_LOG_H
2#define _NFNETLINK_LOG_H
3
4/* This file describes the netlink messages (i.e. 'protocol packets'),
5 * and not any kind of function definitions. It is shared between kernel and
6 * userspace. Don't put kernel specific stuff in here */
7
0ba2c6e8 8#include <linux/types.h>
0597f268
HW
9#include <linux/netfilter/nfnetlink.h>
10
11enum nfulnl_msg_types {
12 NFULNL_MSG_PACKET, /* packet from kernel to userspace */
13 NFULNL_MSG_CONFIG, /* connect to a particular queue */
14
15 NFULNL_MSG_MAX
16};
17
18struct nfulnl_msg_packet_hdr {
98a4a861 19 __be16 hw_protocol; /* hw protocol (network order) */
60c195c7
AB
20 __u8 hook; /* netfilter hook */
21 __u8 _pad;
53e26658 22};
0597f268
HW
23
24struct nfulnl_msg_packet_hw {
98a4a861 25 __be16 hw_addrlen;
60c195c7
AB
26 __u16 _pad;
27 __u8 hw_addr[8];
53e26658 28};
0597f268
HW
29
30struct nfulnl_msg_packet_timestamp {
98a4a861
AV
31 aligned_be64 sec;
32 aligned_be64 usec;
53e26658 33};
0597f268 34
0597f268
HW
35enum nfulnl_attr_type {
36 NFULA_UNSPEC,
37 NFULA_PACKET_HDR,
60c195c7 38 NFULA_MARK, /* __u32 nfmark */
0597f268 39 NFULA_TIMESTAMP, /* nfulnl_msg_packet_timestamp */
60c195c7
AB
40 NFULA_IFINDEX_INDEV, /* __u32 ifindex */
41 NFULA_IFINDEX_OUTDEV, /* __u32 ifindex */
42 NFULA_IFINDEX_PHYSINDEV, /* __u32 ifindex */
43 NFULA_IFINDEX_PHYSOUTDEV, /* __u32 ifindex */
0597f268
HW
44 NFULA_HWADDR, /* nfulnl_msg_packet_hw */
45 NFULA_PAYLOAD, /* opaque data payload */
46 NFULA_PREFIX, /* string prefix */
47 NFULA_UID, /* user id of socket */
0af5f6c1
HW
48 NFULA_SEQ, /* instance-local sequence number */
49 NFULA_SEQ_GLOBAL, /* global sequence number */
76aa1ce1 50 NFULA_GID, /* group id of socket */
72961ecf
EL
51 NFULA_HWTYPE, /* hardware type */
52 NFULA_HWHEADER, /* hardware header */
53 NFULA_HWLEN, /* hardware header length */
0597f268
HW
54
55 __NFULA_MAX
56};
57#define NFULA_MAX (__NFULA_MAX - 1)
58
59enum nfulnl_msg_config_cmds {
60 NFULNL_CFG_CMD_NONE,
61 NFULNL_CFG_CMD_BIND,
62 NFULNL_CFG_CMD_UNBIND,
63 NFULNL_CFG_CMD_PF_BIND,
64 NFULNL_CFG_CMD_PF_UNBIND,
65};
66
67struct nfulnl_msg_config_cmd {
60c195c7 68 __u8 command; /* nfulnl_msg_config_cmds */
0597f268
HW
69} __attribute__ ((packed));
70
71struct nfulnl_msg_config_mode {
98a4a861 72 __be32 copy_range;
60c195c7
AB
73 __u8 copy_mode;
74 __u8 _pad;
0597f268
HW
75} __attribute__ ((packed));
76
77enum nfulnl_attr_config {
78 NFULA_CFG_UNSPEC,
79 NFULA_CFG_CMD, /* nfulnl_msg_config_cmd */
80 NFULA_CFG_MODE, /* nfulnl_msg_config_mode */
60c195c7
AB
81 NFULA_CFG_NLBUFSIZ, /* __u32 buffer size */
82 NFULA_CFG_TIMEOUT, /* __u32 in 1/100 s */
83 NFULA_CFG_QTHRESH, /* __u32 */
84 NFULA_CFG_FLAGS, /* __u16 */
0597f268
HW
85 __NFULA_CFG_MAX
86};
87#define NFULA_CFG_MAX (__NFULA_CFG_MAX -1)
88
89#define NFULNL_COPY_NONE 0x00
90#define NFULNL_COPY_META 0x01
91#define NFULNL_COPY_PACKET 0x02
f5c5440d 92#define NFULNL_COPY_DISABLED 0x03
0597f268 93
0af5f6c1
HW
94#define NFULNL_CFG_F_SEQ 0x0001
95#define NFULNL_CFG_F_SEQ_GLOBAL 0x0002
96
0597f268 97#endif /* _NFNETLINK_LOG_H */