aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2007-12-05 04:24:48 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 17:56:10 -0500
commitc01cd429fc118c5db92475c5f08b307718aa4efc (patch)
tree9428982e5b996c73071ea70b8f280d030e53a51e /include
parentf9d8928f8340ab8e76f1da4799cb19a6ff58b83d (diff)
[NETFILTER]: nf_queue: move queueing related functions/struct to seperate header
Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/netfilter.h32
-rw-r--r--include/net/netfilter/nf_queue.h32
2 files changed, 34 insertions, 30 deletions
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h
index 1ba60112ab83..5fe4ef401cc8 100644
--- a/include/linux/netfilter.h
+++ b/include/linux/netfilter.h
@@ -101,19 +101,6 @@ struct nf_sockopt_ops
101 struct module *owner; 101 struct module *owner;
102}; 102};
103 103
104/* Each queued (to userspace) skbuff has one of these. */
105struct nf_info
106{
107 /* The ops struct which sent us to userspace. */
108 struct nf_hook_ops *elem;
109
110 /* If we're sent to userspace, this keeps housekeeping info */
111 int pf;
112 unsigned int hook;
113 struct net_device *indev, *outdev;
114 int (*okfn)(struct sk_buff *);
115};
116
117/* Function to register/unregister hook points. */ 104/* Function to register/unregister hook points. */
118int nf_register_hook(struct nf_hook_ops *reg); 105int nf_register_hook(struct nf_hook_ops *reg);
119void nf_unregister_hook(struct nf_hook_ops *reg); 106void nf_unregister_hook(struct nf_hook_ops *reg);
@@ -274,21 +261,6 @@ int compat_nf_setsockopt(struct sock *sk, int pf, int optval,
274int compat_nf_getsockopt(struct sock *sk, int pf, int optval, 261int compat_nf_getsockopt(struct sock *sk, int pf, int optval,
275 char __user *opt, int *len); 262 char __user *opt, int *len);
276 263
277/* Packet queuing */
278struct nf_queue_handler {
279 int (*outfn)(struct sk_buff *skb, struct nf_info *info,
280 unsigned int queuenum);
281 char *name;
282};
283extern int nf_register_queue_handler(int pf,
284 const struct nf_queue_handler *qh);
285extern int nf_unregister_queue_handler(int pf,
286 const struct nf_queue_handler *qh);
287extern void nf_unregister_queue_handlers(const struct nf_queue_handler *qh);
288extern void nf_reinject(struct sk_buff *skb,
289 struct nf_info *info,
290 unsigned int verdict);
291
292/* FIXME: Before cache is ever used, this must be implemented for real. */ 264/* FIXME: Before cache is ever used, this must be implemented for real. */
293extern void nf_invalidate_cache(int pf); 265extern void nf_invalidate_cache(int pf);
294 266
@@ -298,6 +270,8 @@ extern void nf_invalidate_cache(int pf);
298extern int skb_make_writable(struct sk_buff *skb, unsigned int writable_len); 270extern int skb_make_writable(struct sk_buff *skb, unsigned int writable_len);
299 271
300struct flowi; 272struct flowi;
273struct nf_info;
274
301struct nf_afinfo { 275struct nf_afinfo {
302 unsigned short family; 276 unsigned short family;
303 __sum16 (*checksum)(struct sk_buff *skb, unsigned int hook, 277 __sum16 (*checksum)(struct sk_buff *skb, unsigned int hook,
@@ -334,8 +308,6 @@ nf_checksum(struct sk_buff *skb, unsigned int hook, unsigned int dataoff,
334extern int nf_register_afinfo(struct nf_afinfo *afinfo); 308extern int nf_register_afinfo(struct nf_afinfo *afinfo);
335extern void nf_unregister_afinfo(struct nf_afinfo *afinfo); 309extern void nf_unregister_afinfo(struct nf_afinfo *afinfo);
336 310
337#define nf_info_reroute(x) ((void *)x + sizeof(struct nf_info))
338
339#include <net/flow.h> 311#include <net/flow.h>
340extern void (*ip_nat_decode_session)(struct sk_buff *, struct flowi *); 312extern void (*ip_nat_decode_session)(struct sk_buff *, struct flowi *);
341 313
diff --git a/include/net/netfilter/nf_queue.h b/include/net/netfilter/nf_queue.h
new file mode 100644
index 000000000000..8c6b382fd865
--- /dev/null
+++ b/include/net/netfilter/nf_queue.h
@@ -0,0 +1,32 @@
1#ifndef _NF_QUEUE_H
2#define _NF_QUEUE_H
3
4/* Each queued (to userspace) skbuff has one of these. */
5struct nf_info {
6 struct nf_hook_ops *elem;
7 int pf;
8 unsigned int hook;
9 struct net_device *indev;
10 struct net_device *outdev;
11 int (*okfn)(struct sk_buff *);
12};
13
14#define nf_info_reroute(x) ((void *)x + sizeof(struct nf_info))
15
16/* Packet queuing */
17struct nf_queue_handler {
18 int (*outfn)(struct sk_buff *skb,
19 struct nf_info *info,
20 unsigned int queuenum);
21 char *name;
22};
23
24extern int nf_register_queue_handler(int pf,
25 const struct nf_queue_handler *qh);
26extern int nf_unregister_queue_handler(int pf,
27 const struct nf_queue_handler *qh);
28extern void nf_unregister_queue_handlers(const struct nf_queue_handler *qh);
29extern void nf_reinject(struct sk_buff *skb, struct nf_info *info,
30 unsigned int verdict);
31
32#endif /* _NF_QUEUE_H */