diff options
author | David S. Miller <davem@davemloft.net> | 2010-10-21 11:21:34 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-10-21 11:21:34 -0400 |
commit | 9941fb62762253774cc6177d0b9172ece5133fe1 (patch) | |
tree | 641fc2b376e2f84c7023aa0cd8b9d76f954cc3a1 /include/linux | |
parent | a5190b4eea1f1c53ee26b3d1176441cafa8e7f79 (diff) | |
parent | 3b1a1ce6f418cb7ab35eb55c8a6575987a524e30 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-next-2.6
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/in6.h | 4 | ||||
-rw-r--r-- | include/linux/ip_vs.h | 15 | ||||
-rw-r--r-- | include/linux/ipv6.h | 4 | ||||
-rw-r--r-- | include/linux/netfilter/nf_conntrack_common.h | 6 | ||||
-rw-r--r-- | include/linux/netfilter/nf_conntrack_sip.h | 1 | ||||
-rw-r--r-- | include/linux/netfilter/nfnetlink_conntrack.h | 1 | ||||
-rw-r--r-- | include/linux/netfilter/x_tables.h | 5 | ||||
-rw-r--r-- | include/linux/netfilter/xt_TPROXY.h | 13 | ||||
-rw-r--r-- | include/linux/netfilter_arp/arp_tables.h | 68 | ||||
-rw-r--r-- | include/linux/netfilter_bridge/Kbuild | 2 | ||||
-rw-r--r-- | include/linux/netfilter_ipv4/ip_tables.h | 107 | ||||
-rw-r--r-- | include/linux/netfilter_ipv6/ip6_tables.h | 110 |
12 files changed, 159 insertions, 177 deletions
diff --git a/include/linux/in6.h b/include/linux/in6.h index c4bf46f764bf..097a34b55560 100644 --- a/include/linux/in6.h +++ b/include/linux/in6.h | |||
@@ -268,6 +268,10 @@ struct in6_flowlabel_req { | |||
268 | /* RFC5082: Generalized Ttl Security Mechanism */ | 268 | /* RFC5082: Generalized Ttl Security Mechanism */ |
269 | #define IPV6_MINHOPCOUNT 73 | 269 | #define IPV6_MINHOPCOUNT 73 |
270 | 270 | ||
271 | #define IPV6_ORIGDSTADDR 74 | ||
272 | #define IPV6_RECVORIGDSTADDR IPV6_ORIGDSTADDR | ||
273 | #define IPV6_TRANSPARENT 75 | ||
274 | |||
271 | /* | 275 | /* |
272 | * Multicast Routing: | 276 | * Multicast Routing: |
273 | * see include/linux/mroute6.h. | 277 | * see include/linux/mroute6.h. |
diff --git a/include/linux/ip_vs.h b/include/linux/ip_vs.h index 9708de265bb1..5f43a3b2e3ad 100644 --- a/include/linux/ip_vs.h +++ b/include/linux/ip_vs.h | |||
@@ -70,6 +70,7 @@ | |||
70 | 70 | ||
71 | /* | 71 | /* |
72 | * IPVS Connection Flags | 72 | * IPVS Connection Flags |
73 | * Only flags 0..15 are sent to backup server | ||
73 | */ | 74 | */ |
74 | #define IP_VS_CONN_F_FWD_MASK 0x0007 /* mask for the fwd methods */ | 75 | #define IP_VS_CONN_F_FWD_MASK 0x0007 /* mask for the fwd methods */ |
75 | #define IP_VS_CONN_F_MASQ 0x0000 /* masquerading/NAT */ | 76 | #define IP_VS_CONN_F_MASQ 0x0000 /* masquerading/NAT */ |
@@ -88,9 +89,20 @@ | |||
88 | #define IP_VS_CONN_F_TEMPLATE 0x1000 /* template, not connection */ | 89 | #define IP_VS_CONN_F_TEMPLATE 0x1000 /* template, not connection */ |
89 | #define IP_VS_CONN_F_ONE_PACKET 0x2000 /* forward only one packet */ | 90 | #define IP_VS_CONN_F_ONE_PACKET 0x2000 /* forward only one packet */ |
90 | 91 | ||
92 | /* Flags that are not sent to backup server start from bit 16 */ | ||
93 | #define IP_VS_CONN_F_NFCT (1 << 16) /* use netfilter conntrack */ | ||
94 | |||
95 | /* Connection flags from destination that can be changed by user space */ | ||
96 | #define IP_VS_CONN_F_DEST_MASK (IP_VS_CONN_F_FWD_MASK | \ | ||
97 | IP_VS_CONN_F_ONE_PACKET | \ | ||
98 | IP_VS_CONN_F_NFCT | \ | ||
99 | 0) | ||
100 | |||
91 | #define IP_VS_SCHEDNAME_MAXLEN 16 | 101 | #define IP_VS_SCHEDNAME_MAXLEN 16 |
102 | #define IP_VS_PENAME_MAXLEN 16 | ||
92 | #define IP_VS_IFNAME_MAXLEN 16 | 103 | #define IP_VS_IFNAME_MAXLEN 16 |
93 | 104 | ||
105 | #define IP_VS_PEDATA_MAXLEN 255 | ||
94 | 106 | ||
95 | /* | 107 | /* |
96 | * The struct ip_vs_service_user and struct ip_vs_dest_user are | 108 | * The struct ip_vs_service_user and struct ip_vs_dest_user are |
@@ -324,6 +336,9 @@ enum { | |||
324 | IPVS_SVC_ATTR_NETMASK, /* persistent netmask */ | 336 | IPVS_SVC_ATTR_NETMASK, /* persistent netmask */ |
325 | 337 | ||
326 | IPVS_SVC_ATTR_STATS, /* nested attribute for service stats */ | 338 | IPVS_SVC_ATTR_STATS, /* nested attribute for service stats */ |
339 | |||
340 | IPVS_SVC_ATTR_PE_NAME, /* name of ct retriever */ | ||
341 | |||
327 | __IPVS_SVC_ATTR_MAX, | 342 | __IPVS_SVC_ATTR_MAX, |
328 | }; | 343 | }; |
329 | 344 | ||
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h index e62683ba88e6..8e429d0e0405 100644 --- a/include/linux/ipv6.h +++ b/include/linux/ipv6.h | |||
@@ -341,7 +341,9 @@ struct ipv6_pinfo { | |||
341 | odstopts:1, | 341 | odstopts:1, |
342 | rxflow:1, | 342 | rxflow:1, |
343 | rxtclass:1, | 343 | rxtclass:1, |
344 | rxpmtu:1; | 344 | rxpmtu:1, |
345 | rxorigdstaddr:1; | ||
346 | /* 2 bits hole */ | ||
345 | } bits; | 347 | } bits; |
346 | __u16 all; | 348 | __u16 all; |
347 | } rxopt; | 349 | } rxopt; |
diff --git a/include/linux/netfilter/nf_conntrack_common.h b/include/linux/netfilter/nf_conntrack_common.h index 1afd18c855ec..50cdc2559a5a 100644 --- a/include/linux/netfilter/nf_conntrack_common.h +++ b/include/linux/netfilter/nf_conntrack_common.h | |||
@@ -98,8 +98,14 @@ enum ip_conntrack_events { | |||
98 | 98 | ||
99 | enum ip_conntrack_expect_events { | 99 | enum ip_conntrack_expect_events { |
100 | IPEXP_NEW, /* new expectation */ | 100 | IPEXP_NEW, /* new expectation */ |
101 | IPEXP_DESTROY, /* destroyed expectation */ | ||
101 | }; | 102 | }; |
102 | 103 | ||
104 | /* expectation flags */ | ||
105 | #define NF_CT_EXPECT_PERMANENT 0x1 | ||
106 | #define NF_CT_EXPECT_INACTIVE 0x2 | ||
107 | #define NF_CT_EXPECT_USERSPACE 0x4 | ||
108 | |||
103 | #ifdef __KERNEL__ | 109 | #ifdef __KERNEL__ |
104 | struct ip_conntrack_stat { | 110 | struct ip_conntrack_stat { |
105 | unsigned int searched; | 111 | unsigned int searched; |
diff --git a/include/linux/netfilter/nf_conntrack_sip.h b/include/linux/netfilter/nf_conntrack_sip.h index ff8cfbcf3b81..0ce91d56a5f2 100644 --- a/include/linux/netfilter/nf_conntrack_sip.h +++ b/include/linux/netfilter/nf_conntrack_sip.h | |||
@@ -89,6 +89,7 @@ enum sip_header_types { | |||
89 | SIP_HDR_VIA_TCP, | 89 | SIP_HDR_VIA_TCP, |
90 | SIP_HDR_EXPIRES, | 90 | SIP_HDR_EXPIRES, |
91 | SIP_HDR_CONTENT_LENGTH, | 91 | SIP_HDR_CONTENT_LENGTH, |
92 | SIP_HDR_CALL_ID, | ||
92 | }; | 93 | }; |
93 | 94 | ||
94 | enum sdp_header_types { | 95 | enum sdp_header_types { |
diff --git a/include/linux/netfilter/nfnetlink_conntrack.h b/include/linux/netfilter/nfnetlink_conntrack.h index 9ed534c991b9..455f0ce4f430 100644 --- a/include/linux/netfilter/nfnetlink_conntrack.h +++ b/include/linux/netfilter/nfnetlink_conntrack.h | |||
@@ -161,6 +161,7 @@ enum ctattr_expect { | |||
161 | CTA_EXPECT_ID, | 161 | CTA_EXPECT_ID, |
162 | CTA_EXPECT_HELP_NAME, | 162 | CTA_EXPECT_HELP_NAME, |
163 | CTA_EXPECT_ZONE, | 163 | CTA_EXPECT_ZONE, |
164 | CTA_EXPECT_FLAGS, | ||
164 | __CTA_EXPECT_MAX | 165 | __CTA_EXPECT_MAX |
165 | }; | 166 | }; |
166 | #define CTA_EXPECT_MAX (__CTA_EXPECT_MAX - 1) | 167 | #define CTA_EXPECT_MAX (__CTA_EXPECT_MAX - 1) |
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h index 24e5d01d27d0..742bec051440 100644 --- a/include/linux/netfilter/x_tables.h +++ b/include/linux/netfilter/x_tables.h | |||
@@ -66,6 +66,11 @@ struct xt_standard_target { | |||
66 | int verdict; | 66 | int verdict; |
67 | }; | 67 | }; |
68 | 68 | ||
69 | struct xt_error_target { | ||
70 | struct xt_entry_target target; | ||
71 | char errorname[XT_FUNCTION_MAXNAMELEN]; | ||
72 | }; | ||
73 | |||
69 | /* The argument to IPT_SO_GET_REVISION_*. Returns highest revision | 74 | /* The argument to IPT_SO_GET_REVISION_*. Returns highest revision |
70 | * kernel supports, if >= revision. */ | 75 | * kernel supports, if >= revision. */ |
71 | struct xt_get_revision { | 76 | struct xt_get_revision { |
diff --git a/include/linux/netfilter/xt_TPROXY.h b/include/linux/netfilter/xt_TPROXY.h index 152e8f97132b..3f3d69361289 100644 --- a/include/linux/netfilter/xt_TPROXY.h +++ b/include/linux/netfilter/xt_TPROXY.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _XT_TPROXY_H_target | 1 | #ifndef _XT_TPROXY_H |
2 | #define _XT_TPROXY_H_target | 2 | #define _XT_TPROXY_H |
3 | 3 | ||
4 | /* TPROXY target is capable of marking the packet to perform | 4 | /* TPROXY target is capable of marking the packet to perform |
5 | * redirection. We can get rid of that whenever we get support for | 5 | * redirection. We can get rid of that whenever we get support for |
@@ -11,4 +11,11 @@ struct xt_tproxy_target_info { | |||
11 | __be16 lport; | 11 | __be16 lport; |
12 | }; | 12 | }; |
13 | 13 | ||
14 | #endif /* _XT_TPROXY_H_target */ | 14 | struct xt_tproxy_target_info_v1 { |
15 | u_int32_t mark_mask; | ||
16 | u_int32_t mark_value; | ||
17 | union nf_inet_addr laddr; | ||
18 | __be16 lport; | ||
19 | }; | ||
20 | |||
21 | #endif /* _XT_TPROXY_H */ | ||
diff --git a/include/linux/netfilter_arp/arp_tables.h b/include/linux/netfilter_arp/arp_tables.h index e9948c0560f6..adbf4bff87ed 100644 --- a/include/linux/netfilter_arp/arp_tables.h +++ b/include/linux/netfilter_arp/arp_tables.h | |||
@@ -21,8 +21,21 @@ | |||
21 | 21 | ||
22 | #include <linux/netfilter/x_tables.h> | 22 | #include <linux/netfilter/x_tables.h> |
23 | 23 | ||
24 | #ifndef __KERNEL__ | ||
24 | #define ARPT_FUNCTION_MAXNAMELEN XT_FUNCTION_MAXNAMELEN | 25 | #define ARPT_FUNCTION_MAXNAMELEN XT_FUNCTION_MAXNAMELEN |
25 | #define ARPT_TABLE_MAXNAMELEN XT_TABLE_MAXNAMELEN | 26 | #define ARPT_TABLE_MAXNAMELEN XT_TABLE_MAXNAMELEN |
27 | #define arpt_entry_target xt_entry_target | ||
28 | #define arpt_standard_target xt_standard_target | ||
29 | #define arpt_error_target xt_error_target | ||
30 | #define ARPT_CONTINUE XT_CONTINUE | ||
31 | #define ARPT_RETURN XT_RETURN | ||
32 | #define arpt_counters_info xt_counters_info | ||
33 | #define arpt_counters xt_counters | ||
34 | #define ARPT_STANDARD_TARGET XT_STANDARD_TARGET | ||
35 | #define ARPT_ERROR_TARGET XT_ERROR_TARGET | ||
36 | #define ARPT_ENTRY_ITERATE(entries, size, fn, args...) \ | ||
37 | XT_ENTRY_ITERATE(struct arpt_entry, entries, size, fn, ## args) | ||
38 | #endif | ||
26 | 39 | ||
27 | #define ARPT_DEV_ADDR_LEN_MAX 16 | 40 | #define ARPT_DEV_ADDR_LEN_MAX 16 |
28 | 41 | ||
@@ -63,9 +76,6 @@ struct arpt_arp { | |||
63 | u_int16_t invflags; | 76 | u_int16_t invflags; |
64 | }; | 77 | }; |
65 | 78 | ||
66 | #define arpt_entry_target xt_entry_target | ||
67 | #define arpt_standard_target xt_standard_target | ||
68 | |||
69 | /* Values for "flag" field in struct arpt_ip (general arp structure). | 79 | /* Values for "flag" field in struct arpt_ip (general arp structure). |
70 | * No flags defined yet. | 80 | * No flags defined yet. |
71 | */ | 81 | */ |
@@ -125,16 +135,10 @@ struct arpt_entry | |||
125 | #define ARPT_SO_GET_REVISION_TARGET (ARPT_BASE_CTL + 3) | 135 | #define ARPT_SO_GET_REVISION_TARGET (ARPT_BASE_CTL + 3) |
126 | #define ARPT_SO_GET_MAX (ARPT_SO_GET_REVISION_TARGET) | 136 | #define ARPT_SO_GET_MAX (ARPT_SO_GET_REVISION_TARGET) |
127 | 137 | ||
128 | /* CONTINUE verdict for targets */ | ||
129 | #define ARPT_CONTINUE XT_CONTINUE | ||
130 | |||
131 | /* For standard target */ | ||
132 | #define ARPT_RETURN XT_RETURN | ||
133 | |||
134 | /* The argument to ARPT_SO_GET_INFO */ | 138 | /* The argument to ARPT_SO_GET_INFO */ |
135 | struct arpt_getinfo { | 139 | struct arpt_getinfo { |
136 | /* Which table: caller fills this in. */ | 140 | /* Which table: caller fills this in. */ |
137 | char name[ARPT_TABLE_MAXNAMELEN]; | 141 | char name[XT_TABLE_MAXNAMELEN]; |
138 | 142 | ||
139 | /* Kernel fills these in. */ | 143 | /* Kernel fills these in. */ |
140 | /* Which hook entry points are valid: bitmask */ | 144 | /* Which hook entry points are valid: bitmask */ |
@@ -156,7 +160,7 @@ struct arpt_getinfo { | |||
156 | /* The argument to ARPT_SO_SET_REPLACE. */ | 160 | /* The argument to ARPT_SO_SET_REPLACE. */ |
157 | struct arpt_replace { | 161 | struct arpt_replace { |
158 | /* Which table. */ | 162 | /* Which table. */ |
159 | char name[ARPT_TABLE_MAXNAMELEN]; | 163 | char name[XT_TABLE_MAXNAMELEN]; |
160 | 164 | ||
161 | /* Which hook entry points are valid: bitmask. You can't | 165 | /* Which hook entry points are valid: bitmask. You can't |
162 | change this. */ | 166 | change this. */ |
@@ -184,14 +188,10 @@ struct arpt_replace { | |||
184 | struct arpt_entry entries[0]; | 188 | struct arpt_entry entries[0]; |
185 | }; | 189 | }; |
186 | 190 | ||
187 | /* The argument to ARPT_SO_ADD_COUNTERS. */ | ||
188 | #define arpt_counters_info xt_counters_info | ||
189 | #define arpt_counters xt_counters | ||
190 | |||
191 | /* The argument to ARPT_SO_GET_ENTRIES. */ | 191 | /* The argument to ARPT_SO_GET_ENTRIES. */ |
192 | struct arpt_get_entries { | 192 | struct arpt_get_entries { |
193 | /* Which table: user fills this in. */ | 193 | /* Which table: user fills this in. */ |
194 | char name[ARPT_TABLE_MAXNAMELEN]; | 194 | char name[XT_TABLE_MAXNAMELEN]; |
195 | 195 | ||
196 | /* User fills this in: total entry size. */ | 196 | /* User fills this in: total entry size. */ |
197 | unsigned int size; | 197 | unsigned int size; |
@@ -200,23 +200,12 @@ struct arpt_get_entries { | |||
200 | struct arpt_entry entrytable[0]; | 200 | struct arpt_entry entrytable[0]; |
201 | }; | 201 | }; |
202 | 202 | ||
203 | /* Standard return verdict, or do jump. */ | ||
204 | #define ARPT_STANDARD_TARGET XT_STANDARD_TARGET | ||
205 | /* Error verdict. */ | ||
206 | #define ARPT_ERROR_TARGET XT_ERROR_TARGET | ||
207 | |||
208 | /* Helper functions */ | 203 | /* Helper functions */ |
209 | static __inline__ struct arpt_entry_target *arpt_get_target(struct arpt_entry *e) | 204 | static __inline__ struct xt_entry_target *arpt_get_target(struct arpt_entry *e) |
210 | { | 205 | { |
211 | return (void *)e + e->target_offset; | 206 | return (void *)e + e->target_offset; |
212 | } | 207 | } |
213 | 208 | ||
214 | #ifndef __KERNEL__ | ||
215 | /* fn returns 0 to continue iteration */ | ||
216 | #define ARPT_ENTRY_ITERATE(entries, size, fn, args...) \ | ||
217 | XT_ENTRY_ITERATE(struct arpt_entry, entries, size, fn, ## args) | ||
218 | #endif | ||
219 | |||
220 | /* | 209 | /* |
221 | * Main firewall chains definitions and global var's definitions. | 210 | * Main firewall chains definitions and global var's definitions. |
222 | */ | 211 | */ |
@@ -225,17 +214,12 @@ static __inline__ struct arpt_entry_target *arpt_get_target(struct arpt_entry *e | |||
225 | /* Standard entry. */ | 214 | /* Standard entry. */ |
226 | struct arpt_standard { | 215 | struct arpt_standard { |
227 | struct arpt_entry entry; | 216 | struct arpt_entry entry; |
228 | struct arpt_standard_target target; | 217 | struct xt_standard_target target; |
229 | }; | ||
230 | |||
231 | struct arpt_error_target { | ||
232 | struct arpt_entry_target target; | ||
233 | char errorname[ARPT_FUNCTION_MAXNAMELEN]; | ||
234 | }; | 218 | }; |
235 | 219 | ||
236 | struct arpt_error { | 220 | struct arpt_error { |
237 | struct arpt_entry entry; | 221 | struct arpt_entry entry; |
238 | struct arpt_error_target target; | 222 | struct xt_error_target target; |
239 | }; | 223 | }; |
240 | 224 | ||
241 | #define ARPT_ENTRY_INIT(__size) \ | 225 | #define ARPT_ENTRY_INIT(__size) \ |
@@ -247,16 +231,16 @@ struct arpt_error { | |||
247 | #define ARPT_STANDARD_INIT(__verdict) \ | 231 | #define ARPT_STANDARD_INIT(__verdict) \ |
248 | { \ | 232 | { \ |
249 | .entry = ARPT_ENTRY_INIT(sizeof(struct arpt_standard)), \ | 233 | .entry = ARPT_ENTRY_INIT(sizeof(struct arpt_standard)), \ |
250 | .target = XT_TARGET_INIT(ARPT_STANDARD_TARGET, \ | 234 | .target = XT_TARGET_INIT(XT_STANDARD_TARGET, \ |
251 | sizeof(struct arpt_standard_target)), \ | 235 | sizeof(struct xt_standard_target)), \ |
252 | .target.verdict = -(__verdict) - 1, \ | 236 | .target.verdict = -(__verdict) - 1, \ |
253 | } | 237 | } |
254 | 238 | ||
255 | #define ARPT_ERROR_INIT \ | 239 | #define ARPT_ERROR_INIT \ |
256 | { \ | 240 | { \ |
257 | .entry = ARPT_ENTRY_INIT(sizeof(struct arpt_error)), \ | 241 | .entry = ARPT_ENTRY_INIT(sizeof(struct arpt_error)), \ |
258 | .target = XT_TARGET_INIT(ARPT_ERROR_TARGET, \ | 242 | .target = XT_TARGET_INIT(XT_ERROR_TARGET, \ |
259 | sizeof(struct arpt_error_target)), \ | 243 | sizeof(struct xt_error_target)), \ |
260 | .target.errorname = "ERROR", \ | 244 | .target.errorname = "ERROR", \ |
261 | } | 245 | } |
262 | 246 | ||
@@ -271,8 +255,6 @@ extern unsigned int arpt_do_table(struct sk_buff *skb, | |||
271 | const struct net_device *out, | 255 | const struct net_device *out, |
272 | struct xt_table *table); | 256 | struct xt_table *table); |
273 | 257 | ||
274 | #define ARPT_ALIGN(s) XT_ALIGN(s) | ||
275 | |||
276 | #ifdef CONFIG_COMPAT | 258 | #ifdef CONFIG_COMPAT |
277 | #include <net/compat.h> | 259 | #include <net/compat.h> |
278 | 260 | ||
@@ -285,14 +267,12 @@ struct compat_arpt_entry { | |||
285 | unsigned char elems[0]; | 267 | unsigned char elems[0]; |
286 | }; | 268 | }; |
287 | 269 | ||
288 | static inline struct arpt_entry_target * | 270 | static inline struct xt_entry_target * |
289 | compat_arpt_get_target(struct compat_arpt_entry *e) | 271 | compat_arpt_get_target(struct compat_arpt_entry *e) |
290 | { | 272 | { |
291 | return (void *)e + e->target_offset; | 273 | return (void *)e + e->target_offset; |
292 | } | 274 | } |
293 | 275 | ||
294 | #define COMPAT_ARPT_ALIGN(s) COMPAT_XT_ALIGN(s) | ||
295 | |||
296 | #endif /* CONFIG_COMPAT */ | 276 | #endif /* CONFIG_COMPAT */ |
297 | #endif /*__KERNEL__*/ | 277 | #endif /*__KERNEL__*/ |
298 | #endif /* _ARPTABLES_H */ | 278 | #endif /* _ARPTABLES_H */ |
diff --git a/include/linux/netfilter_bridge/Kbuild b/include/linux/netfilter_bridge/Kbuild index d4d78672873e..e48f1a3f5a4a 100644 --- a/include/linux/netfilter_bridge/Kbuild +++ b/include/linux/netfilter_bridge/Kbuild | |||
@@ -3,11 +3,13 @@ header-y += ebt_among.h | |||
3 | header-y += ebt_arp.h | 3 | header-y += ebt_arp.h |
4 | header-y += ebt_arpreply.h | 4 | header-y += ebt_arpreply.h |
5 | header-y += ebt_ip.h | 5 | header-y += ebt_ip.h |
6 | header-y += ebt_ip6.h | ||
6 | header-y += ebt_limit.h | 7 | header-y += ebt_limit.h |
7 | header-y += ebt_log.h | 8 | header-y += ebt_log.h |
8 | header-y += ebt_mark_m.h | 9 | header-y += ebt_mark_m.h |
9 | header-y += ebt_mark_t.h | 10 | header-y += ebt_mark_t.h |
10 | header-y += ebt_nat.h | 11 | header-y += ebt_nat.h |
12 | header-y += ebt_nflog.h | ||
11 | header-y += ebt_pkttype.h | 13 | header-y += ebt_pkttype.h |
12 | header-y += ebt_redirect.h | 14 | header-y += ebt_redirect.h |
13 | header-y += ebt_stp.h | 15 | header-y += ebt_stp.h |
diff --git a/include/linux/netfilter_ipv4/ip_tables.h b/include/linux/netfilter_ipv4/ip_tables.h index 704a7b6e8169..64a5d95c58e8 100644 --- a/include/linux/netfilter_ipv4/ip_tables.h +++ b/include/linux/netfilter_ipv4/ip_tables.h | |||
@@ -27,12 +27,49 @@ | |||
27 | 27 | ||
28 | #include <linux/netfilter/x_tables.h> | 28 | #include <linux/netfilter/x_tables.h> |
29 | 29 | ||
30 | #ifndef __KERNEL__ | ||
30 | #define IPT_FUNCTION_MAXNAMELEN XT_FUNCTION_MAXNAMELEN | 31 | #define IPT_FUNCTION_MAXNAMELEN XT_FUNCTION_MAXNAMELEN |
31 | #define IPT_TABLE_MAXNAMELEN XT_TABLE_MAXNAMELEN | 32 | #define IPT_TABLE_MAXNAMELEN XT_TABLE_MAXNAMELEN |
32 | #define ipt_match xt_match | 33 | #define ipt_match xt_match |
33 | #define ipt_target xt_target | 34 | #define ipt_target xt_target |
34 | #define ipt_table xt_table | 35 | #define ipt_table xt_table |
35 | #define ipt_get_revision xt_get_revision | 36 | #define ipt_get_revision xt_get_revision |
37 | #define ipt_entry_match xt_entry_match | ||
38 | #define ipt_entry_target xt_entry_target | ||
39 | #define ipt_standard_target xt_standard_target | ||
40 | #define ipt_error_target xt_error_target | ||
41 | #define ipt_counters xt_counters | ||
42 | #define IPT_CONTINUE XT_CONTINUE | ||
43 | #define IPT_RETURN XT_RETURN | ||
44 | |||
45 | /* This group is older than old (iptables < v1.4.0-rc1~89) */ | ||
46 | #include <linux/netfilter/xt_tcpudp.h> | ||
47 | #define ipt_udp xt_udp | ||
48 | #define ipt_tcp xt_tcp | ||
49 | #define IPT_TCP_INV_SRCPT XT_TCP_INV_SRCPT | ||
50 | #define IPT_TCP_INV_DSTPT XT_TCP_INV_DSTPT | ||
51 | #define IPT_TCP_INV_FLAGS XT_TCP_INV_FLAGS | ||
52 | #define IPT_TCP_INV_OPTION XT_TCP_INV_OPTION | ||
53 | #define IPT_TCP_INV_MASK XT_TCP_INV_MASK | ||
54 | #define IPT_UDP_INV_SRCPT XT_UDP_INV_SRCPT | ||
55 | #define IPT_UDP_INV_DSTPT XT_UDP_INV_DSTPT | ||
56 | #define IPT_UDP_INV_MASK XT_UDP_INV_MASK | ||
57 | |||
58 | /* The argument to IPT_SO_ADD_COUNTERS. */ | ||
59 | #define ipt_counters_info xt_counters_info | ||
60 | /* Standard return verdict, or do jump. */ | ||
61 | #define IPT_STANDARD_TARGET XT_STANDARD_TARGET | ||
62 | /* Error verdict. */ | ||
63 | #define IPT_ERROR_TARGET XT_ERROR_TARGET | ||
64 | |||
65 | /* fn returns 0 to continue iteration */ | ||
66 | #define IPT_MATCH_ITERATE(e, fn, args...) \ | ||
67 | XT_MATCH_ITERATE(struct ipt_entry, e, fn, ## args) | ||
68 | |||
69 | /* fn returns 0 to continue iteration */ | ||
70 | #define IPT_ENTRY_ITERATE(entries, size, fn, args...) \ | ||
71 | XT_ENTRY_ITERATE(struct ipt_entry, entries, size, fn, ## args) | ||
72 | #endif | ||
36 | 73 | ||
37 | /* Yes, Virginia, you have to zero the padding. */ | 74 | /* Yes, Virginia, you have to zero the padding. */ |
38 | struct ipt_ip { | 75 | struct ipt_ip { |
@@ -52,12 +89,6 @@ struct ipt_ip { | |||
52 | u_int8_t invflags; | 89 | u_int8_t invflags; |
53 | }; | 90 | }; |
54 | 91 | ||
55 | #define ipt_entry_match xt_entry_match | ||
56 | #define ipt_entry_target xt_entry_target | ||
57 | #define ipt_standard_target xt_standard_target | ||
58 | |||
59 | #define ipt_counters xt_counters | ||
60 | |||
61 | /* Values for "flag" field in struct ipt_ip (general ip structure). */ | 92 | /* Values for "flag" field in struct ipt_ip (general ip structure). */ |
62 | #define IPT_F_FRAG 0x01 /* Set if rule is a fragment rule */ | 93 | #define IPT_F_FRAG 0x01 /* Set if rule is a fragment rule */ |
63 | #define IPT_F_GOTO 0x02 /* Set if jump is a goto */ | 94 | #define IPT_F_GOTO 0x02 /* Set if jump is a goto */ |
@@ -116,23 +147,6 @@ struct ipt_entry { | |||
116 | #define IPT_SO_GET_REVISION_TARGET (IPT_BASE_CTL + 3) | 147 | #define IPT_SO_GET_REVISION_TARGET (IPT_BASE_CTL + 3) |
117 | #define IPT_SO_GET_MAX IPT_SO_GET_REVISION_TARGET | 148 | #define IPT_SO_GET_MAX IPT_SO_GET_REVISION_TARGET |
118 | 149 | ||
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 */ | 150 | /* ICMP matching stuff */ |
137 | struct ipt_icmp { | 151 | struct ipt_icmp { |
138 | u_int8_t type; /* type to match */ | 152 | u_int8_t type; /* type to match */ |
@@ -146,7 +160,7 @@ struct ipt_icmp { | |||
146 | /* The argument to IPT_SO_GET_INFO */ | 160 | /* The argument to IPT_SO_GET_INFO */ |
147 | struct ipt_getinfo { | 161 | struct ipt_getinfo { |
148 | /* Which table: caller fills this in. */ | 162 | /* Which table: caller fills this in. */ |
149 | char name[IPT_TABLE_MAXNAMELEN]; | 163 | char name[XT_TABLE_MAXNAMELEN]; |
150 | 164 | ||
151 | /* Kernel fills these in. */ | 165 | /* Kernel fills these in. */ |
152 | /* Which hook entry points are valid: bitmask */ | 166 | /* Which hook entry points are valid: bitmask */ |
@@ -168,7 +182,7 @@ struct ipt_getinfo { | |||
168 | /* The argument to IPT_SO_SET_REPLACE. */ | 182 | /* The argument to IPT_SO_SET_REPLACE. */ |
169 | struct ipt_replace { | 183 | struct ipt_replace { |
170 | /* Which table. */ | 184 | /* Which table. */ |
171 | char name[IPT_TABLE_MAXNAMELEN]; | 185 | char name[XT_TABLE_MAXNAMELEN]; |
172 | 186 | ||
173 | /* Which hook entry points are valid: bitmask. You can't | 187 | /* Which hook entry points are valid: bitmask. You can't |
174 | change this. */ | 188 | change this. */ |
@@ -196,13 +210,10 @@ struct ipt_replace { | |||
196 | struct ipt_entry entries[0]; | 210 | struct ipt_entry entries[0]; |
197 | }; | 211 | }; |
198 | 212 | ||
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. */ | 213 | /* The argument to IPT_SO_GET_ENTRIES. */ |
203 | struct ipt_get_entries { | 214 | struct ipt_get_entries { |
204 | /* Which table: user fills this in. */ | 215 | /* Which table: user fills this in. */ |
205 | char name[IPT_TABLE_MAXNAMELEN]; | 216 | char name[XT_TABLE_MAXNAMELEN]; |
206 | 217 | ||
207 | /* User fills this in: total entry size. */ | 218 | /* User fills this in: total entry size. */ |
208 | unsigned int size; | 219 | unsigned int size; |
@@ -211,28 +222,13 @@ struct ipt_get_entries { | |||
211 | struct ipt_entry entrytable[0]; | 222 | struct ipt_entry entrytable[0]; |
212 | }; | 223 | }; |
213 | 224 | ||
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 */ | 225 | /* Helper functions */ |
220 | static __inline__ struct ipt_entry_target * | 226 | static __inline__ struct xt_entry_target * |
221 | ipt_get_target(struct ipt_entry *e) | 227 | ipt_get_target(struct ipt_entry *e) |
222 | { | 228 | { |
223 | return (void *)e + e->target_offset; | 229 | return (void *)e + e->target_offset; |
224 | } | 230 | } |
225 | 231 | ||
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 | /* | 232 | /* |
237 | * Main firewall chains definitions and global var's definitions. | 233 | * Main firewall chains definitions and global var's definitions. |
238 | */ | 234 | */ |
@@ -249,17 +245,12 @@ extern void ipt_unregister_table(struct net *net, struct xt_table *table); | |||
249 | /* Standard entry. */ | 245 | /* Standard entry. */ |
250 | struct ipt_standard { | 246 | struct ipt_standard { |
251 | struct ipt_entry entry; | 247 | struct ipt_entry entry; |
252 | struct ipt_standard_target target; | 248 | struct xt_standard_target target; |
253 | }; | ||
254 | |||
255 | struct ipt_error_target { | ||
256 | struct ipt_entry_target target; | ||
257 | char errorname[IPT_FUNCTION_MAXNAMELEN]; | ||
258 | }; | 249 | }; |
259 | 250 | ||
260 | struct ipt_error { | 251 | struct ipt_error { |
261 | struct ipt_entry entry; | 252 | struct ipt_entry entry; |
262 | struct ipt_error_target target; | 253 | struct xt_error_target target; |
263 | }; | 254 | }; |
264 | 255 | ||
265 | #define IPT_ENTRY_INIT(__size) \ | 256 | #define IPT_ENTRY_INIT(__size) \ |
@@ -271,7 +262,7 @@ struct ipt_error { | |||
271 | #define IPT_STANDARD_INIT(__verdict) \ | 262 | #define IPT_STANDARD_INIT(__verdict) \ |
272 | { \ | 263 | { \ |
273 | .entry = IPT_ENTRY_INIT(sizeof(struct ipt_standard)), \ | 264 | .entry = IPT_ENTRY_INIT(sizeof(struct ipt_standard)), \ |
274 | .target = XT_TARGET_INIT(IPT_STANDARD_TARGET, \ | 265 | .target = XT_TARGET_INIT(XT_STANDARD_TARGET, \ |
275 | sizeof(struct xt_standard_target)), \ | 266 | sizeof(struct xt_standard_target)), \ |
276 | .target.verdict = -(__verdict) - 1, \ | 267 | .target.verdict = -(__verdict) - 1, \ |
277 | } | 268 | } |
@@ -279,8 +270,8 @@ struct ipt_error { | |||
279 | #define IPT_ERROR_INIT \ | 270 | #define IPT_ERROR_INIT \ |
280 | { \ | 271 | { \ |
281 | .entry = IPT_ENTRY_INIT(sizeof(struct ipt_error)), \ | 272 | .entry = IPT_ENTRY_INIT(sizeof(struct ipt_error)), \ |
282 | .target = XT_TARGET_INIT(IPT_ERROR_TARGET, \ | 273 | .target = XT_TARGET_INIT(XT_ERROR_TARGET, \ |
283 | sizeof(struct ipt_error_target)), \ | 274 | sizeof(struct xt_error_target)), \ |
284 | .target.errorname = "ERROR", \ | 275 | .target.errorname = "ERROR", \ |
285 | } | 276 | } |
286 | 277 | ||
@@ -291,8 +282,6 @@ extern unsigned int ipt_do_table(struct sk_buff *skb, | |||
291 | const struct net_device *out, | 282 | const struct net_device *out, |
292 | struct xt_table *table); | 283 | struct xt_table *table); |
293 | 284 | ||
294 | #define IPT_ALIGN(s) XT_ALIGN(s) | ||
295 | |||
296 | #ifdef CONFIG_COMPAT | 285 | #ifdef CONFIG_COMPAT |
297 | #include <net/compat.h> | 286 | #include <net/compat.h> |
298 | 287 | ||
@@ -307,14 +296,12 @@ struct compat_ipt_entry { | |||
307 | }; | 296 | }; |
308 | 297 | ||
309 | /* Helper functions */ | 298 | /* Helper functions */ |
310 | static inline struct ipt_entry_target * | 299 | static inline struct xt_entry_target * |
311 | compat_ipt_get_target(struct compat_ipt_entry *e) | 300 | compat_ipt_get_target(struct compat_ipt_entry *e) |
312 | { | 301 | { |
313 | return (void *)e + e->target_offset; | 302 | return (void *)e + e->target_offset; |
314 | } | 303 | } |
315 | 304 | ||
316 | #define COMPAT_IPT_ALIGN(s) COMPAT_XT_ALIGN(s) | ||
317 | |||
318 | #endif /* CONFIG_COMPAT */ | 305 | #endif /* CONFIG_COMPAT */ |
319 | #endif /*__KERNEL__*/ | 306 | #endif /*__KERNEL__*/ |
320 | #endif /* _IPTABLES_H */ | 307 | #endif /* _IPTABLES_H */ |
diff --git a/include/linux/netfilter_ipv6/ip6_tables.h b/include/linux/netfilter_ipv6/ip6_tables.h index 18442ff19c07..c9784f7a9c1f 100644 --- a/include/linux/netfilter_ipv6/ip6_tables.h +++ b/include/linux/netfilter_ipv6/ip6_tables.h | |||
@@ -27,13 +27,42 @@ | |||
27 | 27 | ||
28 | #include <linux/netfilter/x_tables.h> | 28 | #include <linux/netfilter/x_tables.h> |
29 | 29 | ||
30 | #ifndef __KERNEL__ | ||
30 | #define IP6T_FUNCTION_MAXNAMELEN XT_FUNCTION_MAXNAMELEN | 31 | #define IP6T_FUNCTION_MAXNAMELEN XT_FUNCTION_MAXNAMELEN |
31 | #define IP6T_TABLE_MAXNAMELEN XT_TABLE_MAXNAMELEN | 32 | #define IP6T_TABLE_MAXNAMELEN XT_TABLE_MAXNAMELEN |
32 | |||
33 | #define ip6t_match xt_match | 33 | #define ip6t_match xt_match |
34 | #define ip6t_target xt_target | 34 | #define ip6t_target xt_target |
35 | #define ip6t_table xt_table | 35 | #define ip6t_table xt_table |
36 | #define ip6t_get_revision xt_get_revision | 36 | #define ip6t_get_revision xt_get_revision |
37 | #define ip6t_entry_match xt_entry_match | ||
38 | #define ip6t_entry_target xt_entry_target | ||
39 | #define ip6t_standard_target xt_standard_target | ||
40 | #define ip6t_error_target xt_error_target | ||
41 | #define ip6t_counters xt_counters | ||
42 | #define IP6T_CONTINUE XT_CONTINUE | ||
43 | #define IP6T_RETURN XT_RETURN | ||
44 | |||
45 | /* Pre-iptables-1.4.0 */ | ||
46 | #include <linux/netfilter/xt_tcpudp.h> | ||
47 | #define ip6t_tcp xt_tcp | ||
48 | #define ip6t_udp xt_udp | ||
49 | #define IP6T_TCP_INV_SRCPT XT_TCP_INV_SRCPT | ||
50 | #define IP6T_TCP_INV_DSTPT XT_TCP_INV_DSTPT | ||
51 | #define IP6T_TCP_INV_FLAGS XT_TCP_INV_FLAGS | ||
52 | #define IP6T_TCP_INV_OPTION XT_TCP_INV_OPTION | ||
53 | #define IP6T_TCP_INV_MASK XT_TCP_INV_MASK | ||
54 | #define IP6T_UDP_INV_SRCPT XT_UDP_INV_SRCPT | ||
55 | #define IP6T_UDP_INV_DSTPT XT_UDP_INV_DSTPT | ||
56 | #define IP6T_UDP_INV_MASK XT_UDP_INV_MASK | ||
57 | |||
58 | #define ip6t_counters_info xt_counters_info | ||
59 | #define IP6T_STANDARD_TARGET XT_STANDARD_TARGET | ||
60 | #define IP6T_ERROR_TARGET XT_ERROR_TARGET | ||
61 | #define IP6T_MATCH_ITERATE(e, fn, args...) \ | ||
62 | XT_MATCH_ITERATE(struct ip6t_entry, e, fn, ## args) | ||
63 | #define IP6T_ENTRY_ITERATE(entries, size, fn, args...) \ | ||
64 | XT_ENTRY_ITERATE(struct ip6t_entry, entries, size, fn, ## args) | ||
65 | #endif | ||
37 | 66 | ||
38 | /* Yes, Virginia, you have to zero the padding. */ | 67 | /* Yes, Virginia, you have to zero the padding. */ |
39 | struct ip6t_ip6 { | 68 | struct ip6t_ip6 { |
@@ -62,12 +91,6 @@ struct ip6t_ip6 { | |||
62 | u_int8_t invflags; | 91 | u_int8_t invflags; |
63 | }; | 92 | }; |
64 | 93 | ||
65 | #define ip6t_entry_match xt_entry_match | ||
66 | #define ip6t_entry_target xt_entry_target | ||
67 | #define ip6t_standard_target xt_standard_target | ||
68 | |||
69 | #define ip6t_counters xt_counters | ||
70 | |||
71 | /* Values for "flag" field in struct ip6t_ip6 (general ip6 structure). */ | 94 | /* Values for "flag" field in struct ip6t_ip6 (general ip6 structure). */ |
72 | #define IP6T_F_PROTO 0x01 /* Set if rule cares about upper | 95 | #define IP6T_F_PROTO 0x01 /* Set if rule cares about upper |
73 | protocols */ | 96 | protocols */ |
@@ -112,17 +135,12 @@ struct ip6t_entry { | |||
112 | /* Standard entry */ | 135 | /* Standard entry */ |
113 | struct ip6t_standard { | 136 | struct ip6t_standard { |
114 | struct ip6t_entry entry; | 137 | struct ip6t_entry entry; |
115 | struct ip6t_standard_target target; | 138 | struct xt_standard_target target; |
116 | }; | ||
117 | |||
118 | struct ip6t_error_target { | ||
119 | struct ip6t_entry_target target; | ||
120 | char errorname[IP6T_FUNCTION_MAXNAMELEN]; | ||
121 | }; | 139 | }; |
122 | 140 | ||
123 | struct ip6t_error { | 141 | struct ip6t_error { |
124 | struct ip6t_entry entry; | 142 | struct ip6t_entry entry; |
125 | struct ip6t_error_target target; | 143 | struct xt_error_target target; |
126 | }; | 144 | }; |
127 | 145 | ||
128 | #define IP6T_ENTRY_INIT(__size) \ | 146 | #define IP6T_ENTRY_INIT(__size) \ |
@@ -134,16 +152,16 @@ struct ip6t_error { | |||
134 | #define IP6T_STANDARD_INIT(__verdict) \ | 152 | #define IP6T_STANDARD_INIT(__verdict) \ |
135 | { \ | 153 | { \ |
136 | .entry = IP6T_ENTRY_INIT(sizeof(struct ip6t_standard)), \ | 154 | .entry = IP6T_ENTRY_INIT(sizeof(struct ip6t_standard)), \ |
137 | .target = XT_TARGET_INIT(IP6T_STANDARD_TARGET, \ | 155 | .target = XT_TARGET_INIT(XT_STANDARD_TARGET, \ |
138 | sizeof(struct ip6t_standard_target)), \ | 156 | sizeof(struct xt_standard_target)), \ |
139 | .target.verdict = -(__verdict) - 1, \ | 157 | .target.verdict = -(__verdict) - 1, \ |
140 | } | 158 | } |
141 | 159 | ||
142 | #define IP6T_ERROR_INIT \ | 160 | #define IP6T_ERROR_INIT \ |
143 | { \ | 161 | { \ |
144 | .entry = IP6T_ENTRY_INIT(sizeof(struct ip6t_error)), \ | 162 | .entry = IP6T_ENTRY_INIT(sizeof(struct ip6t_error)), \ |
145 | .target = XT_TARGET_INIT(IP6T_ERROR_TARGET, \ | 163 | .target = XT_TARGET_INIT(XT_ERROR_TARGET, \ |
146 | sizeof(struct ip6t_error_target)), \ | 164 | sizeof(struct xt_error_target)), \ |
147 | .target.errorname = "ERROR", \ | 165 | .target.errorname = "ERROR", \ |
148 | } | 166 | } |
149 | 167 | ||
@@ -166,30 +184,6 @@ struct ip6t_error { | |||
166 | #define IP6T_SO_GET_REVISION_TARGET (IP6T_BASE_CTL + 5) | 184 | #define IP6T_SO_GET_REVISION_TARGET (IP6T_BASE_CTL + 5) |
167 | #define IP6T_SO_GET_MAX IP6T_SO_GET_REVISION_TARGET | 185 | #define IP6T_SO_GET_MAX IP6T_SO_GET_REVISION_TARGET |
168 | 186 | ||
169 | /* CONTINUE verdict for targets */ | ||
170 | #define IP6T_CONTINUE XT_CONTINUE | ||
171 | |||
172 | /* For standard target */ | ||
173 | #define IP6T_RETURN XT_RETURN | ||
174 | |||
175 | /* TCP/UDP matching stuff */ | ||
176 | #include <linux/netfilter/xt_tcpudp.h> | ||
177 | |||
178 | #define ip6t_tcp xt_tcp | ||
179 | #define ip6t_udp xt_udp | ||
180 | |||
181 | /* Values for "inv" field in struct ipt_tcp. */ | ||
182 | #define IP6T_TCP_INV_SRCPT XT_TCP_INV_SRCPT | ||
183 | #define IP6T_TCP_INV_DSTPT XT_TCP_INV_DSTPT | ||
184 | #define IP6T_TCP_INV_FLAGS XT_TCP_INV_FLAGS | ||
185 | #define IP6T_TCP_INV_OPTION XT_TCP_INV_OPTION | ||
186 | #define IP6T_TCP_INV_MASK XT_TCP_INV_MASK | ||
187 | |||
188 | /* Values for "invflags" field in struct ipt_udp. */ | ||
189 | #define IP6T_UDP_INV_SRCPT XT_UDP_INV_SRCPT | ||
190 | #define IP6T_UDP_INV_DSTPT XT_UDP_INV_DSTPT | ||
191 | #define IP6T_UDP_INV_MASK XT_UDP_INV_MASK | ||
192 | |||
193 | /* ICMP matching stuff */ | 187 | /* ICMP matching stuff */ |
194 | struct ip6t_icmp { | 188 | struct ip6t_icmp { |
195 | u_int8_t type; /* type to match */ | 189 | u_int8_t type; /* type to match */ |
@@ -203,7 +197,7 @@ struct ip6t_icmp { | |||
203 | /* The argument to IP6T_SO_GET_INFO */ | 197 | /* The argument to IP6T_SO_GET_INFO */ |
204 | struct ip6t_getinfo { | 198 | struct ip6t_getinfo { |
205 | /* Which table: caller fills this in. */ | 199 | /* Which table: caller fills this in. */ |
206 | char name[IP6T_TABLE_MAXNAMELEN]; | 200 | char name[XT_TABLE_MAXNAMELEN]; |
207 | 201 | ||
208 | /* Kernel fills these in. */ | 202 | /* Kernel fills these in. */ |
209 | /* Which hook entry points are valid: bitmask */ | 203 | /* Which hook entry points are valid: bitmask */ |
@@ -225,7 +219,7 @@ struct ip6t_getinfo { | |||
225 | /* The argument to IP6T_SO_SET_REPLACE. */ | 219 | /* The argument to IP6T_SO_SET_REPLACE. */ |
226 | struct ip6t_replace { | 220 | struct ip6t_replace { |
227 | /* Which table. */ | 221 | /* Which table. */ |
228 | char name[IP6T_TABLE_MAXNAMELEN]; | 222 | char name[XT_TABLE_MAXNAMELEN]; |
229 | 223 | ||
230 | /* Which hook entry points are valid: bitmask. You can't | 224 | /* Which hook entry points are valid: bitmask. You can't |
231 | change this. */ | 225 | change this. */ |
@@ -253,13 +247,10 @@ struct ip6t_replace { | |||
253 | struct ip6t_entry entries[0]; | 247 | struct ip6t_entry entries[0]; |
254 | }; | 248 | }; |
255 | 249 | ||
256 | /* The argument to IP6T_SO_ADD_COUNTERS. */ | ||
257 | #define ip6t_counters_info xt_counters_info | ||
258 | |||
259 | /* The argument to IP6T_SO_GET_ENTRIES. */ | 250 | /* The argument to IP6T_SO_GET_ENTRIES. */ |
260 | struct ip6t_get_entries { | 251 | struct ip6t_get_entries { |
261 | /* Which table: user fills this in. */ | 252 | /* Which table: user fills this in. */ |
262 | char name[IP6T_TABLE_MAXNAMELEN]; | 253 | char name[XT_TABLE_MAXNAMELEN]; |
263 | 254 | ||
264 | /* User fills this in: total entry size. */ | 255 | /* User fills this in: total entry size. */ |
265 | unsigned int size; | 256 | unsigned int size; |
@@ -268,28 +259,13 @@ struct ip6t_get_entries { | |||
268 | struct ip6t_entry entrytable[0]; | 259 | struct ip6t_entry entrytable[0]; |
269 | }; | 260 | }; |
270 | 261 | ||
271 | /* Standard return verdict, or do jump. */ | ||
272 | #define IP6T_STANDARD_TARGET XT_STANDARD_TARGET | ||
273 | /* Error verdict. */ | ||
274 | #define IP6T_ERROR_TARGET XT_ERROR_TARGET | ||
275 | |||
276 | /* Helper functions */ | 262 | /* Helper functions */ |
277 | static __inline__ struct ip6t_entry_target * | 263 | static __inline__ struct xt_entry_target * |
278 | ip6t_get_target(struct ip6t_entry *e) | 264 | ip6t_get_target(struct ip6t_entry *e) |
279 | { | 265 | { |
280 | return (void *)e + e->target_offset; | 266 | return (void *)e + e->target_offset; |
281 | } | 267 | } |
282 | 268 | ||
283 | #ifndef __KERNEL__ | ||
284 | /* fn returns 0 to continue iteration */ | ||
285 | #define IP6T_MATCH_ITERATE(e, fn, args...) \ | ||
286 | XT_MATCH_ITERATE(struct ip6t_entry, e, fn, ## args) | ||
287 | |||
288 | /* fn returns 0 to continue iteration */ | ||
289 | #define IP6T_ENTRY_ITERATE(entries, size, fn, args...) \ | ||
290 | XT_ENTRY_ITERATE(struct ip6t_entry, entries, size, fn, ## args) | ||
291 | #endif | ||
292 | |||
293 | /* | 269 | /* |
294 | * Main firewall chains definitions and global var's definitions. | 270 | * Main firewall chains definitions and global var's definitions. |
295 | */ | 271 | */ |
@@ -316,8 +292,6 @@ extern int ip6t_ext_hdr(u8 nexthdr); | |||
316 | extern int ipv6_find_hdr(const struct sk_buff *skb, unsigned int *offset, | 292 | extern int ipv6_find_hdr(const struct sk_buff *skb, unsigned int *offset, |
317 | int target, unsigned short *fragoff); | 293 | int target, unsigned short *fragoff); |
318 | 294 | ||
319 | #define IP6T_ALIGN(s) XT_ALIGN(s) | ||
320 | |||
321 | #ifdef CONFIG_COMPAT | 295 | #ifdef CONFIG_COMPAT |
322 | #include <net/compat.h> | 296 | #include <net/compat.h> |
323 | 297 | ||
@@ -331,14 +305,12 @@ struct compat_ip6t_entry { | |||
331 | unsigned char elems[0]; | 305 | unsigned char elems[0]; |
332 | }; | 306 | }; |
333 | 307 | ||
334 | static inline struct ip6t_entry_target * | 308 | static inline struct xt_entry_target * |
335 | compat_ip6t_get_target(struct compat_ip6t_entry *e) | 309 | compat_ip6t_get_target(struct compat_ip6t_entry *e) |
336 | { | 310 | { |
337 | return (void *)e + e->target_offset; | 311 | return (void *)e + e->target_offset; |
338 | } | 312 | } |
339 | 313 | ||
340 | #define COMPAT_IP6T_ALIGN(s) COMPAT_XT_ALIGN(s) | ||
341 | |||
342 | #endif /* CONFIG_COMPAT */ | 314 | #endif /* CONFIG_COMPAT */ |
343 | #endif /*__KERNEL__*/ | 315 | #endif /*__KERNEL__*/ |
344 | #endif /* _IP6_TABLES_H */ | 316 | #endif /* _IP6_TABLES_H */ |