dns.h 910 B

12345678910111213141516171819202122232425262728293031
  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-2012, 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. void dns_reset_correctness_checks(void);
  25. void dump_dns_mem_usage(int severity);
  26. #endif