diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/or/config.c | 1 | ||||
-rw-r--r-- | src/or/connection.c | 1 | ||||
-rw-r--r-- | src/or/connection_edge.c | 1 | ||||
-rw-r--r-- | src/or/dns.c | 1 | ||||
-rw-r--r-- | src/or/dns.h | 31 | ||||
-rw-r--r-- | src/or/main.c | 1 | ||||
-rw-r--r-- | src/or/or.h | 17 | ||||
-rw-r--r-- | src/or/router.c | 1 |
8 files changed, 37 insertions, 17 deletions
diff --git a/src/or/config.c b/src/or/config.c index 70cadaa0a1..eed14f2fe5 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -21,6 +21,7 @@ #include "cpuworker.h" #include "dirserv.h" #include "dirvote.h" +#include "dns.h" #include "geoip.h" #include "rendclient.h" #include "rendservice.h" diff --git a/src/or/connection.c b/src/or/connection.c index 522b5ff771..51ee9f4724 100644 --- a/src/or/connection.c +++ b/src/or/connection.c @@ -23,6 +23,7 @@ #include "cpuworker.h" #include "directory.h" #include "dirserv.h" +#include "dns.h" #include "dnsserv.h" #include "geoip.h" #include "rendclient.h" diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index 44c48c6e1e..0277b88d1b 100644 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@ -18,6 +18,7 @@ #include "connection_edge.h" #include "connection_or.h" #include "control.h" +#include "dns.h" #include "dnsserv.h" #include "dirserv.h" #include "rendclient.h" diff --git a/src/or/dns.c b/src/or/dns.c index 77dc97c8bf..d7184f6e96 100644 --- a/src/or/dns.c +++ b/src/or/dns.c @@ -18,6 +18,7 @@ #include "connection.h" #include "connection_edge.h" #include "control.h" +#include "dns.h" #include "router.h" #include "ht.h" #ifdef HAVE_EVENT2_DNS_H diff --git a/src/or/dns.h b/src/or/dns.h new file mode 100644 index 0000000000..c4fd4d1fb7 --- /dev/null +++ b/src/or/dns.h @@ -0,0 +1,31 @@ +/* Copyright (c) 2001 Matej Pfajfar. + * Copyright (c) 2001-2004, Roger Dingledine. + * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson. + * Copyright (c) 2007-2010, The Tor Project, Inc. */ +/* See LICENSE for licensing information */ + +/** + * \file dns.h + * \brief Header file for dns.c. + **/ + +#ifndef _TOR_DNS_H +#define _TOR_DNS_H + +int dns_init(void); +int has_dns_init_failed(void); +void dns_free_all(void); +uint32_t dns_clip_ttl(uint32_t ttl); +int dns_reset(void); +void connection_dns_remove(edge_connection_t *conn); +void assert_connection_edge_not_dns_pending(edge_connection_t *conn); +void assert_all_pending_dns_resolves_ok(void); +void dns_cancel_pending_resolve(const char *question); +int dns_resolve(edge_connection_t *exitconn); +void dns_launch_correctness_checks(void); +int dns_seems_to_be_broken(void); +void dns_reset_correctness_checks(void); +void dump_dns_mem_usage(int severity); + +#endif + diff --git a/src/or/main.c b/src/or/main.c index e77359c4df..d42cda27a0 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -26,6 +26,7 @@ #include "directory.h" #include "dirserv.h" #include "dirvote.h" +#include "dns.h" #include "dnsserv.h" #include "geoip.h" #include "rendclient.h" diff --git a/src/or/or.h b/src/or/or.h index b56837200a..828908e666 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -3197,23 +3197,6 @@ typedef struct vote_timing_t { int dist_delay; } vote_timing_t; -/********************************* dns.c ***************************/ - -int dns_init(void); -int has_dns_init_failed(void); -void dns_free_all(void); -uint32_t dns_clip_ttl(uint32_t ttl); -int dns_reset(void); -void connection_dns_remove(edge_connection_t *conn); -void assert_connection_edge_not_dns_pending(edge_connection_t *conn); -void assert_all_pending_dns_resolves_ok(void); -void dns_cancel_pending_resolve(const char *question); -int dns_resolve(edge_connection_t *exitconn); -void dns_launch_correctness_checks(void); -int dns_seems_to_be_broken(void); -void dns_reset_correctness_checks(void); -void dump_dns_mem_usage(int severity); - /********************************* geoip.c **************************/ /** Round all GeoIP results to the next multiple of this value, to avoid diff --git a/src/or/router.c b/src/or/router.c index a424bf5d1e..44cffa4a36 100644 --- a/src/or/router.c +++ b/src/or/router.c @@ -14,6 +14,7 @@ #include "control.h" #include "directory.h" #include "dirserv.h" +#include "dns.h" #include "geoip.h" #include "router.h" #include "routerlist.h" |