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_vlan_attr {
37 NFULA_VLAN_UNSPEC,
38 NFULA_VLAN_PROTO,
39 NFULA_VLAN_TCI,
40 __NFULA_VLAN_MAX,
41};
42
43#define NFULA_VLAN_MAX (__NFULA_VLAN_MAX + 1)
44
45enum nfulnl_attr_type {
46 NFULA_UNSPEC,
47 NFULA_PACKET_HDR,
48 NFULA_MARK,
49 NFULA_TIMESTAMP,
50 NFULA_IFINDEX_INDEV,
51 NFULA_IFINDEX_OUTDEV,
52 NFULA_IFINDEX_PHYSINDEV,
53 NFULA_IFINDEX_PHYSOUTDEV,
54 NFULA_HWADDR,
55 NFULA_PAYLOAD,
56 NFULA_PREFIX,
57 NFULA_UID,
58 NFULA_SEQ,
59 NFULA_SEQ_GLOBAL,
60 NFULA_GID,
61 NFULA_HWTYPE,
62 NFULA_HWHEADER,
63 NFULA_HWLEN,
64 NFULA_CT,
65 NFULA_CT_INFO,
66 NFULA_VLAN,
67 NFULA_L2HDR,
68
69 __NFULA_MAX
70};
71#define NFULA_MAX (__NFULA_MAX - 1)
72
73enum nfulnl_msg_config_cmds {
74 NFULNL_CFG_CMD_NONE,
75 NFULNL_CFG_CMD_BIND,
76 NFULNL_CFG_CMD_UNBIND,
77 NFULNL_CFG_CMD_PF_BIND,
78 NFULNL_CFG_CMD_PF_UNBIND,
79};
80
81struct nfulnl_msg_config_cmd {
82 __u8 command;
83} __attribute__ ((packed));
84
85struct nfulnl_msg_config_mode {
86 __be32 copy_range;
87 __u8 copy_mode;
88 __u8 _pad;
89} __attribute__ ((packed));
90
91enum nfulnl_attr_config {
92 NFULA_CFG_UNSPEC,
93 NFULA_CFG_CMD,
94 NFULA_CFG_MODE,
95 NFULA_CFG_NLBUFSIZ,
96 NFULA_CFG_TIMEOUT,
97 NFULA_CFG_QTHRESH,
98 NFULA_CFG_FLAGS,
99 __NFULA_CFG_MAX
100};
101#define NFULA_CFG_MAX (__NFULA_CFG_MAX -1)
102
103#define NFULNL_COPY_NONE 0x00
104#define NFULNL_COPY_META 0x01
105#define NFULNL_COPY_PACKET 0x02
106
107
108#define NFULNL_CFG_F_SEQ 0x0001
109#define NFULNL_CFG_F_SEQ_GLOBAL 0x0002
110#define NFULNL_CFG_F_CONNTRACK 0x0004
111
112#endif
113