diff options
author | David S. Miller <davem@davemloft.net> | 2010-05-13 17:14:10 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-05-13 17:14:10 -0400 |
commit | e7874c996b8591f59d78efa519031dab5b58723b (patch) | |
tree | 14aa8dea0c33de9d22ef8177fb242c9d80d693de /include | |
parent | 4a6346d4ea63b5e1390babf22f1cc0f113d8082b (diff) | |
parent | 736d58e3a2245ac2779fe0f278f8735bcf33ca8d (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-next-2.6
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/netfilter/x_tables.h | 45 |
1 files changed, 19 insertions, 26 deletions
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h index eeb4884c30be..c2ee5d8550cf 100644 --- a/include/linux/netfilter/x_tables.h +++ b/include/linux/netfilter/x_tables.h | |||
@@ -183,29 +183,39 @@ struct xt_counters_info { | |||
183 | #include <linux/netdevice.h> | 183 | #include <linux/netdevice.h> |
184 | 184 | ||
185 | /** | 185 | /** |
186 | * struct xt_match_param - parameters for match extensions' match functions | 186 | * struct xt_action_param - parameters for matches/targets |
187 | * | 187 | * |
188 | * @match: the match extension | ||
189 | * @target: the target extension | ||
190 | * @matchinfo: per-match data | ||
191 | * @targetinfo: per-target data | ||
188 | * @in: input netdevice | 192 | * @in: input netdevice |
189 | * @out: output netdevice | 193 | * @out: output netdevice |
190 | * @match: struct xt_match through which this function was invoked | ||
191 | * @matchinfo: per-match data | ||
192 | * @fragoff: packet is a fragment, this is the data offset | 194 | * @fragoff: packet is a fragment, this is the data offset |
193 | * @thoff: position of transport header relative to skb->data | 195 | * @thoff: position of transport header relative to skb->data |
194 | * @hook: hook number given packet came from | 196 | * @hook: hook number given packet came from |
195 | * @family: Actual NFPROTO_* through which the function is invoked | 197 | * @family: Actual NFPROTO_* through which the function is invoked |
196 | * (helpful when match->family == NFPROTO_UNSPEC) | 198 | * (helpful when match->family == NFPROTO_UNSPEC) |
199 | * | ||
200 | * Fields written to by extensions: | ||
201 | * | ||
197 | * @hotdrop: drop packet if we had inspection problems | 202 | * @hotdrop: drop packet if we had inspection problems |
198 | * Network namespace obtainable using dev_net(in/out) | 203 | * Network namespace obtainable using dev_net(in/out) |
199 | */ | 204 | */ |
200 | struct xt_match_param { | 205 | struct xt_action_param { |
206 | union { | ||
207 | const struct xt_match *match; | ||
208 | const struct xt_target *target; | ||
209 | }; | ||
210 | union { | ||
211 | const void *matchinfo, *targinfo; | ||
212 | }; | ||
201 | const struct net_device *in, *out; | 213 | const struct net_device *in, *out; |
202 | const struct xt_match *match; | ||
203 | const void *matchinfo; | ||
204 | int fragoff; | 214 | int fragoff; |
205 | unsigned int thoff; | 215 | unsigned int thoff; |
206 | unsigned int hooknum; | 216 | unsigned int hooknum; |
207 | u_int8_t family; | 217 | u_int8_t family; |
208 | bool *hotdrop; | 218 | bool hotdrop; |
209 | }; | 219 | }; |
210 | 220 | ||
211 | /** | 221 | /** |
@@ -243,23 +253,6 @@ struct xt_mtdtor_param { | |||
243 | }; | 253 | }; |
244 | 254 | ||
245 | /** | 255 | /** |
246 | * struct xt_target_param - parameters for target extensions' target functions | ||
247 | * | ||
248 | * @hooknum: hook through which this target was invoked | ||
249 | * @target: struct xt_target through which this function was invoked | ||
250 | * @targinfo: per-target data | ||
251 | * | ||
252 | * Other fields see above. | ||
253 | */ | ||
254 | struct xt_target_param { | ||
255 | const struct net_device *in, *out; | ||
256 | const struct xt_target *target; | ||
257 | const void *targinfo; | ||
258 | unsigned int hooknum; | ||
259 | u_int8_t family; | ||
260 | }; | ||
261 | |||
262 | /** | ||
263 | * struct xt_tgchk_param - parameters for target extensions' | 256 | * struct xt_tgchk_param - parameters for target extensions' |
264 | * checkentry functions | 257 | * checkentry functions |
265 | * | 258 | * |
@@ -298,7 +291,7 @@ struct xt_match { | |||
298 | non-linear skb, using skb_header_pointer and | 291 | non-linear skb, using skb_header_pointer and |
299 | skb_ip_make_writable. */ | 292 | skb_ip_make_writable. */ |
300 | bool (*match)(const struct sk_buff *skb, | 293 | bool (*match)(const struct sk_buff *skb, |
301 | const struct xt_match_param *); | 294 | struct xt_action_param *); |
302 | 295 | ||
303 | /* Called when user tries to insert an entry of this type. */ | 296 | /* Called when user tries to insert an entry of this type. */ |
304 | int (*checkentry)(const struct xt_mtchk_param *); | 297 | int (*checkentry)(const struct xt_mtchk_param *); |
@@ -335,7 +328,7 @@ struct xt_target { | |||
335 | must now handle non-linear skbs, using skb_copy_bits and | 328 | must now handle non-linear skbs, using skb_copy_bits and |
336 | skb_ip_make_writable. */ | 329 | skb_ip_make_writable. */ |
337 | unsigned int (*target)(struct sk_buff *skb, | 330 | unsigned int (*target)(struct sk_buff *skb, |
338 | const struct xt_target_param *); | 331 | const struct xt_action_param *); |
339 | 332 | ||
340 | /* Called when user tries to insert an entry of this type: | 333 | /* Called when user tries to insert an entry of this type: |
341 | hook_mask is a bitmask of hooks from which it can be | 334 | hook_mask is a bitmask of hooks from which it can be |