• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef _NF_QUEUE_H
2 #define _NF_QUEUE_H
3 
4 /* Each queued (to userspace) skbuff has one of these. */
5 struct nf_queue_entry {
6 	struct list_head	list;
7 	struct sk_buff		*skb;
8 	unsigned int		id;
9 
10 	struct nf_hook_ops	*elem;
11 	u_int8_t		pf;
12 	u16			size; /* sizeof(entry) + saved route keys */
13 	unsigned int		hook;
14 	struct net_device	*indev;
15 	struct net_device	*outdev;
16 	int			(*okfn)(struct sk_buff *);
17 
18 	/* extra space to store route keys */
19 };
20 
21 #define nf_queue_entry_reroute(x) ((void *)x + sizeof(struct nf_queue_entry))
22 
23 /* Packet queuing */
24 struct nf_queue_handler {
25 	int			(*outfn)(struct nf_queue_entry *entry,
26 					 unsigned int queuenum);
27 };
28 
29 void nf_register_queue_handler(const struct nf_queue_handler *qh);
30 void nf_unregister_queue_handler(void);
31 extern void nf_reinject(struct nf_queue_entry *entry, unsigned int verdict);
32 
33 bool nf_queue_entry_get_refs(struct nf_queue_entry *entry);
34 void nf_queue_entry_release_refs(struct nf_queue_entry *entry);
35 
36 #endif /* _NF_QUEUE_H */
37