2007-12-05 02:24:48 -07:00
|
|
|
#ifndef _NF_QUEUE_H
|
|
|
|
#define _NF_QUEUE_H
|
|
|
|
|
|
|
|
/* Each queued (to userspace) skbuff has one of these. */
|
2007-12-05 02:26:33 -07:00
|
|
|
struct nf_queue_entry {
|
|
|
|
struct list_head list;
|
|
|
|
struct sk_buff *skb;
|
|
|
|
unsigned int id;
|
|
|
|
|
2007-12-05 02:24:48 -07:00
|
|
|
struct nf_hook_ops *elem;
|
2008-10-08 03:35:00 -06:00
|
|
|
u_int8_t pf;
|
2013-04-18 22:58:25 -06:00
|
|
|
u16 size; /* sizeof(entry) + saved route keys */
|
2007-12-05 02:24:48 -07:00
|
|
|
unsigned int hook;
|
|
|
|
struct net_device *indev;
|
|
|
|
struct net_device *outdev;
|
|
|
|
int (*okfn)(struct sk_buff *);
|
2013-04-18 22:58:25 -06:00
|
|
|
|
|
|
|
/* extra space to store route keys */
|
2007-12-05 02:24:48 -07:00
|
|
|
};
|
|
|
|
|
2007-12-05 02:26:33 -07:00
|
|
|
#define nf_queue_entry_reroute(x) ((void *)x + sizeof(struct nf_queue_entry))
|
2007-12-05 02:24:48 -07:00
|
|
|
|
|
|
|
/* Packet queuing */
|
|
|
|
struct nf_queue_handler {
|
2007-12-05 02:26:33 -07:00
|
|
|
int (*outfn)(struct nf_queue_entry *entry,
|
2007-12-05 02:24:48 -07:00
|
|
|
unsigned int queuenum);
|
|
|
|
};
|
|
|
|
|
2012-11-22 23:22:21 -07:00
|
|
|
void nf_register_queue_handler(const struct nf_queue_handler *qh);
|
|
|
|
void nf_unregister_queue_handler(void);
|
2007-12-05 02:26:33 -07:00
|
|
|
extern void nf_reinject(struct nf_queue_entry *entry, unsigned int verdict);
|
2007-12-05 02:24:48 -07:00
|
|
|
|
2013-04-18 22:58:25 -06:00
|
|
|
bool nf_queue_entry_get_refs(struct nf_queue_entry *entry);
|
|
|
|
void nf_queue_entry_release_refs(struct nf_queue_entry *entry);
|
|
|
|
|
2007-12-05 02:24:48 -07:00
|
|
|
#endif /* _NF_QUEUE_H */
|