diff options
author | Jan Engelhardt <jengelh@medozas.de> | 2008-10-08 05:35:19 -0400 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2008-10-08 05:35:19 -0400 |
commit | 7eb3558655aaa87a3e71a0c065dfaddda521fa6d (patch) | |
tree | 724466c66c96f14b0378fab87040d8393bc05c8b /include/linux | |
parent | 6be3d8598e883fb632edf059ba2f8d1b9f4da138 (diff) |
netfilter: xtables: move extension arguments into compound structure (4/6)
This patch does this for target extensions' target functions.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/netfilter/x_tables.h | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h index c79c88380149..46d0cb1ad340 100644 --- a/include/linux/netfilter/x_tables.h +++ b/include/linux/netfilter/x_tables.h | |||
@@ -218,6 +218,22 @@ struct xt_mtdtor_param { | |||
218 | void *matchinfo; | 218 | void *matchinfo; |
219 | }; | 219 | }; |
220 | 220 | ||
221 | /** | ||
222 | * struct xt_target_param - parameters for target extensions' target functions | ||
223 | * | ||
224 | * @hooknum: hook through which this target was invoked | ||
225 | * @target: struct xt_target through which this function was invoked | ||
226 | * @targinfo: per-target data | ||
227 | * | ||
228 | * Other fields see above. | ||
229 | */ | ||
230 | struct xt_target_param { | ||
231 | const struct net_device *in, *out; | ||
232 | unsigned int hooknum; | ||
233 | const struct xt_target *target; | ||
234 | const void *targinfo; | ||
235 | }; | ||
236 | |||
221 | struct xt_match | 237 | struct xt_match |
222 | { | 238 | { |
223 | struct list_head list; | 239 | struct list_head list; |
@@ -269,11 +285,7 @@ struct xt_target | |||
269 | must now handle non-linear skbs, using skb_copy_bits and | 285 | must now handle non-linear skbs, using skb_copy_bits and |
270 | skb_ip_make_writable. */ | 286 | skb_ip_make_writable. */ |
271 | unsigned int (*target)(struct sk_buff *skb, | 287 | unsigned int (*target)(struct sk_buff *skb, |
272 | const struct net_device *in, | 288 | const struct xt_target_param *); |
273 | const struct net_device *out, | ||
274 | unsigned int hooknum, | ||
275 | const struct xt_target *target, | ||
276 | const void *targinfo); | ||
277 | 289 | ||
278 | /* Called when user tries to insert an entry of this type: | 290 | /* Called when user tries to insert an entry of this type: |
279 | hook_mask is a bitmask of hooks from which it can be | 291 | hook_mask is a bitmask of hooks from which it can be |