nfnetlink_log.h revision 96c1db7b9d601c31d103389cac074a6cce0d7633
1/****************************************************************************
2 ****************************************************************************
3 ***
4 ***   This header was automatically generated from a Linux kernel header
5 ***   of the same name, to make information necessary for userspace to
6 ***   call into the kernel available to libc.  It contains only constants,
7 ***   structures, and macros generated from the original header, and thus,
8 ***   contains no copyrightable information.
9 ***
10 ***   To edit the content of this header, modify the corresponding
11 ***   source file (e.g. under external/kernel-headers/original/) then
12 ***   run bionic/libc/kernel/tools/update_all.py
13 ***
14 ***   Any manual change here will be lost the next time this script will
15 ***   be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _NFNETLINK_LOG_H
20#define _NFNETLINK_LOG_H
21#include <linux/types.h>
22#include <linux/netfilter/nfnetlink.h>
23enum nfulnl_msg_types {
24  NFULNL_MSG_PACKET,
25  NFULNL_MSG_CONFIG,
26  NFULNL_MSG_MAX
27};
28struct nfulnl_msg_packet_hdr {
29  __be16 hw_protocol;
30  __u8 hook;
31  __u8 _pad;
32};
33struct nfulnl_msg_packet_hw {
34  __be16 hw_addrlen;
35  __u16 _pad;
36  __u8 hw_addr[8];
37};
38struct nfulnl_msg_packet_timestamp {
39  __aligned_be64 sec;
40  __aligned_be64 usec;
41};
42enum nfulnl_attr_type {
43  NFULA_UNSPEC,
44  NFULA_PACKET_HDR,
45  NFULA_MARK,
46  NFULA_TIMESTAMP,
47  NFULA_IFINDEX_INDEV,
48  NFULA_IFINDEX_OUTDEV,
49  NFULA_IFINDEX_PHYSINDEV,
50  NFULA_IFINDEX_PHYSOUTDEV,
51  NFULA_HWADDR,
52  NFULA_PAYLOAD,
53  NFULA_PREFIX,
54  NFULA_UID,
55  NFULA_SEQ,
56  NFULA_SEQ_GLOBAL,
57  NFULA_GID,
58  NFULA_HWTYPE,
59  NFULA_HWHEADER,
60  NFULA_HWLEN,
61  NFULA_CT,
62  NFULA_CT_INFO,
63  __NFULA_MAX
64};
65#define NFULA_MAX (__NFULA_MAX - 1)
66enum nfulnl_msg_config_cmds {
67  NFULNL_CFG_CMD_NONE,
68  NFULNL_CFG_CMD_BIND,
69  NFULNL_CFG_CMD_UNBIND,
70  NFULNL_CFG_CMD_PF_BIND,
71  NFULNL_CFG_CMD_PF_UNBIND,
72};
73struct nfulnl_msg_config_cmd {
74  __u8 command;
75} __attribute__((packed));
76struct nfulnl_msg_config_mode {
77  __be32 copy_range;
78  __u8 copy_mode;
79  __u8 _pad;
80} __attribute__((packed));
81enum nfulnl_attr_config {
82  NFULA_CFG_UNSPEC,
83  NFULA_CFG_CMD,
84  NFULA_CFG_MODE,
85  NFULA_CFG_NLBUFSIZ,
86  NFULA_CFG_TIMEOUT,
87  NFULA_CFG_QTHRESH,
88  NFULA_CFG_FLAGS,
89  __NFULA_CFG_MAX
90};
91#define NFULA_CFG_MAX (__NFULA_CFG_MAX - 1)
92#define NFULNL_COPY_NONE 0x00
93#define NFULNL_COPY_META 0x01
94#define NFULNL_COPY_PACKET 0x02
95#define NFULNL_CFG_F_SEQ 0x0001
96#define NFULNL_CFG_F_SEQ_GLOBAL 0x0002
97#define NFULNL_CFG_F_CONNTRACK 0x0004
98#endif
99