15 #ifdef HAVE_MODULE_RELAY
26 size_t dns_cache_total_allocation(
void);
28 size_t dns_cache_handle_oom(time_t now,
size_t min_remove_bytes);
37 #define dns_init() (0)
38 #define dns_seems_to_be_broken() (0)
39 #define has_dns_init_failed() (0)
40 #define dns_cache_total_allocation() (0)
42 #define dns_reset_correctness_checks() STMT_NIL
44 #define assert_connection_edge_not_dns_pending(conn) \
46 #define dump_dns_mem_usage(severity)\
48 #define dns_cache_handle_oom(now, bytes) \
49 ((void)(now), (void)(bytes), 0)
51 #define connection_dns_remove(conn) \
54 tor_assert_nonfatal_unreached(); \
76 #ifdef HAVE_EVDNS_BASE_GET_NAMESERVER_ADDR
77 tor_addr_t *configured_nameserver_address(
const size_t idx);
82 int is_resolve,
or_circuit_t *oncirc,
char **hostname_out,
89 const char *hostname));
97 char **hostname_out));
STATIC int set_exitconn_info_from_resolve(edge_connection_t *exitconn, const cached_resolve_t *resolve, char **hostname_out)
int dns_seems_to_be_broken(void)
STATIC void send_resolved_cell(edge_connection_t *conn, uint8_t answer_type, const cached_resolve_t *resolved)
void dns_reset_correctness_checks(void)
STATIC void send_resolved_hostname_cell(edge_connection_t *conn, const char *hostname)
STATIC void dns_cancel_pending_resolve(const char *address)
size_t number_of_configured_nameservers(void)
void connection_dns_remove(edge_connection_t *conn)
int has_dns_init_failed(void)
void dump_dns_mem_usage(int severity)
STATIC int dns_resolve_impl(edge_connection_t *exitconn, int is_resolve, or_circuit_t *oncirc, char **hostname_out, int *made_connection_pending_out, cached_resolve_t **resolve_out)
STATIC int launch_resolve(cached_resolve_t *resolve)
int dns_seems_to_be_broken_for_ipv6(void)
int dns_resolve(edge_connection_t *exitconn)
void dns_launch_correctness_checks(void)
void assert_connection_edge_not_dns_pending(edge_connection_t *conn)
Structures used in dns.c. Exposed to dns.c, and to the unit tests that declare DNS_PRIVATE.
#define MOCK_DECL(rv, funcname, arglist)
#define tor_assert_nonfatal_unreached()