X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Flinux%2Fnetfilter_ipv4%2Fip_nat_helper.h;h=bf9cb105c8856ba4033079c73c05f06876fac6c3;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=b34e4ce9ee6a5c23596841dede9a1cedc20d0a55;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/include/linux/netfilter_ipv4/ip_nat_helper.h b/include/linux/netfilter_ipv4/ip_nat_helper.h index b34e4ce9e..bf9cb105c 100644 --- a/include/linux/netfilter_ipv4/ip_nat_helper.h +++ b/include/linux/netfilter_ipv4/ip_nat_helper.h @@ -7,46 +7,6 @@ struct sk_buff; -/* Flags */ -/* NAT helper must be called on every packet (for TCP) */ -#define IP_NAT_HELPER_F_ALWAYS 0x01 - -struct ip_nat_helper -{ - struct list_head list; /* Internal use */ - - const char *name; /* name of the module */ - unsigned char flags; /* Flags (see above) */ - struct module *me; /* pointer to self */ - - /* Mask of things we will help: vs. tuple from server */ - struct ip_conntrack_tuple tuple; - struct ip_conntrack_tuple mask; - - /* Helper function: returns verdict */ - unsigned int (*help)(struct ip_conntrack *ct, - struct ip_conntrack_expect *exp, - struct ip_nat_info *info, - enum ip_conntrack_info ctinfo, - unsigned int hooknum, - struct sk_buff **pskb); - - /* Returns verdict and sets up NAT for this connection */ - unsigned int (*expect)(struct sk_buff **pskb, - unsigned int hooknum, - struct ip_conntrack *ct, - struct ip_nat_info *info); -}; - -extern int ip_nat_helper_register(struct ip_nat_helper *me); -extern void ip_nat_helper_unregister(struct ip_nat_helper *me); - -extern struct ip_nat_helper * -ip_nat_find_helper(const struct ip_conntrack_tuple *tuple); - -extern struct ip_nat_helper * -__ip_nat_find_helper(const struct ip_conntrack_tuple *tuple); - /* These return true or false. */ extern int ip_nat_mangle_tcp_packet(struct sk_buff **skb, struct ip_conntrack *ct, @@ -65,4 +25,9 @@ extern int ip_nat_mangle_udp_packet(struct sk_buff **skb, extern int ip_nat_seq_adjust(struct sk_buff **pskb, struct ip_conntrack *ct, enum ip_conntrack_info ctinfo); + +/* Setup NAT on this expected conntrack so it follows master, but goes + * to port ct->master->saved_proto. */ +extern void ip_nat_follow_master(struct ip_conntrack *ct, + struct ip_conntrack_expect *this); #endif