Patrick McHardy | c01cd42 | 2007-12-05 01:24:48 -0800 | [diff] [blame] | 1 | #ifndef _NF_QUEUE_H |
| 2 | #define _NF_QUEUE_H |
| 3 | |
| 4 | /* Each queued (to userspace) skbuff has one of these. */ |
Patrick McHardy | 02f014d | 2007-12-05 01:26:33 -0800 | [diff] [blame] | 5 | struct nf_queue_entry { |
| 6 | struct list_head list; |
| 7 | struct sk_buff *skb; |
| 8 | unsigned int id; |
| 9 | |
Patrick McHardy | c01cd42 | 2007-12-05 01:24:48 -0800 | [diff] [blame] | 10 | struct nf_hook_ops *elem; |
Jan Engelhardt | 76108ce | 2008-10-08 11:35:00 +0200 | [diff] [blame] | 11 | u_int8_t pf; |
Patrick McHardy | c01cd42 | 2007-12-05 01:24:48 -0800 | [diff] [blame] | 12 | unsigned int hook; |
| 13 | struct net_device *indev; |
| 14 | struct net_device *outdev; |
| 15 | int (*okfn)(struct sk_buff *); |
| 16 | }; |
| 17 | |
Patrick McHardy | 02f014d | 2007-12-05 01:26:33 -0800 | [diff] [blame] | 18 | #define nf_queue_entry_reroute(x) ((void *)x + sizeof(struct nf_queue_entry)) |
Patrick McHardy | c01cd42 | 2007-12-05 01:24:48 -0800 | [diff] [blame] | 19 | |
| 20 | /* Packet queuing */ |
| 21 | struct nf_queue_handler { |
Patrick McHardy | 02f014d | 2007-12-05 01:26:33 -0800 | [diff] [blame] | 22 | int (*outfn)(struct nf_queue_entry *entry, |
Patrick McHardy | c01cd42 | 2007-12-05 01:24:48 -0800 | [diff] [blame] | 23 | unsigned int queuenum); |
| 24 | char *name; |
| 25 | }; |
| 26 | |
Jan Engelhardt | 76108ce | 2008-10-08 11:35:00 +0200 | [diff] [blame] | 27 | extern int nf_register_queue_handler(u_int8_t pf, |
Patrick McHardy | c01cd42 | 2007-12-05 01:24:48 -0800 | [diff] [blame] | 28 | const struct nf_queue_handler *qh); |
Jan Engelhardt | 76108ce | 2008-10-08 11:35:00 +0200 | [diff] [blame] | 29 | extern int nf_unregister_queue_handler(u_int8_t pf, |
Patrick McHardy | c01cd42 | 2007-12-05 01:24:48 -0800 | [diff] [blame] | 30 | const struct nf_queue_handler *qh); |
| 31 | extern void nf_unregister_queue_handlers(const struct nf_queue_handler *qh); |
Patrick McHardy | 02f014d | 2007-12-05 01:26:33 -0800 | [diff] [blame] | 32 | extern void nf_reinject(struct nf_queue_entry *entry, unsigned int verdict); |
Patrick McHardy | c01cd42 | 2007-12-05 01:24:48 -0800 | [diff] [blame] | 33 | |
| 34 | #endif /* _NF_QUEUE_H */ |