entry_port_cfg_st.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /* Copyright (c) 2001 Matej Pfajfar.
  2. * Copyright (c) 2001-2004, Roger Dingledine.
  3. * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
  4. * Copyright (c) 2007-2019, The Tor Project, Inc. */
  5. /* See LICENSE for licensing information */
  6. #ifndef ENTRY_PORT_CFG_ST_H
  7. #define ENTRY_PORT_CFG_ST_H
  8. #include "lib/cc/torint.h"
  9. #include "core/or/or.h"
  10. struct entry_port_cfg_t {
  11. /* Client port types (socks, dns, trans, natd) only: */
  12. uint8_t isolation_flags; /**< Zero or more isolation flags */
  13. int session_group; /**< A session group, or -1 if this port is not in a
  14. * session group. */
  15. /* Socks only: */
  16. /** When both no-auth and user/pass are advertised by a SOCKS client, select
  17. * no-auth. */
  18. unsigned int socks_prefer_no_auth : 1;
  19. /** When ISO_SOCKSAUTH is in use, Keep-Alive circuits indefinitely. */
  20. unsigned int socks_iso_keep_alive : 1;
  21. /* Client port types only: */
  22. unsigned int ipv4_traffic : 1;
  23. unsigned int ipv6_traffic : 1;
  24. unsigned int prefer_ipv6 : 1;
  25. unsigned int dns_request : 1;
  26. unsigned int onion_traffic : 1;
  27. /** For a socks listener: should we cache IPv4/IPv6 DNS information that
  28. * exit nodes tell us?
  29. *
  30. * @{ */
  31. unsigned int cache_ipv4_answers : 1;
  32. unsigned int cache_ipv6_answers : 1;
  33. /** @} */
  34. /** For a socks listeners: if we find an answer in our client-side DNS cache,
  35. * should we use it?
  36. *
  37. * @{ */
  38. unsigned int use_cached_ipv4_answers : 1;
  39. unsigned int use_cached_ipv6_answers : 1;
  40. /** @} */
  41. /** For socks listeners: When we can automap an address to IPv4 or IPv6,
  42. * do we prefer IPv6? */
  43. unsigned int prefer_ipv6_virtaddr : 1;
  44. };
  45. #endif