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