Commit | Line | Data |
---|---|---|
5b1158e9 JK |
1 | #ifndef _NF_NAT_CORE_H |
2 | #define _NF_NAT_CORE_H | |
3 | #include <linux/list.h> | |
4 | #include <net/netfilter/nf_conntrack.h> | |
4ba88779 | 5 | #include <net/netfilter/nf_nat.h> |
5b1158e9 JK |
6 | |
7 | /* This header used to share core functionality between the standalone | |
8 | NAT module, and the compatibility layer's use of NAT for masquerading. */ | |
9 | ||
10 | extern unsigned int nf_nat_packet(struct nf_conn *ct, | |
11 | enum ip_conntrack_info ctinfo, | |
12 | unsigned int hooknum, | |
3db05fea | 13 | struct sk_buff *skb); |
5b1158e9 JK |
14 | |
15 | extern int nf_nat_icmp_reply_translation(struct nf_conn *ct, | |
16 | enum ip_conntrack_info ctinfo, | |
17 | unsigned int hooknum, | |
3db05fea | 18 | struct sk_buff *skb); |
5b1158e9 JK |
19 | |
20 | static inline int nf_nat_initialized(struct nf_conn *ct, | |
21 | enum nf_nat_manip_type manip) | |
22 | { | |
23 | if (manip == IP_NAT_MANIP_SRC) | |
a7c2f4d7 | 24 | return ct->status & IPS_SRC_NAT_DONE; |
5b1158e9 | 25 | else |
a7c2f4d7 | 26 | return ct->status & IPS_DST_NAT_DONE; |
5b1158e9 | 27 | } |
e6a7d3c0 PNA |
28 | |
29 | struct nlattr; | |
30 | ||
31 | extern int | |
32 | (*nfnetlink_parse_nat_setup_hook)(struct nf_conn *ct, | |
33 | enum nf_nat_manip_type manip, | |
39938324 | 34 | const struct nlattr *attr); |
e6a7d3c0 | 35 | |
5b1158e9 | 36 | #endif /* _NF_NAT_CORE_H */ |