diff options
| author | David Howells <dhowells@redhat.com> | 2012-10-09 04:49:01 -0400 |
|---|---|---|
| committer | David Howells <dhowells@redhat.com> | 2012-10-09 04:49:01 -0400 |
| commit | ff1e1756c974fc1cb68b6e74cd123ad59cf07a2d (patch) | |
| tree | ff8d33e76c8e2e9dbbd8cf578f71ca7b50f7fc2e /include/uapi/linux | |
| parent | 17c075923da59c217155d0758ee0715641ebc152 (diff) | |
UAPI: (Scripted) Disintegrate include/linux/netfilter_ipv6
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Michael Kerrisk <mtk.manpages@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Dave Jones <davej@redhat.com>
Diffstat (limited to 'include/uapi/linux')
| -rw-r--r-- | include/uapi/linux/netfilter_ipv6/Kbuild | 12 | ||||
| -rw-r--r-- | include/uapi/linux/netfilter_ipv6/ip6_tables.h | 267 | ||||
| -rw-r--r-- | include/uapi/linux/netfilter_ipv6/ip6t_HL.h | 24 | ||||
| -rw-r--r-- | include/uapi/linux/netfilter_ipv6/ip6t_LOG.h | 21 | ||||
| -rw-r--r-- | include/uapi/linux/netfilter_ipv6/ip6t_NPT.h | 16 | ||||
| -rw-r--r-- | include/uapi/linux/netfilter_ipv6/ip6t_REJECT.h | 20 | ||||
| -rw-r--r-- | include/uapi/linux/netfilter_ipv6/ip6t_ah.h | 22 | ||||
| -rw-r--r-- | include/uapi/linux/netfilter_ipv6/ip6t_frag.h | 25 | ||||
| -rw-r--r-- | include/uapi/linux/netfilter_ipv6/ip6t_hl.h | 24 | ||||
| -rw-r--r-- | include/uapi/linux/netfilter_ipv6/ip6t_ipv6header.h | 28 | ||||
| -rw-r--r-- | include/uapi/linux/netfilter_ipv6/ip6t_mh.h | 16 | ||||
| -rw-r--r-- | include/uapi/linux/netfilter_ipv6/ip6t_opts.h | 24 | ||||
| -rw-r--r-- | include/uapi/linux/netfilter_ipv6/ip6t_rt.h | 33 |
13 files changed, 532 insertions, 0 deletions
diff --git a/include/uapi/linux/netfilter_ipv6/Kbuild b/include/uapi/linux/netfilter_ipv6/Kbuild index aafaa5aa54d4..75a668ca2353 100644 --- a/include/uapi/linux/netfilter_ipv6/Kbuild +++ b/include/uapi/linux/netfilter_ipv6/Kbuild | |||
| @@ -1 +1,13 @@ | |||
| 1 | # UAPI Header export list | 1 | # UAPI Header export list |
| 2 | header-y += ip6_tables.h | ||
| 3 | header-y += ip6t_HL.h | ||
| 4 | header-y += ip6t_LOG.h | ||
| 5 | header-y += ip6t_NPT.h | ||
| 6 | header-y += ip6t_REJECT.h | ||
| 7 | header-y += ip6t_ah.h | ||
| 8 | header-y += ip6t_frag.h | ||
| 9 | header-y += ip6t_hl.h | ||
| 10 | header-y += ip6t_ipv6header.h | ||
| 11 | header-y += ip6t_mh.h | ||
| 12 | header-y += ip6t_opts.h | ||
| 13 | header-y += ip6t_rt.h | ||
diff --git a/include/uapi/linux/netfilter_ipv6/ip6_tables.h b/include/uapi/linux/netfilter_ipv6/ip6_tables.h new file mode 100644 index 000000000000..bf1ef65cc582 --- /dev/null +++ b/include/uapi/linux/netfilter_ipv6/ip6_tables.h | |||
| @@ -0,0 +1,267 @@ | |||
| 1 | /* | ||
| 2 | * 25-Jul-1998 Major changes to allow for ip chain table | ||
| 3 | * | ||
| 4 | * 3-Jan-2000 Named tables to allow packet selection for different uses. | ||
| 5 | */ | ||
| 6 | |||
| 7 | /* | ||
| 8 | * Format of an IP6 firewall descriptor | ||
| 9 | * | ||
| 10 | * src, dst, src_mask, dst_mask are always stored in network byte order. | ||
| 11 | * flags are stored in host byte order (of course). | ||
| 12 | * Port numbers are stored in HOST byte order. | ||
| 13 | */ | ||
| 14 | |||
| 15 | #ifndef _UAPI_IP6_TABLES_H | ||
| 16 | #define _UAPI_IP6_TABLES_H | ||
| 17 | |||
| 18 | #include <linux/types.h> | ||
| 19 | #include <linux/compiler.h> | ||
| 20 | #include <linux/netfilter_ipv6.h> | ||
| 21 | |||
| 22 | #include <linux/netfilter/x_tables.h> | ||
| 23 | |||
| 24 | #ifndef __KERNEL__ | ||
| 25 | #define IP6T_FUNCTION_MAXNAMELEN XT_FUNCTION_MAXNAMELEN | ||
| 26 | #define IP6T_TABLE_MAXNAMELEN XT_TABLE_MAXNAMELEN | ||
| 27 | #define ip6t_match xt_match | ||
| 28 | #define ip6t_target xt_target | ||
| 29 | #define ip6t_table xt_table | ||
| 30 | #define ip6t_get_revision xt_get_revision | ||
| 31 | #define ip6t_entry_match xt_entry_match | ||
| 32 | #define ip6t_entry_target xt_entry_target | ||
| 33 | #define ip6t_standard_target xt_standard_target | ||
| 34 | #define ip6t_error_target xt_error_target | ||
| 35 | #define ip6t_counters xt_counters | ||
| 36 | #define IP6T_CONTINUE XT_CONTINUE | ||
| 37 | #define IP6T_RETURN XT_RETURN | ||
| 38 | |||
| 39 | /* Pre-iptables-1.4.0 */ | ||
| 40 | #include <linux/netfilter/xt_tcpudp.h> | ||
| 41 | #define ip6t_tcp xt_tcp | ||
| 42 | #define ip6t_udp xt_udp | ||
| 43 | #define IP6T_TCP_INV_SRCPT XT_TCP_INV_SRCPT | ||
| 44 | #define IP6T_TCP_INV_DSTPT XT_TCP_INV_DSTPT | ||
| 45 | #define IP6T_TCP_INV_FLAGS XT_TCP_INV_FLAGS | ||
| 46 | #define IP6T_TCP_INV_OPTION XT_TCP_INV_OPTION | ||
| 47 | #define IP6T_TCP_INV_MASK XT_TCP_INV_MASK | ||
| 48 | #define IP6T_UDP_INV_SRCPT XT_UDP_INV_SRCPT | ||
| 49 | #define IP6T_UDP_INV_DSTPT XT_UDP_INV_DSTPT | ||
| 50 | #define IP6T_UDP_INV_MASK XT_UDP_INV_MASK | ||
| 51 | |||
| 52 | #define ip6t_counters_info xt_counters_info | ||
| 53 | #define IP6T_STANDARD_TARGET XT_STANDARD_TARGET | ||
| 54 | #define IP6T_ERROR_TARGET XT_ERROR_TARGET | ||
| 55 | #define IP6T_MATCH_ITERATE(e, fn, args...) \ | ||
| 56 | XT_MATCH_ITERATE(struct ip6t_entry, e, fn, ## args) | ||
| 57 | #define IP6T_ENTRY_ITERATE(entries, size, fn, args...) \ | ||
| 58 | XT_ENTRY_ITERATE(struct ip6t_entry, entries, size, fn, ## args) | ||
| 59 | #endif | ||
| 60 | |||
| 61 | /* Yes, Virginia, you have to zero the padding. */ | ||
| 62 | struct ip6t_ip6 { | ||
| 63 | /* Source and destination IP6 addr */ | ||
| 64 | struct in6_addr src, dst; | ||
| 65 | /* Mask for src and dest IP6 addr */ | ||
| 66 | struct in6_addr smsk, dmsk; | ||
| 67 | char iniface[IFNAMSIZ], outiface[IFNAMSIZ]; | ||
| 68 | unsigned char iniface_mask[IFNAMSIZ], outiface_mask[IFNAMSIZ]; | ||
| 69 | |||
| 70 | /* Upper protocol number | ||
| 71 | * - The allowed value is 0 (any) or protocol number of last parsable | ||
| 72 | * header, which is 50 (ESP), 59 (No Next Header), 135 (MH), or | ||
| 73 | * the non IPv6 extension headers. | ||
| 74 | * - The protocol numbers of IPv6 extension headers except of ESP and | ||
| 75 | * MH do not match any packets. | ||
| 76 | * - You also need to set IP6T_FLAGS_PROTO to "flags" to check protocol. | ||
| 77 | */ | ||
| 78 | __u16 proto; | ||
| 79 | /* TOS to match iff flags & IP6T_F_TOS */ | ||
| 80 | __u8 tos; | ||
| 81 | |||
| 82 | /* Flags word */ | ||
| 83 | __u8 flags; | ||
| 84 | /* Inverse flags */ | ||
| 85 | __u8 invflags; | ||
| 86 | }; | ||
| 87 | |||
| 88 | /* Values for "flag" field in struct ip6t_ip6 (general ip6 structure). */ | ||
| 89 | #define IP6T_F_PROTO 0x01 /* Set if rule cares about upper | ||
| 90 | protocols */ | ||
| 91 | #define IP6T_F_TOS 0x02 /* Match the TOS. */ | ||
| 92 | #define IP6T_F_GOTO 0x04 /* Set if jump is a goto */ | ||
| 93 | #define IP6T_F_MASK 0x07 /* All possible flag bits mask. */ | ||
| 94 | |||
| 95 | /* Values for "inv" field in struct ip6t_ip6. */ | ||
| 96 | #define IP6T_INV_VIA_IN 0x01 /* Invert the sense of IN IFACE. */ | ||
| 97 | #define IP6T_INV_VIA_OUT 0x02 /* Invert the sense of OUT IFACE */ | ||
| 98 | #define IP6T_INV_TOS 0x04 /* Invert the sense of TOS. */ | ||
| 99 | #define IP6T_INV_SRCIP 0x08 /* Invert the sense of SRC IP. */ | ||
| 100 | #define IP6T_INV_DSTIP 0x10 /* Invert the sense of DST OP. */ | ||
| 101 | #define IP6T_INV_FRAG 0x20 /* Invert the sense of FRAG. */ | ||
| 102 | #define IP6T_INV_PROTO XT_INV_PROTO | ||
| 103 | #define IP6T_INV_MASK 0x7F /* All possible flag bits mask. */ | ||
| 104 | |||
| 105 | /* This structure defines each of the firewall rules. Consists of 3 | ||
| 106 | parts which are 1) general IP header stuff 2) match specific | ||
| 107 | stuff 3) the target to perform if the rule matches */ | ||
| 108 | struct ip6t_entry { | ||
| 109 | struct ip6t_ip6 ipv6; | ||
| 110 | |||
| 111 | /* Mark with fields that we care about. */ | ||
| 112 | unsigned int nfcache; | ||
| 113 | |||
| 114 | /* Size of ipt_entry + matches */ | ||
| 115 | __u16 target_offset; | ||
| 116 | /* Size of ipt_entry + matches + target */ | ||
| 117 | __u16 next_offset; | ||
| 118 | |||
| 119 | /* Back pointer */ | ||
| 120 | unsigned int comefrom; | ||
| 121 | |||
| 122 | /* Packet and byte counters. */ | ||
| 123 | struct xt_counters counters; | ||
| 124 | |||
| 125 | /* The matches (if any), then the target. */ | ||
| 126 | unsigned char elems[0]; | ||
| 127 | }; | ||
| 128 | |||
| 129 | /* Standard entry */ | ||
| 130 | struct ip6t_standard { | ||
| 131 | struct ip6t_entry entry; | ||
| 132 | struct xt_standard_target target; | ||
| 133 | }; | ||
| 134 | |||
| 135 | struct ip6t_error { | ||
| 136 | struct ip6t_entry entry; | ||
| 137 | struct xt_error_target target; | ||
| 138 | }; | ||
| 139 | |||
| 140 | #define IP6T_ENTRY_INIT(__size) \ | ||
| 141 | { \ | ||
| 142 | .target_offset = sizeof(struct ip6t_entry), \ | ||
| 143 | .next_offset = (__size), \ | ||
| 144 | } | ||
| 145 | |||
| 146 | #define IP6T_STANDARD_INIT(__verdict) \ | ||
| 147 | { \ | ||
| 148 | .entry = IP6T_ENTRY_INIT(sizeof(struct ip6t_standard)), \ | ||
| 149 | .target = XT_TARGET_INIT(XT_STANDARD_TARGET, \ | ||
| 150 | sizeof(struct xt_standard_target)), \ | ||
| 151 | .target.verdict = -(__verdict) - 1, \ | ||
| 152 | } | ||
| 153 | |||
| 154 | #define IP6T_ERROR_INIT \ | ||
| 155 | { \ | ||
| 156 | .entry = IP6T_ENTRY_INIT(sizeof(struct ip6t_error)), \ | ||
| 157 | .target = XT_TARGET_INIT(XT_ERROR_TARGET, \ | ||
| 158 | sizeof(struct xt_error_target)), \ | ||
| 159 | .target.errorname = "ERROR", \ | ||
| 160 | } | ||
| 161 | |||
| 162 | /* | ||
| 163 | * New IP firewall options for [gs]etsockopt at the RAW IP level. | ||
| 164 | * Unlike BSD Linux inherits IP options so you don't have to use | ||
| 165 | * a raw socket for this. Instead we check rights in the calls. | ||
| 166 | * | ||
| 167 | * ATTENTION: check linux/in6.h before adding new number here. | ||
| 168 | */ | ||
| 169 | #define IP6T_BASE_CTL 64 | ||
| 170 | |||
| 171 | #define IP6T_SO_SET_REPLACE (IP6T_BASE_CTL) | ||
| 172 | #define IP6T_SO_SET_ADD_COUNTERS (IP6T_BASE_CTL + 1) | ||
| 173 | #define IP6T_SO_SET_MAX IP6T_SO_SET_ADD_COUNTERS | ||
| 174 | |||
| 175 | #define IP6T_SO_GET_INFO (IP6T_BASE_CTL) | ||
| 176 | #define IP6T_SO_GET_ENTRIES (IP6T_BASE_CTL + 1) | ||
| 177 | #define IP6T_SO_GET_REVISION_MATCH (IP6T_BASE_CTL + 4) | ||
| 178 | #define IP6T_SO_GET_REVISION_TARGET (IP6T_BASE_CTL + 5) | ||
| 179 | #define IP6T_SO_GET_MAX IP6T_SO_GET_REVISION_TARGET | ||
| 180 | |||
| 181 | /* ICMP matching stuff */ | ||
| 182 | struct ip6t_icmp { | ||
| 183 | __u8 type; /* type to match */ | ||
| 184 | __u8 code[2]; /* range of code */ | ||
| 185 | __u8 invflags; /* Inverse flags */ | ||
| 186 | }; | ||
| 187 | |||
| 188 | /* Values for "inv" field for struct ipt_icmp. */ | ||
| 189 | #define IP6T_ICMP_INV 0x01 /* Invert the sense of type/code test */ | ||
| 190 | |||
| 191 | /* The argument to IP6T_SO_GET_INFO */ | ||
| 192 | struct ip6t_getinfo { | ||
| 193 | /* Which table: caller fills this in. */ | ||
| 194 | char name[XT_TABLE_MAXNAMELEN]; | ||
| 195 | |||
| 196 | /* Kernel fills these in. */ | ||
| 197 | /* Which hook entry points are valid: bitmask */ | ||
| 198 | unsigned int valid_hooks; | ||
| 199 | |||
| 200 | /* Hook entry points: one per netfilter hook. */ | ||
| 201 | unsigned int hook_entry[NF_INET_NUMHOOKS]; | ||
| 202 | |||
| 203 | /* Underflow points. */ | ||
| 204 | unsigned int underflow[NF_INET_NUMHOOKS]; | ||
| 205 | |||
| 206 | /* Number of entries */ | ||
| 207 | unsigned int num_entries; | ||
| 208 | |||
| 209 | /* Size of entries. */ | ||
| 210 | unsigned int size; | ||
| 211 | }; | ||
| 212 | |||
| 213 | /* The argument to IP6T_SO_SET_REPLACE. */ | ||
| 214 | struct ip6t_replace { | ||
| 215 | /* Which table. */ | ||
| 216 | char name[XT_TABLE_MAXNAMELEN]; | ||
| 217 | |||
| 218 | /* Which hook entry points are valid: bitmask. You can't | ||
| 219 | change this. */ | ||
| 220 | unsigned int valid_hooks; | ||
| 221 | |||
| 222 | /* Number of entries */ | ||
| 223 | unsigned int num_entries; | ||
| 224 | |||
| 225 | /* Total size of new entries */ | ||
| 226 | unsigned int size; | ||
| 227 | |||
| 228 | /* Hook entry points. */ | ||
| 229 | unsigned int hook_entry[NF_INET_NUMHOOKS]; | ||
| 230 | |||
| 231 | /* Underflow points. */ | ||
| 232 | unsigned int underflow[NF_INET_NUMHOOKS]; | ||
| 233 | |||
| 234 | /* Information about old entries: */ | ||
| 235 | /* Number of counters (must be equal to current number of entries). */ | ||
| 236 | unsigned int num_counters; | ||
| 237 | /* The old entries' counters. */ | ||
| 238 | struct xt_counters __user *counters; | ||
| 239 | |||
| 240 | /* The entries (hang off end: not really an array). */ | ||
| 241 | struct ip6t_entry entries[0]; | ||
| 242 | }; | ||
| 243 | |||
| 244 | /* The argument to IP6T_SO_GET_ENTRIES. */ | ||
| 245 | struct ip6t_get_entries { | ||
| 246 | /* Which table: user fills this in. */ | ||
| 247 | char name[XT_TABLE_MAXNAMELEN]; | ||
| 248 | |||
| 249 | /* User fills this in: total entry size. */ | ||
| 250 | unsigned int size; | ||
| 251 | |||
| 252 | /* The entries. */ | ||
| 253 | struct ip6t_entry entrytable[0]; | ||
| 254 | }; | ||
| 255 | |||
| 256 | /* Helper functions */ | ||
| 257 | static __inline__ struct xt_entry_target * | ||
| 258 | ip6t_get_target(struct ip6t_entry *e) | ||
| 259 | { | ||
| 260 | return (void *)e + e->target_offset; | ||
| 261 | } | ||
| 262 | |||
| 263 | /* | ||
| 264 | * Main firewall chains definitions and global var's definitions. | ||
| 265 | */ | ||
| 266 | |||
| 267 | #endif /* _UAPI_IP6_TABLES_H */ | ||
diff --git a/include/uapi/linux/netfilter_ipv6/ip6t_HL.h b/include/uapi/linux/netfilter_ipv6/ip6t_HL.h new file mode 100644 index 000000000000..ebd8ead1bb63 --- /dev/null +++ b/include/uapi/linux/netfilter_ipv6/ip6t_HL.h | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | /* Hop Limit modification module for ip6tables | ||
| 2 | * Maciej Soltysiak <solt@dns.toxicfilms.tv> | ||
| 3 | * Based on HW's TTL module */ | ||
| 4 | |||
| 5 | #ifndef _IP6T_HL_H | ||
| 6 | #define _IP6T_HL_H | ||
| 7 | |||
| 8 | #include <linux/types.h> | ||
| 9 | |||
| 10 | enum { | ||
| 11 | IP6T_HL_SET = 0, | ||
| 12 | IP6T_HL_INC, | ||
| 13 | IP6T_HL_DEC | ||
| 14 | }; | ||
| 15 | |||
| 16 | #define IP6T_HL_MAXMODE IP6T_HL_DEC | ||
| 17 | |||
| 18 | struct ip6t_HL_info { | ||
| 19 | __u8 mode; | ||
| 20 | __u8 hop_limit; | ||
| 21 | }; | ||
| 22 | |||
| 23 | |||
| 24 | #endif | ||
diff --git a/include/uapi/linux/netfilter_ipv6/ip6t_LOG.h b/include/uapi/linux/netfilter_ipv6/ip6t_LOG.h new file mode 100644 index 000000000000..3dd0bc4e0735 --- /dev/null +++ b/include/uapi/linux/netfilter_ipv6/ip6t_LOG.h | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | #ifndef _IP6T_LOG_H | ||
| 2 | #define _IP6T_LOG_H | ||
| 3 | |||
| 4 | #warning "Please update iptables, this file will be removed soon!" | ||
| 5 | |||
| 6 | /* make sure not to change this without changing netfilter.h:NF_LOG_* (!) */ | ||
| 7 | #define IP6T_LOG_TCPSEQ 0x01 /* Log TCP sequence numbers */ | ||
| 8 | #define IP6T_LOG_TCPOPT 0x02 /* Log TCP options */ | ||
| 9 | #define IP6T_LOG_IPOPT 0x04 /* Log IP options */ | ||
| 10 | #define IP6T_LOG_UID 0x08 /* Log UID owning local socket */ | ||
| 11 | #define IP6T_LOG_NFLOG 0x10 /* Unsupported, don't use */ | ||
| 12 | #define IP6T_LOG_MACDECODE 0x20 /* Decode MAC header */ | ||
| 13 | #define IP6T_LOG_MASK 0x2f | ||
| 14 | |||
| 15 | struct ip6t_log_info { | ||
| 16 | unsigned char level; | ||
| 17 | unsigned char logflags; | ||
| 18 | char prefix[30]; | ||
| 19 | }; | ||
| 20 | |||
| 21 | #endif /*_IPT_LOG_H*/ | ||
diff --git a/include/uapi/linux/netfilter_ipv6/ip6t_NPT.h b/include/uapi/linux/netfilter_ipv6/ip6t_NPT.h new file mode 100644 index 000000000000..f763355481b5 --- /dev/null +++ b/include/uapi/linux/netfilter_ipv6/ip6t_NPT.h | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | #ifndef __NETFILTER_IP6T_NPT | ||
| 2 | #define __NETFILTER_IP6T_NPT | ||
| 3 | |||
| 4 | #include <linux/types.h> | ||
| 5 | #include <linux/netfilter.h> | ||
| 6 | |||
| 7 | struct ip6t_npt_tginfo { | ||
| 8 | union nf_inet_addr src_pfx; | ||
| 9 | union nf_inet_addr dst_pfx; | ||
| 10 | __u8 src_pfx_len; | ||
| 11 | __u8 dst_pfx_len; | ||
| 12 | /* Used internally by the kernel */ | ||
| 13 | __sum16 adjustment; | ||
| 14 | }; | ||
| 15 | |||
| 16 | #endif /* __NETFILTER_IP6T_NPT */ | ||
diff --git a/include/uapi/linux/netfilter_ipv6/ip6t_REJECT.h b/include/uapi/linux/netfilter_ipv6/ip6t_REJECT.h new file mode 100644 index 000000000000..205ed62e4605 --- /dev/null +++ b/include/uapi/linux/netfilter_ipv6/ip6t_REJECT.h | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | #ifndef _IP6T_REJECT_H | ||
| 2 | #define _IP6T_REJECT_H | ||
| 3 | |||
| 4 | #include <linux/types.h> | ||
| 5 | |||
| 6 | enum ip6t_reject_with { | ||
| 7 | IP6T_ICMP6_NO_ROUTE, | ||
| 8 | IP6T_ICMP6_ADM_PROHIBITED, | ||
| 9 | IP6T_ICMP6_NOT_NEIGHBOUR, | ||
| 10 | IP6T_ICMP6_ADDR_UNREACH, | ||
| 11 | IP6T_ICMP6_PORT_UNREACH, | ||
| 12 | IP6T_ICMP6_ECHOREPLY, | ||
| 13 | IP6T_TCP_RESET | ||
| 14 | }; | ||
| 15 | |||
| 16 | struct ip6t_reject_info { | ||
| 17 | __u32 with; /* reject type */ | ||
| 18 | }; | ||
| 19 | |||
| 20 | #endif /*_IP6T_REJECT_H*/ | ||
diff --git a/include/uapi/linux/netfilter_ipv6/ip6t_ah.h b/include/uapi/linux/netfilter_ipv6/ip6t_ah.h new file mode 100644 index 000000000000..5da2b65cb3ad --- /dev/null +++ b/include/uapi/linux/netfilter_ipv6/ip6t_ah.h | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | #ifndef _IP6T_AH_H | ||
| 2 | #define _IP6T_AH_H | ||
| 3 | |||
| 4 | #include <linux/types.h> | ||
| 5 | |||
| 6 | struct ip6t_ah { | ||
| 7 | __u32 spis[2]; /* Security Parameter Index */ | ||
| 8 | __u32 hdrlen; /* Header Length */ | ||
| 9 | __u8 hdrres; /* Test of the Reserved Filed */ | ||
| 10 | __u8 invflags; /* Inverse flags */ | ||
| 11 | }; | ||
| 12 | |||
| 13 | #define IP6T_AH_SPI 0x01 | ||
| 14 | #define IP6T_AH_LEN 0x02 | ||
| 15 | #define IP6T_AH_RES 0x04 | ||
| 16 | |||
| 17 | /* Values for "invflags" field in struct ip6t_ah. */ | ||
| 18 | #define IP6T_AH_INV_SPI 0x01 /* Invert the sense of spi. */ | ||
| 19 | #define IP6T_AH_INV_LEN 0x02 /* Invert the sense of length. */ | ||
| 20 | #define IP6T_AH_INV_MASK 0x03 /* All possible flags. */ | ||
| 21 | |||
| 22 | #endif /*_IP6T_AH_H*/ | ||
diff --git a/include/uapi/linux/netfilter_ipv6/ip6t_frag.h b/include/uapi/linux/netfilter_ipv6/ip6t_frag.h new file mode 100644 index 000000000000..b47f61b9e082 --- /dev/null +++ b/include/uapi/linux/netfilter_ipv6/ip6t_frag.h | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | #ifndef _IP6T_FRAG_H | ||
| 2 | #define _IP6T_FRAG_H | ||
| 3 | |||
| 4 | #include <linux/types.h> | ||
| 5 | |||
| 6 | struct ip6t_frag { | ||
| 7 | __u32 ids[2]; /* Security Parameter Index */ | ||
| 8 | __u32 hdrlen; /* Header Length */ | ||
| 9 | __u8 flags; /* */ | ||
| 10 | __u8 invflags; /* Inverse flags */ | ||
| 11 | }; | ||
| 12 | |||
| 13 | #define IP6T_FRAG_IDS 0x01 | ||
| 14 | #define IP6T_FRAG_LEN 0x02 | ||
| 15 | #define IP6T_FRAG_RES 0x04 | ||
| 16 | #define IP6T_FRAG_FST 0x08 | ||
| 17 | #define IP6T_FRAG_MF 0x10 | ||
| 18 | #define IP6T_FRAG_NMF 0x20 | ||
| 19 | |||
| 20 | /* Values for "invflags" field in struct ip6t_frag. */ | ||
| 21 | #define IP6T_FRAG_INV_IDS 0x01 /* Invert the sense of ids. */ | ||
| 22 | #define IP6T_FRAG_INV_LEN 0x02 /* Invert the sense of length. */ | ||
| 23 | #define IP6T_FRAG_INV_MASK 0x03 /* All possible flags. */ | ||
| 24 | |||
| 25 | #endif /*_IP6T_FRAG_H*/ | ||
diff --git a/include/uapi/linux/netfilter_ipv6/ip6t_hl.h b/include/uapi/linux/netfilter_ipv6/ip6t_hl.h new file mode 100644 index 000000000000..6e76dbc6c19a --- /dev/null +++ b/include/uapi/linux/netfilter_ipv6/ip6t_hl.h | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | /* ip6tables module for matching the Hop Limit value | ||
| 2 | * Maciej Soltysiak <solt@dns.toxicfilms.tv> | ||
| 3 | * Based on HW's ttl module */ | ||
| 4 | |||
| 5 | #ifndef _IP6T_HL_H | ||
| 6 | #define _IP6T_HL_H | ||
| 7 | |||
| 8 | #include <linux/types.h> | ||
| 9 | |||
| 10 | enum { | ||
| 11 | IP6T_HL_EQ = 0, /* equals */ | ||
| 12 | IP6T_HL_NE, /* not equals */ | ||
| 13 | IP6T_HL_LT, /* less than */ | ||
| 14 | IP6T_HL_GT, /* greater than */ | ||
| 15 | }; | ||
| 16 | |||
| 17 | |||
| 18 | struct ip6t_hl_info { | ||
| 19 | __u8 mode; | ||
| 20 | __u8 hop_limit; | ||
| 21 | }; | ||
| 22 | |||
| 23 | |||
| 24 | #endif | ||
diff --git a/include/uapi/linux/netfilter_ipv6/ip6t_ipv6header.h b/include/uapi/linux/netfilter_ipv6/ip6t_ipv6header.h new file mode 100644 index 000000000000..efae3a20c214 --- /dev/null +++ b/include/uapi/linux/netfilter_ipv6/ip6t_ipv6header.h | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | /* ipv6header match - matches IPv6 packets based | ||
| 2 | on whether they contain certain headers */ | ||
| 3 | |||
| 4 | /* Original idea: Brad Chapman | ||
| 5 | * Rewritten by: Andras Kis-Szabo <kisza@sch.bme.hu> */ | ||
| 6 | |||
| 7 | |||
| 8 | #ifndef __IPV6HEADER_H | ||
| 9 | #define __IPV6HEADER_H | ||
| 10 | |||
| 11 | #include <linux/types.h> | ||
| 12 | |||
| 13 | struct ip6t_ipv6header_info { | ||
| 14 | __u8 matchflags; | ||
| 15 | __u8 invflags; | ||
| 16 | __u8 modeflag; | ||
| 17 | }; | ||
| 18 | |||
| 19 | #define MASK_HOPOPTS 128 | ||
| 20 | #define MASK_DSTOPTS 64 | ||
| 21 | #define MASK_ROUTING 32 | ||
| 22 | #define MASK_FRAGMENT 16 | ||
| 23 | #define MASK_AH 8 | ||
| 24 | #define MASK_ESP 4 | ||
| 25 | #define MASK_NONE 2 | ||
| 26 | #define MASK_PROTO 1 | ||
| 27 | |||
| 28 | #endif /* __IPV6HEADER_H */ | ||
diff --git a/include/uapi/linux/netfilter_ipv6/ip6t_mh.h b/include/uapi/linux/netfilter_ipv6/ip6t_mh.h new file mode 100644 index 000000000000..a7729a5025cd --- /dev/null +++ b/include/uapi/linux/netfilter_ipv6/ip6t_mh.h | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | #ifndef _IP6T_MH_H | ||
| 2 | #define _IP6T_MH_H | ||
| 3 | |||
| 4 | #include <linux/types.h> | ||
| 5 | |||
| 6 | /* MH matching stuff */ | ||
| 7 | struct ip6t_mh { | ||
| 8 | __u8 types[2]; /* MH type range */ | ||
| 9 | __u8 invflags; /* Inverse flags */ | ||
| 10 | }; | ||
| 11 | |||
| 12 | /* Values for "invflags" field in struct ip6t_mh. */ | ||
| 13 | #define IP6T_MH_INV_TYPE 0x01 /* Invert the sense of type. */ | ||
| 14 | #define IP6T_MH_INV_MASK 0x01 /* All possible flags. */ | ||
| 15 | |||
| 16 | #endif /*_IP6T_MH_H*/ | ||
diff --git a/include/uapi/linux/netfilter_ipv6/ip6t_opts.h b/include/uapi/linux/netfilter_ipv6/ip6t_opts.h new file mode 100644 index 000000000000..17d419a811fd --- /dev/null +++ b/include/uapi/linux/netfilter_ipv6/ip6t_opts.h | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | #ifndef _IP6T_OPTS_H | ||
| 2 | #define _IP6T_OPTS_H | ||
| 3 | |||
| 4 | #include <linux/types.h> | ||
| 5 | |||
| 6 | #define IP6T_OPTS_OPTSNR 16 | ||
| 7 | |||
| 8 | struct ip6t_opts { | ||
| 9 | __u32 hdrlen; /* Header Length */ | ||
| 10 | __u8 flags; /* */ | ||
| 11 | __u8 invflags; /* Inverse flags */ | ||
| 12 | __u16 opts[IP6T_OPTS_OPTSNR]; /* opts */ | ||
| 13 | __u8 optsnr; /* Nr of OPts */ | ||
| 14 | }; | ||
| 15 | |||
| 16 | #define IP6T_OPTS_LEN 0x01 | ||
| 17 | #define IP6T_OPTS_OPTS 0x02 | ||
| 18 | #define IP6T_OPTS_NSTRICT 0x04 | ||
| 19 | |||
| 20 | /* Values for "invflags" field in struct ip6t_rt. */ | ||
| 21 | #define IP6T_OPTS_INV_LEN 0x01 /* Invert the sense of length. */ | ||
| 22 | #define IP6T_OPTS_INV_MASK 0x01 /* All possible flags. */ | ||
| 23 | |||
| 24 | #endif /*_IP6T_OPTS_H*/ | ||
diff --git a/include/uapi/linux/netfilter_ipv6/ip6t_rt.h b/include/uapi/linux/netfilter_ipv6/ip6t_rt.h new file mode 100644 index 000000000000..7605a5ff81cd --- /dev/null +++ b/include/uapi/linux/netfilter_ipv6/ip6t_rt.h | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | #ifndef _IP6T_RT_H | ||
| 2 | #define _IP6T_RT_H | ||
| 3 | |||
| 4 | #include <linux/types.h> | ||
| 5 | /*#include <linux/in6.h>*/ | ||
| 6 | |||
| 7 | #define IP6T_RT_HOPS 16 | ||
| 8 | |||
| 9 | struct ip6t_rt { | ||
| 10 | __u32 rt_type; /* Routing Type */ | ||
| 11 | __u32 segsleft[2]; /* Segments Left */ | ||
| 12 | __u32 hdrlen; /* Header Length */ | ||
| 13 | __u8 flags; /* */ | ||
| 14 | __u8 invflags; /* Inverse flags */ | ||
| 15 | struct in6_addr addrs[IP6T_RT_HOPS]; /* Hops */ | ||
| 16 | __u8 addrnr; /* Nr of Addresses */ | ||
| 17 | }; | ||
| 18 | |||
| 19 | #define IP6T_RT_TYP 0x01 | ||
| 20 | #define IP6T_RT_SGS 0x02 | ||
| 21 | #define IP6T_RT_LEN 0x04 | ||
| 22 | #define IP6T_RT_RES 0x08 | ||
| 23 | #define IP6T_RT_FST_MASK 0x30 | ||
| 24 | #define IP6T_RT_FST 0x10 | ||
| 25 | #define IP6T_RT_FST_NSTRICT 0x20 | ||
| 26 | |||
| 27 | /* Values for "invflags" field in struct ip6t_rt. */ | ||
| 28 | #define IP6T_RT_INV_TYP 0x01 /* Invert the sense of type. */ | ||
| 29 | #define IP6T_RT_INV_SGS 0x02 /* Invert the sense of Segments. */ | ||
| 30 | #define IP6T_RT_INV_LEN 0x04 /* Invert the sense of length. */ | ||
| 31 | #define IP6T_RT_INV_MASK 0x07 /* All possible flags. */ | ||
| 32 | |||
| 33 | #endif /*_IP6T_RT_H*/ | ||
