2006-12-03 06:07:13 +00:00
|
|
|
#ifndef _NF_NAT_CORE_H
|
|
|
|
#define _NF_NAT_CORE_H
|
|
|
|
#include <linux/list.h>
|
|
|
|
#include <net/netfilter/nf_conntrack.h>
|
2007-07-08 05:22:33 +00:00
|
|
|
#include <net/netfilter/nf_nat.h>
|
2006-12-03 06:07:13 +00:00
|
|
|
|
|
|
|
/* This header used to share core functionality between the standalone
|
|
|
|
NAT module, and the compatibility layer's use of NAT for masquerading. */
|
|
|
|
|
2013-09-23 18:37:48 +00:00
|
|
|
unsigned int nf_nat_packet(struct nf_conn *ct, enum ip_conntrack_info ctinfo,
|
|
|
|
unsigned int hooknum, struct sk_buff *skb);
|
2006-12-03 06:07:13 +00:00
|
|
|
|
2013-09-23 18:37:48 +00:00
|
|
|
int nf_xfrm_me_harder(struct sk_buff *skb, unsigned int family);
|
2006-12-03 06:07:13 +00:00
|
|
|
|
|
|
|
static inline int nf_nat_initialized(struct nf_conn *ct,
|
|
|
|
enum nf_nat_manip_type manip)
|
|
|
|
{
|
2011-12-23 12:59:49 +00:00
|
|
|
if (manip == NF_NAT_MANIP_SRC)
|
2011-01-18 14:02:48 +00:00
|
|
|
return ct->status & IPS_SRC_NAT_DONE;
|
2006-12-03 06:07:13 +00:00
|
|
|
else
|
2011-01-18 14:02:48 +00:00
|
|
|
return ct->status & IPS_DST_NAT_DONE;
|
2006-12-03 06:07:13 +00:00
|
|
|
}
|
2008-10-14 18:58:31 +00:00
|
|
|
|
|
|
|
struct nlattr;
|
|
|
|
|
|
|
|
extern int
|
|
|
|
(*nfnetlink_parse_nat_setup_hook)(struct nf_conn *ct,
|
|
|
|
enum nf_nat_manip_type manip,
|
2009-08-25 14:07:58 +00:00
|
|
|
const struct nlattr *attr);
|
2008-10-14 18:58:31 +00:00
|
|
|
|
2006-12-03 06:07:13 +00:00
|
|
|
#endif /* _NF_NAT_CORE_H */
|