aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2006-04-06 17:18:09 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2006-04-10 01:25:40 -0400
commitbce8032ef3cc58170ab3550e9e271dba7b4c4764 (patch)
tree13dbdf12a6c567c3292daad4604eb55f7abd167e /include
parenta0aed49bdb2bbb4234789f241cffb607fd2e213d (diff)
[NETFILTER]: Introduce infrastructure for address family specific operations
Change the queue rerouter intrastructure to a generic usable infrastructure for address family specific operations as a base for some cleanups. 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.h23
1 files changed, 16 insertions, 7 deletions
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h
index 5aa931607923..6ee168c4978a 100644
--- a/include/linux/netfilter.h
+++ b/include/linux/netfilter.h
@@ -283,16 +283,25 @@ extern void nf_invalidate_cache(int pf);
283 Returns true or false. */ 283 Returns true or false. */
284extern int skb_make_writable(struct sk_buff **pskb, unsigned int writable_len); 284extern int skb_make_writable(struct sk_buff **pskb, unsigned int writable_len);
285 285
286struct nf_queue_rerouter { 286struct nf_afinfo {
287 void (*save)(const struct sk_buff *skb, struct nf_info *info); 287 unsigned short family;
288 int (*reroute)(struct sk_buff **skb, const struct nf_info *info); 288 void (*saveroute)(const struct sk_buff *skb,
289 int rer_size; 289 struct nf_info *info);
290 int (*reroute)(struct sk_buff **skb,
291 const struct nf_info *info);
292 int route_key_size;
290}; 293};
291 294
292#define nf_info_reroute(x) ((void *)x + sizeof(struct nf_info)) 295extern struct nf_afinfo *nf_afinfo[];
296static inline struct nf_afinfo *nf_get_afinfo(unsigned short family)
297{
298 return rcu_dereference(nf_afinfo[family]);
299}
293 300
294extern int nf_register_queue_rerouter(int pf, struct nf_queue_rerouter *rer); 301extern int nf_register_afinfo(struct nf_afinfo *afinfo);
295extern int nf_unregister_queue_rerouter(int pf); 302extern void nf_unregister_afinfo(struct nf_afinfo *afinfo);
303
304#define nf_info_reroute(x) ((void *)x + sizeof(struct nf_info))
296 305
297#include <net/flow.h> 306#include <net/flow.h>
298extern void (*ip_nat_decode_session)(struct sk_buff *, struct flowi *); 307extern void (*ip_nat_decode_session)(struct sk_buff *, struct flowi *);