nf_nat_core.h 841 B

123456789101112131415161718192021222324252627
  1. #ifndef _NF_NAT_CORE_H
  2. #define _NF_NAT_CORE_H
  3. #include <linux/list.h>
  4. #include <net/netfilter/nf_conntrack.h>
  5. /* This header used to share core functionality between the standalone
  6. NAT module, and the compatibility layer's use of NAT for masquerading. */
  7. extern unsigned int nf_nat_packet(struct nf_conn *ct,
  8. enum ip_conntrack_info ctinfo,
  9. unsigned int hooknum,
  10. struct sk_buff **pskb);
  11. extern int nf_nat_icmp_reply_translation(struct nf_conn *ct,
  12. enum ip_conntrack_info ctinfo,
  13. unsigned int hooknum,
  14. struct sk_buff **pskb);
  15. static inline int nf_nat_initialized(struct nf_conn *ct,
  16. enum nf_nat_manip_type manip)
  17. {
  18. if (manip == IP_NAT_MANIP_SRC)
  19. return test_bit(IPS_SRC_NAT_DONE_BIT, &ct->status);
  20. else
  21. return test_bit(IPS_DST_NAT_DONE_BIT, &ct->status);
  22. }
  23. #endif /* _NF_NAT_CORE_H */