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 _UAPI_IP6_TABLES_H 20 #define _UAPI_IP6_TABLES_H 21 #include <linux/types.h> 22 #include <linux/compiler.h> 23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 24 #include <linux/netfilter_ipv6.h> 25 #include <linux/netfilter/x_tables.h> 26 #define IP6T_FUNCTION_MAXNAMELEN XT_FUNCTION_MAXNAMELEN 27 #define IP6T_TABLE_MAXNAMELEN XT_TABLE_MAXNAMELEN 28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 29 #define ip6t_match xt_match 30 #define ip6t_target xt_target 31 #define ip6t_table xt_table 32 #define ip6t_get_revision xt_get_revision 33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 34 #define ip6t_entry_match xt_entry_match 35 #define ip6t_entry_target xt_entry_target 36 #define ip6t_standard_target xt_standard_target 37 #define ip6t_error_target xt_error_target 38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 39 #define ip6t_counters xt_counters 40 #define IP6T_CONTINUE XT_CONTINUE 41 #define IP6T_RETURN XT_RETURN 42 #include <linux/netfilter/xt_tcpudp.h> 43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 44 #define ip6t_tcp xt_tcp 45 #define ip6t_udp xt_udp 46 #define IP6T_TCP_INV_SRCPT XT_TCP_INV_SRCPT 47 #define IP6T_TCP_INV_DSTPT XT_TCP_INV_DSTPT 48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 49 #define IP6T_TCP_INV_FLAGS XT_TCP_INV_FLAGS 50 #define IP6T_TCP_INV_OPTION XT_TCP_INV_OPTION 51 #define IP6T_TCP_INV_MASK XT_TCP_INV_MASK 52 #define IP6T_UDP_INV_SRCPT XT_UDP_INV_SRCPT 53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 54 #define IP6T_UDP_INV_DSTPT XT_UDP_INV_DSTPT 55 #define IP6T_UDP_INV_MASK XT_UDP_INV_MASK 56 #define ip6t_counters_info xt_counters_info 57 #define IP6T_STANDARD_TARGET XT_STANDARD_TARGET 58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 59 #define IP6T_ERROR_TARGET XT_ERROR_TARGET 60 #define IP6T_MATCH_ITERATE(e, fn, args...) XT_MATCH_ITERATE(struct ip6t_entry, e, fn, ## args) 61 #define IP6T_ENTRY_ITERATE(entries, size, fn, args...) XT_ENTRY_ITERATE(struct ip6t_entry, entries, size, fn, ## args) 62 struct ip6t_ip6 { 63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 64 struct in6_addr src, dst; 65 struct in6_addr smsk, dmsk; 66 char iniface[IFNAMSIZ], outiface[IFNAMSIZ]; 67 unsigned char iniface_mask[IFNAMSIZ], outiface_mask[IFNAMSIZ]; 68 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 69 __u16 proto; 70 __u8 tos; 71 __u8 flags; 72 __u8 invflags; 73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 74 }; 75 #define IP6T_F_PROTO 0x01 76 #define IP6T_F_TOS 0x02 77 #define IP6T_F_GOTO 0x04 78 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 79 #define IP6T_F_MASK 0x07 80 #define IP6T_INV_VIA_IN 0x01 81 #define IP6T_INV_VIA_OUT 0x02 82 #define IP6T_INV_TOS 0x04 83 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 84 #define IP6T_INV_SRCIP 0x08 85 #define IP6T_INV_DSTIP 0x10 86 #define IP6T_INV_FRAG 0x20 87 #define IP6T_INV_PROTO XT_INV_PROTO 88 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 89 #define IP6T_INV_MASK 0x7F 90 struct ip6t_entry { 91 struct ip6t_ip6 ipv6; 92 unsigned int nfcache; 93 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 94 __u16 target_offset; 95 __u16 next_offset; 96 unsigned int comefrom; 97 struct xt_counters counters; 98 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 99 unsigned char elems[0]; 100 }; 101 struct ip6t_standard { 102 struct ip6t_entry entry; 103 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 104 struct xt_standard_target target; 105 }; 106 struct ip6t_error { 107 struct ip6t_entry entry; 108 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 109 struct xt_error_target target; 110 }; 111 #define IP6T_ENTRY_INIT(__size) { .target_offset = sizeof(struct ip6t_entry), .next_offset = (__size), } 112 #define IP6T_STANDARD_INIT(__verdict) { .entry = IP6T_ENTRY_INIT(sizeof(struct ip6t_standard)), .target = XT_TARGET_INIT(XT_STANDARD_TARGET, sizeof(struct xt_standard_target)), .target.verdict = -(__verdict) - 1, } 113 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 114 #define IP6T_ERROR_INIT { .entry = IP6T_ENTRY_INIT(sizeof(struct ip6t_error)), .target = XT_TARGET_INIT(XT_ERROR_TARGET, sizeof(struct xt_error_target)), .target.errorname = "ERROR", } 115 #define IP6T_BASE_CTL 64 116 #define IP6T_SO_SET_REPLACE (IP6T_BASE_CTL) 117 #define IP6T_SO_SET_ADD_COUNTERS (IP6T_BASE_CTL + 1) 118 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 119 #define IP6T_SO_SET_MAX IP6T_SO_SET_ADD_COUNTERS 120 #define IP6T_SO_GET_INFO (IP6T_BASE_CTL) 121 #define IP6T_SO_GET_ENTRIES (IP6T_BASE_CTL + 1) 122 #define IP6T_SO_GET_REVISION_MATCH (IP6T_BASE_CTL + 4) 123 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 124 #define IP6T_SO_GET_REVISION_TARGET (IP6T_BASE_CTL + 5) 125 #define IP6T_SO_GET_MAX IP6T_SO_GET_REVISION_TARGET 126 #define IP6T_SO_ORIGINAL_DST 80 127 struct ip6t_icmp { 128 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 129 __u8 type; 130 __u8 code[2]; 131 __u8 invflags; 132 }; 133 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 134 #define IP6T_ICMP_INV 0x01 135 struct ip6t_getinfo { 136 char name[XT_TABLE_MAXNAMELEN]; 137 unsigned int valid_hooks; 138 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 139 unsigned int hook_entry[NF_INET_NUMHOOKS]; 140 unsigned int underflow[NF_INET_NUMHOOKS]; 141 unsigned int num_entries; 142 unsigned int size; 143 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 144 }; 145 struct ip6t_replace { 146 char name[XT_TABLE_MAXNAMELEN]; 147 unsigned int valid_hooks; 148 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 149 unsigned int num_entries; 150 unsigned int size; 151 unsigned int hook_entry[NF_INET_NUMHOOKS]; 152 unsigned int underflow[NF_INET_NUMHOOKS]; 153 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 154 unsigned int num_counters; 155 struct xt_counters __user *counters; 156 struct ip6t_entry entries[0]; 157 }; 158 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 159 struct ip6t_get_entries { 160 char name[XT_TABLE_MAXNAMELEN]; 161 unsigned int size; 162 struct ip6t_entry entrytable[0]; 163 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 164 }; 165 static __inline__ struct xt_entry_target * 166 ip6t_get_target(struct ip6t_entry *e) 167 { 168 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 169 return (void *)e + e->target_offset; 170 } 171 #endif 172