Merge git://git.infradead.org/hdrcleanup-2.6
[linux-2.6.git] / include / linux / netfilter_ipv4 / ip_nat_helper.h
1 #ifndef _IP_NAT_HELPER_H
2 #define _IP_NAT_HELPER_H
3 /* NAT protocol helper routines. */
4
5 #include <linux/netfilter_ipv4/ip_conntrack.h>
6 #include <linux/module.h>
7
8 struct sk_buff;
9
10 /* These return true or false. */
11 extern int ip_nat_mangle_tcp_packet(struct sk_buff **skb,
12                                 struct ip_conntrack *ct,
13                                 enum ip_conntrack_info ctinfo,
14                                 unsigned int match_offset,
15                                 unsigned int match_len,
16                                 const char *rep_buffer,
17                                 unsigned int rep_len);
18 extern int ip_nat_mangle_udp_packet(struct sk_buff **skb,
19                                 struct ip_conntrack *ct,
20                                 enum ip_conntrack_info ctinfo,
21                                 unsigned int match_offset,
22                                 unsigned int match_len,
23                                 const char *rep_buffer,
24                                 unsigned int rep_len);
25 extern int ip_nat_seq_adjust(struct sk_buff **pskb, 
26                              struct ip_conntrack *ct, 
27                              enum ip_conntrack_info ctinfo);
28
29 /* Setup NAT on this expected conntrack so it follows master, but goes
30  * to port ct->master->saved_proto. */
31 extern void ip_nat_follow_master(struct ip_conntrack *ct,
32                                  struct ip_conntrack_expect *this);
33 #endif