/include/net/netfilter/nf_nat_core.h

https://bitbucket.org/thekraven/iscream_thunderc-2.6.35 · C++ Header · 36 lines · 27 code · 7 blank · 2 comment · 2 complexity · bc3eb7e69f0d740a695077080085671d MD5 · raw file

  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. #include <net/netfilter/nf_nat.h>
  6. /* This header used to share core functionality between the standalone
  7. NAT module, and the compatibility layer's use of NAT for masquerading. */
  8. extern unsigned int nf_nat_packet(struct nf_conn *ct,
  9. enum ip_conntrack_info ctinfo,
  10. unsigned int hooknum,
  11. struct sk_buff *skb);
  12. extern int nf_nat_icmp_reply_translation(struct nf_conn *ct,
  13. enum ip_conntrack_info ctinfo,
  14. unsigned int hooknum,
  15. struct sk_buff *skb);
  16. static inline int nf_nat_initialized(struct nf_conn *ct,
  17. enum nf_nat_manip_type manip)
  18. {
  19. if (manip == IP_NAT_MANIP_SRC)
  20. return test_bit(IPS_SRC_NAT_DONE_BIT, &ct->status);
  21. else
  22. return test_bit(IPS_DST_NAT_DONE_BIT, &ct->status);
  23. }
  24. struct nlattr;
  25. extern int
  26. (*nfnetlink_parse_nat_setup_hook)(struct nf_conn *ct,
  27. enum nf_nat_manip_type manip,
  28. const struct nlattr *attr);
  29. #endif /* _NF_NAT_CORE_H */