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