diff options
author | rl1987 <rl1987@sdf.lonestar.org> | 2015-07-22 16:46:44 +0300 |
---|---|---|
committer | rl1987 <rl1987@sdf.lonestar.org> | 2015-08-23 16:02:39 +0300 |
commit | 77a5ca901f148d39973343c7916ca7fb27fab2fb (patch) | |
tree | 626b9afcb1a3910611e9f900f3970e90728c59d1 /src/or/dns.h | |
parent | 494dea70063125c5ab78b45e91d24def47efac5a (diff) | |
download | tor-77a5ca901f148d39973343c7916ca7fb27fab2fb.tar.gz tor-77a5ca901f148d39973343c7916ca7fb27fab2fb.zip |
Unit test dns_resolve(), dns_clip_ttl(), dns_get_expiry_ttl().
Diffstat (limited to 'src/or/dns.h')
-rw-r--r-- | src/or/dns.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/or/dns.h b/src/or/dns.h index b13ab0f890..6af7796dbb 100644 --- a/src/or/dns.h +++ b/src/or/dns.h @@ -20,7 +20,7 @@ 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); +MOCK_DECL(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); @@ -28,5 +28,21 @@ int dns_seems_to_be_broken_for_ipv6(void); void dns_reset_correctness_checks(void); void dump_dns_mem_usage(int severity); +#ifdef DNS_PRIVATE +#include "dns_structs.h" + +STATIC uint32_t dns_get_expiry_ttl(uint32_t ttl); + +MOCK_DECL(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)); + +MOCK_DECL(STATIC void,send_resolved_cell,(edge_connection_t *conn, +uint8_t answer_type,const cached_resolve_t *resolved)); + +MOCK_DECL(STATIC void,send_resolved_hostname_cell,(edge_connection_t *conn, +const char *hostname)); +#endif + #endif |