blob: ec98ecf95fc8ff9ce71f31d23d84a5a5149e843e [file] [log] [blame]
Jozsef Kadlecsik5b1158e2006-12-02 22:07:13 -08001#ifndef _NF_NAT_HELPER_H
2#define _NF_NAT_HELPER_H
3/* NAT protocol helper routines. */
4
5#include <net/netfilter/nf_conntrack.h>
6
7struct sk_buff;
8
9/* These return true or false. */
10extern int nf_nat_mangle_tcp_packet(struct sk_buff **skb,
11 struct nf_conn *ct,
12 enum ip_conntrack_info ctinfo,
13 unsigned int match_offset,
14 unsigned int match_len,
15 const char *rep_buffer,
16 unsigned int rep_len);
17extern int nf_nat_mangle_udp_packet(struct sk_buff **skb,
18 struct nf_conn *ct,
19 enum ip_conntrack_info ctinfo,
20 unsigned int match_offset,
21 unsigned int match_len,
22 const char *rep_buffer,
23 unsigned int rep_len);
24extern int nf_nat_seq_adjust(struct sk_buff **pskb,
25 struct nf_conn *ct,
26 enum ip_conntrack_info ctinfo);
27
28/* Setup NAT on this expected conntrack so it follows master, but goes
29 * to port ct->master->saved_proto. */
30extern void nf_nat_follow_master(struct nf_conn *ct,
31 struct nf_conntrack_expect *this);
32#endif