dns.h 951 B

1234567891011121314151617181920212223242526272829303132
  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-2013, The Tor Project, Inc. */
  5. /* See LICENSE for licensing information */
  6. /**
  7. * \file dns.h
  8. * \brief Header file for dns.c.
  9. **/
  10. #ifndef TOR_DNS_H
  11. #define TOR_DNS_H
  12. int dns_init(void);
  13. int has_dns_init_failed(void);
  14. void dns_free_all(void);
  15. uint32_t dns_clip_ttl(uint32_t ttl);
  16. int dns_reset(void);
  17. void connection_dns_remove(edge_connection_t *conn);
  18. void assert_connection_edge_not_dns_pending(edge_connection_t *conn);
  19. void assert_all_pending_dns_resolves_ok(void);
  20. void dns_cancel_pending_resolve(const char *question);
  21. int dns_resolve(edge_connection_t *exitconn);
  22. void dns_launch_correctness_checks(void);
  23. int dns_seems_to_be_broken(void);
  24. int dns_seems_to_be_broken_for_ipv6(void);
  25. void dns_reset_correctness_checks(void);
  26. void dump_dns_mem_usage(int severity);
  27. #endif