diff options
| author | Jan Engelhardt <jengelh@medozas.de> | 2010-10-13 10:28:00 -0400 |
|---|---|---|
| committer | Jan Engelhardt <jengelh@medozas.de> | 2010-10-13 12:00:46 -0400 |
| commit | 243bf6e29eef642de0ff62f1ebf58bc2396d6d6e (patch) | |
| tree | 79f4eb37b594d320d4750e04ce6e16a7d62177f0 /include/linux | |
| parent | 87a2e70db62fec7348c6e5545eb7b7650c33d81b (diff) | |
netfilter: xtables: resolve indirect macros 3/3
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/netfilter_arp/arp_tables.h | 33 | ||||
| -rw-r--r-- | include/linux/netfilter_ipv4/ip_tables.h | 69 | ||||
| -rw-r--r-- | include/linux/netfilter_ipv6/ip6_tables.h | 69 |
3 files changed, 67 insertions, 104 deletions
diff --git a/include/linux/netfilter_arp/arp_tables.h b/include/linux/netfilter_arp/arp_tables.h index 7e193c9241b3..6e2341a811d6 100644 --- a/include/linux/netfilter_arp/arp_tables.h +++ b/include/linux/netfilter_arp/arp_tables.h | |||
| @@ -26,6 +26,14 @@ | |||
| 26 | #define ARPT_TABLE_MAXNAMELEN XT_TABLE_MAXNAMELEN | 26 | #define ARPT_TABLE_MAXNAMELEN XT_TABLE_MAXNAMELEN |
| 27 | #define arpt_entry_target xt_entry_target | 27 | #define arpt_entry_target xt_entry_target |
| 28 | #define arpt_standard_target xt_standard_target | 28 | #define arpt_standard_target xt_standard_target |
| 29 | #define ARPT_CONTINUE XT_CONTINUE | ||
| 30 | #define ARPT_RETURN XT_RETURN | ||
| 31 | #define arpt_counters_info xt_counters_info | ||
| 32 | #define arpt_counters xt_counters | ||
| 33 | #define ARPT_STANDARD_TARGET XT_STANDARD_TARGET | ||
| 34 | #define ARPT_ERROR_TARGET XT_ERROR_TARGET | ||
| 35 | #define ARPT_ENTRY_ITERATE(entries, size, fn, args...) \ | ||
| 36 | XT_ENTRY_ITERATE(struct arpt_entry, entries, size, fn, ## args) | ||
| 29 | #endif | 37 | #endif |
| 30 | 38 | ||
| 31 | #define ARPT_DEV_ADDR_LEN_MAX 16 | 39 | #define ARPT_DEV_ADDR_LEN_MAX 16 |
| @@ -126,12 +134,6 @@ struct arpt_entry | |||
| 126 | #define ARPT_SO_GET_REVISION_TARGET (ARPT_BASE_CTL + 3) | 134 | #define ARPT_SO_GET_REVISION_TARGET (ARPT_BASE_CTL + 3) |
| 127 | #define ARPT_SO_GET_MAX (ARPT_SO_GET_REVISION_TARGET) | 135 | #define ARPT_SO_GET_MAX (ARPT_SO_GET_REVISION_TARGET) |
| 128 | 136 | ||
| 129 | /* CONTINUE verdict for targets */ | ||
| 130 | #define ARPT_CONTINUE XT_CONTINUE | ||
| 131 | |||
| 132 | /* For standard target */ | ||
| 133 | #define ARPT_RETURN XT_RETURN | ||
| 134 | |||
| 135 | /* The argument to ARPT_SO_GET_INFO */ | 137 | /* The argument to ARPT_SO_GET_INFO */ |
| 136 | struct arpt_getinfo { | 138 | struct arpt_getinfo { |
| 137 | /* Which table: caller fills this in. */ | 139 | /* Which table: caller fills this in. */ |
| @@ -185,10 +187,6 @@ struct arpt_replace { | |||
| 185 | struct arpt_entry entries[0]; | 187 | struct arpt_entry entries[0]; |
| 186 | }; | 188 | }; |
| 187 | 189 | ||
| 188 | /* The argument to ARPT_SO_ADD_COUNTERS. */ | ||
| 189 | #define arpt_counters_info xt_counters_info | ||
| 190 | #define arpt_counters xt_counters | ||
| 191 | |||
| 192 | /* The argument to ARPT_SO_GET_ENTRIES. */ | 190 | /* The argument to ARPT_SO_GET_ENTRIES. */ |
| 193 | struct arpt_get_entries { | 191 | struct arpt_get_entries { |
| 194 | /* Which table: user fills this in. */ | 192 | /* Which table: user fills this in. */ |
| @@ -201,23 +199,12 @@ struct arpt_get_entries { | |||
| 201 | struct arpt_entry entrytable[0]; | 199 | struct arpt_entry entrytable[0]; |
| 202 | }; | 200 | }; |
| 203 | 201 | ||
| 204 | /* Standard return verdict, or do jump. */ | ||
| 205 | #define ARPT_STANDARD_TARGET XT_STANDARD_TARGET | ||
| 206 | /* Error verdict. */ | ||
| 207 | #define ARPT_ERROR_TARGET XT_ERROR_TARGET | ||
| 208 | |||
| 209 | /* Helper functions */ | 202 | /* Helper functions */ |
| 210 | static __inline__ struct xt_entry_target *arpt_get_target(struct arpt_entry *e) | 203 | static __inline__ struct xt_entry_target *arpt_get_target(struct arpt_entry *e) |
| 211 | { | 204 | { |
| 212 | return (void *)e + e->target_offset; | 205 | return (void *)e + e->target_offset; |
| 213 | } | 206 | } |
| 214 | 207 | ||
| 215 | #ifndef __KERNEL__ | ||
| 216 | /* fn returns 0 to continue iteration */ | ||
| 217 | #define ARPT_ENTRY_ITERATE(entries, size, fn, args...) \ | ||
| 218 | XT_ENTRY_ITERATE(struct arpt_entry, entries, size, fn, ## args) | ||
| 219 | #endif | ||
| 220 | |||
| 221 | /* | 208 | /* |
| 222 | * Main firewall chains definitions and global var's definitions. | 209 | * Main firewall chains definitions and global var's definitions. |
| 223 | */ | 210 | */ |
| @@ -248,7 +235,7 @@ struct arpt_error { | |||
| 248 | #define ARPT_STANDARD_INIT(__verdict) \ | 235 | #define ARPT_STANDARD_INIT(__verdict) \ |
| 249 | { \ | 236 | { \ |
| 250 | .entry = ARPT_ENTRY_INIT(sizeof(struct arpt_standard)), \ | 237 | .entry = ARPT_ENTRY_INIT(sizeof(struct arpt_standard)), \ |
| 251 | .target = XT_TARGET_INIT(ARPT_STANDARD_TARGET, \ | 238 | .target = XT_TARGET_INIT(XT_STANDARD_TARGET, \ |
| 252 | sizeof(struct xt_standard_target)), \ | 239 | sizeof(struct xt_standard_target)), \ |
| 253 | .target.verdict = -(__verdict) - 1, \ | 240 | .target.verdict = -(__verdict) - 1, \ |
| 254 | } | 241 | } |
| @@ -256,7 +243,7 @@ struct arpt_error { | |||
| 256 | #define ARPT_ERROR_INIT \ | 243 | #define ARPT_ERROR_INIT \ |
| 257 | { \ | 244 | { \ |
| 258 | .entry = ARPT_ENTRY_INIT(sizeof(struct arpt_error)), \ | 245 | .entry = ARPT_ENTRY_INIT(sizeof(struct arpt_error)), \ |
| 259 | .target = XT_TARGET_INIT(ARPT_ERROR_TARGET, \ | 246 | .target = XT_TARGET_INIT(XT_ERROR_TARGET, \ |
| 260 | sizeof(struct arpt_error_target)), \ | 247 | sizeof(struct arpt_error_target)), \ |
| 261 | .target.errorname = "ERROR", \ | 248 | .target.errorname = "ERROR", \ |
| 262 | } | 249 | } |
diff --git a/include/linux/netfilter_ipv4/ip_tables.h b/include/linux/netfilter_ipv4/ip_tables.h index ec506918a9b9..ee54b3b7e237 100644 --- a/include/linux/netfilter_ipv4/ip_tables.h +++ b/include/linux/netfilter_ipv4/ip_tables.h | |||
| @@ -38,6 +38,36 @@ | |||
| 38 | #define ipt_entry_target xt_entry_target | 38 | #define ipt_entry_target xt_entry_target |
| 39 | #define ipt_standard_target xt_standard_target | 39 | #define ipt_standard_target xt_standard_target |
| 40 | #define ipt_counters xt_counters | 40 | #define ipt_counters xt_counters |
| 41 | #define IPT_CONTINUE XT_CONTINUE | ||
| 42 | #define IPT_RETURN XT_RETURN | ||
| 43 | |||
| 44 | /* This group is older than old (iptables < v1.4.0-rc1~89) */ | ||
| 45 | #include <linux/netfilter/xt_tcpudp.h> | ||
| 46 | #define ipt_udp xt_udp | ||
| 47 | #define ipt_tcp xt_tcp | ||
| 48 | #define IPT_TCP_INV_SRCPT XT_TCP_INV_SRCPT | ||
| 49 | #define IPT_TCP_INV_DSTPT XT_TCP_INV_DSTPT | ||
| 50 | #define IPT_TCP_INV_FLAGS XT_TCP_INV_FLAGS | ||
| 51 | #define IPT_TCP_INV_OPTION XT_TCP_INV_OPTION | ||
| 52 | #define IPT_TCP_INV_MASK XT_TCP_INV_MASK | ||
| 53 | #define IPT_UDP_INV_SRCPT XT_UDP_INV_SRCPT | ||
| 54 | #define IPT_UDP_INV_DSTPT XT_UDP_INV_DSTPT | ||
| 55 | #define IPT_UDP_INV_MASK XT_UDP_INV_MASK | ||
| 56 | |||
| 57 | /* The argument to IPT_SO_ADD_COUNTERS. */ | ||
| 58 | #define ipt_counters_info xt_counters_info | ||
| 59 | /* Standard return verdict, or do jump. */ | ||
| 60 | #define IPT_STANDARD_TARGET XT_STANDARD_TARGET | ||
| 61 | /* Error verdict. */ | ||
| 62 | #define IPT_ERROR_TARGET XT_ERROR_TARGET | ||
| 63 | |||
| 64 | /* fn returns 0 to continue iteration */ | ||
| 65 | #define IPT_MATCH_ITERATE(e, fn, args...) \ | ||
| 66 | XT_MATCH_ITERATE(struct ipt_entry, e, fn, ## args) | ||
| 67 | |||
| 68 | /* fn returns 0 to continue iteration */ | ||
| 69 | #define IPT_ENTRY_ITERATE(entries, size, fn, args...) \ | ||
| 70 | XT_ENTRY_ITERATE(struct ipt_entry, entries, size, fn, ## args) | ||
| 41 | #endif | 71 | #endif |
| 42 | 72 | ||
| 43 | /* Yes, Virginia, you have to zero the padding. */ | 73 | /* Yes, Virginia, you have to zero the padding. */ |
| @@ -116,23 +146,6 @@ struct ipt_entry { | |||
| 116 | #define IPT_SO_GET_REVISION_TARGET (IPT_BASE_CTL + 3) | 146 | #define IPT_SO_GET_REVISION_TARGET (IPT_BASE_CTL + 3) |
| 117 | #define IPT_SO_GET_MAX IPT_SO_GET_REVISION_TARGET | 147 | #define IPT_SO_GET_MAX IPT_SO_GET_REVISION_TARGET |
| 118 | 148 | ||
| 119 | #define IPT_CONTINUE XT_CONTINUE | ||
| 120 | #define IPT_RETURN XT_RETURN | ||
| 121 | |||
| 122 | #include <linux/netfilter/xt_tcpudp.h> | ||
| 123 | #define ipt_udp xt_udp | ||
| 124 | #define ipt_tcp xt_tcp | ||
| 125 | |||
| 126 | #define IPT_TCP_INV_SRCPT XT_TCP_INV_SRCPT | ||
| 127 | #define IPT_TCP_INV_DSTPT XT_TCP_INV_DSTPT | ||
| 128 | #define IPT_TCP_INV_FLAGS XT_TCP_INV_FLAGS | ||
| 129 | #define IPT_TCP_INV_OPTION XT_TCP_INV_OPTION | ||
| 130 | #define IPT_TCP_INV_MASK XT_TCP_INV_MASK | ||
| 131 | |||
| 132 | #define IPT_UDP_INV_SRCPT XT_UDP_INV_SRCPT | ||
| 133 | #define IPT_UDP_INV_DSTPT XT_UDP_INV_DSTPT | ||
| 134 | #define IPT_UDP_INV_MASK XT_UDP_INV_MASK | ||
| 135 | |||
| 136 | /* ICMP matching stuff */ | 149 | /* ICMP matching stuff */ |
| 137 | struct ipt_icmp { | 150 | struct ipt_icmp { |
| 138 | u_int8_t type; /* type to match */ | 151 | u_int8_t type; /* type to match */ |
| @@ -196,9 +209,6 @@ struct ipt_replace { | |||
| 196 | struct ipt_entry entries[0]; | 209 | struct ipt_entry entries[0]; |
| 197 | }; | 210 | }; |
| 198 | 211 | ||
| 199 | /* The argument to IPT_SO_ADD_COUNTERS. */ | ||
| 200 | #define ipt_counters_info xt_counters_info | ||
| 201 | |||
| 202 | /* The argument to IPT_SO_GET_ENTRIES. */ | 212 | /* The argument to IPT_SO_GET_ENTRIES. */ |
| 203 | struct ipt_get_entries { | 213 | struct ipt_get_entries { |
| 204 | /* Which table: user fills this in. */ | 214 | /* Which table: user fills this in. */ |
| @@ -211,11 +221,6 @@ struct ipt_get_entries { | |||
| 211 | struct ipt_entry entrytable[0]; | 221 | struct ipt_entry entrytable[0]; |
| 212 | }; | 222 | }; |
| 213 | 223 | ||
| 214 | /* Standard return verdict, or do jump. */ | ||
| 215 | #define IPT_STANDARD_TARGET XT_STANDARD_TARGET | ||
| 216 | /* Error verdict. */ | ||
| 217 | #define IPT_ERROR_TARGET XT_ERROR_TARGET | ||
| 218 | |||
| 219 | /* Helper functions */ | 224 | /* Helper functions */ |
| 220 | static __inline__ struct xt_entry_target * | 225 | static __inline__ struct xt_entry_target * |
| 221 | ipt_get_target(struct ipt_entry *e) | 226 | ipt_get_target(struct ipt_entry *e) |
| @@ -223,16 +228,6 @@ ipt_get_target(struct ipt_entry *e) | |||
| 223 | return (void *)e + e->target_offset; | 228 | return (void *)e + e->target_offset; |
| 224 | } | 229 | } |
| 225 | 230 | ||
| 226 | #ifndef __KERNEL__ | ||
| 227 | /* fn returns 0 to continue iteration */ | ||
| 228 | #define IPT_MATCH_ITERATE(e, fn, args...) \ | ||
| 229 | XT_MATCH_ITERATE(struct ipt_entry, e, fn, ## args) | ||
| 230 | |||
| 231 | /* fn returns 0 to continue iteration */ | ||
| 232 | #define IPT_ENTRY_ITERATE(entries, size, fn, args...) \ | ||
| 233 | XT_ENTRY_ITERATE(struct ipt_entry, entries, size, fn, ## args) | ||
| 234 | #endif | ||
| 235 | |||
| 236 | /* | 231 | /* |
| 237 | * Main firewall chains definitions and global var's definitions. | 232 | * Main firewall chains definitions and global var's definitions. |
| 238 | */ | 233 | */ |
| @@ -271,7 +266,7 @@ struct ipt_error { | |||
| 271 | #define IPT_STANDARD_INIT(__verdict) \ | 266 | #define IPT_STANDARD_INIT(__verdict) \ |
| 272 | { \ | 267 | { \ |
| 273 | .entry = IPT_ENTRY_INIT(sizeof(struct ipt_standard)), \ | 268 | .entry = IPT_ENTRY_INIT(sizeof(struct ipt_standard)), \ |
| 274 | .target = XT_TARGET_INIT(IPT_STANDARD_TARGET, \ | 269 | .target = XT_TARGET_INIT(XT_STANDARD_TARGET, \ |
| 275 | sizeof(struct xt_standard_target)), \ | 270 | sizeof(struct xt_standard_target)), \ |
| 276 | .target.verdict = -(__verdict) - 1, \ | 271 | .target.verdict = -(__verdict) - 1, \ |
| 277 | } | 272 | } |
| @@ -279,7 +274,7 @@ struct ipt_error { | |||
| 279 | #define IPT_ERROR_INIT \ | 274 | #define IPT_ERROR_INIT \ |
| 280 | { \ | 275 | { \ |
| 281 | .entry = IPT_ENTRY_INIT(sizeof(struct ipt_error)), \ | 276 | .entry = IPT_ENTRY_INIT(sizeof(struct ipt_error)), \ |
| 282 | .target = XT_TARGET_INIT(IPT_ERROR_TARGET, \ | 277 | .target = XT_TARGET_INIT(XT_ERROR_TARGET, \ |
| 283 | sizeof(struct ipt_error_target)), \ | 278 | sizeof(struct ipt_error_target)), \ |
| 284 | .target.errorname = "ERROR", \ | 279 | .target.errorname = "ERROR", \ |
| 285 | } | 280 | } |
diff --git a/include/linux/netfilter_ipv6/ip6_tables.h b/include/linux/netfilter_ipv6/ip6_tables.h index 40d11fa05840..ac2b411ea63a 100644 --- a/include/linux/netfilter_ipv6/ip6_tables.h +++ b/include/linux/netfilter_ipv6/ip6_tables.h | |||
| @@ -38,6 +38,29 @@ | |||
| 38 | #define ip6t_entry_target xt_entry_target | 38 | #define ip6t_entry_target xt_entry_target |
| 39 | #define ip6t_standard_target xt_standard_target | 39 | #define ip6t_standard_target xt_standard_target |
| 40 | #define ip6t_counters xt_counters | 40 | #define ip6t_counters xt_counters |
| 41 | #define IP6T_CONTINUE XT_CONTINUE | ||
| 42 | #define IP6T_RETURN XT_RETURN | ||
| 43 | |||
| 44 | /* Pre-iptables-1.4.0 */ | ||
| 45 | #include <linux/netfilter/xt_tcpudp.h> | ||
| 46 | #define ip6t_tcp xt_tcp | ||
| 47 | #define ip6t_udp xt_udp | ||
| 48 | #define IP6T_TCP_INV_SRCPT XT_TCP_INV_SRCPT | ||
| 49 | #define IP6T_TCP_INV_DSTPT XT_TCP_INV_DSTPT | ||
| 50 | #define IP6T_TCP_INV_FLAGS XT_TCP_INV_FLAGS | ||
| 51 | #define IP6T_TCP_INV_OPTION XT_TCP_INV_OPTION | ||
| 52 | #define IP6T_TCP_INV_MASK XT_TCP_INV_MASK | ||
| 53 | #define IP6T_UDP_INV_SRCPT XT_UDP_INV_SRCPT | ||
| 54 | #define IP6T_UDP_INV_DSTPT XT_UDP_INV_DSTPT | ||
| 55 | #define IP6T_UDP_INV_MASK XT_UDP_INV_MASK | ||
| 56 | |||
| 57 | #define ip6t_counters_info xt_counters_info | ||
| 58 | #define IP6T_STANDARD_TARGET XT_STANDARD_TARGET | ||
| 59 | #define IP6T_ERROR_TARGET XT_ERROR_TARGET | ||
| 60 | #define IP6T_MATCH_ITERATE(e, fn, args...) \ | ||
| 61 | XT_MATCH_ITERATE(struct ip6t_entry, e, fn, ## args) | ||
| 62 | #define IP6T_ENTRY_ITERATE(entries, size, fn, args...) \ | ||
| 63 | XT_ENTRY_ITERATE(struct ip6t_entry, entries, size, fn, ## args) | ||
| 41 | #endif | 64 | #endif |
| 42 | 65 | ||
| 43 | /* Yes, Virginia, you have to zero the padding. */ | 66 | /* Yes, Virginia, you have to zero the padding. */ |
| @@ -133,7 +156,7 @@ struct ip6t_error { | |||
| 133 | #define IP6T_STANDARD_INIT(__verdict) \ | 156 | #define IP6T_STANDARD_INIT(__verdict) \ |
| 134 | { \ | 157 | { \ |
| 135 | .entry = IP6T_ENTRY_INIT(sizeof(struct ip6t_standard)), \ | 158 | .entry = IP6T_ENTRY_INIT(sizeof(struct ip6t_standard)), \ |
| 136 | .target = XT_TARGET_INIT(IP6T_STANDARD_TARGET, \ | 159 | .target = XT_TARGET_INIT(XT_STANDARD_TARGET, \ |
| 137 | sizeof(struct xt_standard_target)), \ | 160 | sizeof(struct xt_standard_target)), \ |
| 138 | .target.verdict = -(__verdict) - 1, \ | 161 | .target.verdict = -(__verdict) - 1, \ |
| 139 | } | 162 | } |
| @@ -141,7 +164,7 @@ struct ip6t_error { | |||
| 141 | #define IP6T_ERROR_INIT \ | 164 | #define IP6T_ERROR_INIT \ |
| 142 | { \ | 165 | { \ |
| 143 | .entry = IP6T_ENTRY_INIT(sizeof(struct ip6t_error)), \ | 166 | .entry = IP6T_ENTRY_INIT(sizeof(struct ip6t_error)), \ |
| 144 | .target = XT_TARGET_INIT(IP6T_ERROR_TARGET, \ | 167 | .target = XT_TARGET_INIT(XT_ERROR_TARGET, \ |
| 145 | sizeof(struct ip6t_error_target)), \ | 168 | sizeof(struct ip6t_error_target)), \ |
| 146 | .target.errorname = "ERROR", \ | 169 | .target.errorname = "ERROR", \ |
| 147 | } | 170 | } |
| @@ -165,30 +188,6 @@ struct ip6t_error { | |||
| 165 | #define IP6T_SO_GET_REVISION_TARGET (IP6T_BASE_CTL + 5) | 188 | #define IP6T_SO_GET_REVISION_TARGET (IP6T_BASE_CTL + 5) |
| 166 | #define IP6T_SO_GET_MAX IP6T_SO_GET_REVISION_TARGET | 189 | #define IP6T_SO_GET_MAX IP6T_SO_GET_REVISION_TARGET |
| 167 | 190 | ||
| 168 | /* CONTINUE verdict for targets */ | ||
| 169 | #define IP6T_CONTINUE XT_CONTINUE | ||
| 170 | |||
| 171 | /* For standard target */ | ||
| 172 | #define IP6T_RETURN XT_RETURN | ||
| 173 | |||
| 174 | /* TCP/UDP matching stuff */ | ||
| 175 | #include <linux/netfilter/xt_tcpudp.h> | ||
| 176 | |||
| 177 | #define ip6t_tcp xt_tcp | ||
| 178 | #define ip6t_udp xt_udp | ||
| 179 | |||
| 180 | /* Values for "inv" field in struct ipt_tcp. */ | ||
| 181 | #define IP6T_TCP_INV_SRCPT XT_TCP_INV_SRCPT | ||
| 182 | #define IP6T_TCP_INV_DSTPT XT_TCP_INV_DSTPT | ||
| 183 | #define IP6T_TCP_INV_FLAGS XT_TCP_INV_FLAGS | ||
| 184 | #define IP6T_TCP_INV_OPTION XT_TCP_INV_OPTION | ||
| 185 | #define IP6T_TCP_INV_MASK XT_TCP_INV_MASK | ||
| 186 | |||
| 187 | /* Values for "invflags" field in struct ipt_udp. */ | ||
| 188 | #define IP6T_UDP_INV_SRCPT XT_UDP_INV_SRCPT | ||
| 189 | #define IP6T_UDP_INV_DSTPT XT_UDP_INV_DSTPT | ||
| 190 | #define IP6T_UDP_INV_MASK XT_UDP_INV_MASK | ||
| 191 | |||
| 192 | /* ICMP matching stuff */ | 191 | /* ICMP matching stuff */ |
| 193 | struct ip6t_icmp { | 192 | struct ip6t_icmp { |
| 194 | u_int8_t type; /* type to match */ | 193 | u_int8_t type; /* type to match */ |
| @@ -252,9 +251,6 @@ struct ip6t_replace { | |||
| 252 | struct ip6t_entry entries[0]; | 251 | struct ip6t_entry entries[0]; |
| 253 | }; | 252 | }; |
| 254 | 253 | ||
| 255 | /* The argument to IP6T_SO_ADD_COUNTERS. */ | ||
| 256 | #define ip6t_counters_info xt_counters_info | ||
| 257 | |||
| 258 | /* The argument to IP6T_SO_GET_ENTRIES. */ | 254 | /* The argument to IP6T_SO_GET_ENTRIES. */ |
| 259 | struct ip6t_get_entries { | 255 | struct ip6t_get_entries { |
| 260 | /* Which table: user fills this in. */ | 256 | /* Which table: user fills this in. */ |
| @@ -267,11 +263,6 @@ struct ip6t_get_entries { | |||
| 267 | struct ip6t_entry entrytable[0]; | 263 | struct ip6t_entry entrytable[0]; |
| 268 | }; | 264 | }; |
| 269 | 265 | ||
| 270 | /* Standard return verdict, or do jump. */ | ||
| 271 | #define IP6T_STANDARD_TARGET XT_STANDARD_TARGET | ||
| 272 | /* Error verdict. */ | ||
| 273 | #define IP6T_ERROR_TARGET XT_ERROR_TARGET | ||
| 274 | |||
| 275 | /* Helper functions */ | 266 | /* Helper functions */ |
| 276 | static __inline__ struct xt_entry_target * | 267 | static __inline__ struct xt_entry_target * |
| 277 | ip6t_get_target(struct ip6t_entry *e) | 268 | ip6t_get_target(struct ip6t_entry *e) |
| @@ -279,16 +270,6 @@ ip6t_get_target(struct ip6t_entry *e) | |||
| 279 | return (void *)e + e->target_offset; | 270 | return (void *)e + e->target_offset; |
| 280 | } | 271 | } |
| 281 | 272 | ||
| 282 | #ifndef __KERNEL__ | ||
| 283 | /* fn returns 0 to continue iteration */ | ||
| 284 | #define IP6T_MATCH_ITERATE(e, fn, args...) \ | ||
| 285 | XT_MATCH_ITERATE(struct ip6t_entry, e, fn, ## args) | ||
| 286 | |||
| 287 | /* fn returns 0 to continue iteration */ | ||
| 288 | #define IP6T_ENTRY_ITERATE(entries, size, fn, args...) \ | ||
| 289 | XT_ENTRY_ITERATE(struct ip6t_entry, entries, size, fn, ## args) | ||
| 290 | #endif | ||
| 291 | |||
| 292 | /* | 273 | /* |
| 293 | * Main firewall chains definitions and global var's definitions. | 274 | * Main firewall chains definitions and global var's definitions. |
| 294 | */ | 275 | */ |
