1
2#ifndef _NFNETLINK_LOG_H
3#define _NFNETLINK_LOG_H
4
5
6
7
8
9#include <linux/types.h>
10#include <linux/netfilter/nfnetlink.h>
11
12enum nfulnl_msg_types {
13 NFULNL_MSG_PACKET,
14 NFULNL_MSG_CONFIG,
15
16 NFULNL_MSG_MAX
17};
18
19struct nfulnl_msg_packet_hdr {
20 __be16 hw_protocol;
21 __u8 hook;
22 __u8 _pad;
23};
24
25struct nfulnl_msg_packet_hw {
26 __be16 hw_addrlen;
27 __u16 _pad;
28 __u8 hw_addr[8];
29};
30
31struct nfulnl_msg_packet_timestamp {
32 __aligned_be64 sec;
33 __aligned_be64 usec;
34};
35
36enum nfulnl_attr_type {
37 NFULA_UNSPEC,
38 NFULA_PACKET_HDR,
39 NFULA_MARK,
40 NFULA_TIMESTAMP,
41 NFULA_IFINDEX_INDEV,
42 NFULA_IFINDEX_OUTDEV,
43 NFULA_IFINDEX_PHYSINDEV,
44 NFULA_IFINDEX_PHYSOUTDEV,
45 NFULA_HWADDR,
46 NFULA_PAYLOAD,
47 NFULA_PREFIX,
48 NFULA_UID,
49 NFULA_SEQ,
50 NFULA_SEQ_GLOBAL,
51 NFULA_GID,
52 NFULA_HWTYPE,
53 NFULA_HWHEADER,
54 NFULA_HWLEN,
55 NFULA_CT,
56 NFULA_CT_INFO,
57
58 __NFULA_MAX
59};
60#define NFULA_MAX (__NFULA_MAX - 1)
61
62enum nfulnl_msg_config_cmds {
63 NFULNL_CFG_CMD_NONE,
64 NFULNL_CFG_CMD_BIND,
65 NFULNL_CFG_CMD_UNBIND,
66 NFULNL_CFG_CMD_PF_BIND,
67 NFULNL_CFG_CMD_PF_UNBIND,
68};
69
70struct nfulnl_msg_config_cmd {
71 __u8 command;
72} __attribute__ ((packed));
73
74struct nfulnl_msg_config_mode {
75 __be32 copy_range;
76 __u8 copy_mode;
77 __u8 _pad;
78} __attribute__ ((packed));
79
80enum nfulnl_attr_config {
81 NFULA_CFG_UNSPEC,
82 NFULA_CFG_CMD,
83 NFULA_CFG_MODE,
84 NFULA_CFG_NLBUFSIZ,
85 NFULA_CFG_TIMEOUT,
86 NFULA_CFG_QTHRESH,
87 NFULA_CFG_FLAGS,
88 __NFULA_CFG_MAX
89};
90#define NFULA_CFG_MAX (__NFULA_CFG_MAX -1)
91
92#define NFULNL_COPY_NONE 0x00
93#define NFULNL_COPY_META 0x01
94#define NFULNL_COPY_PACKET 0x02
95
96
97#define NFULNL_CFG_F_SEQ 0x0001
98#define NFULNL_CFG_F_SEQ_GLOBAL 0x0002
99#define NFULNL_CFG_F_CONNTRACK 0x0004
100
101#endif
102