summaryrefslogtreecommitdiff
path: root/src/common/compat.h
diff options
context:
space:
mode:
authorrl1987 <rl1987@sdf.lonestar.org>2014-04-28 23:20:58 +0300
committerNick Mathewson <nickm@torproject.org>2014-12-29 09:59:47 -0500
commit28217b969eec213e7eb01bc8382fb1236eb4bbdd (patch)
tree6ee75f692cbf0c3c2e74adf6815387a39408d10b /src/common/compat.h
parenta56511e594b14e8c97605c8e12084a91028d3747 (diff)
downloadtor-28217b969eec213e7eb01bc8382fb1236eb4bbdd.tar.gz
tor-28217b969eec213e7eb01bc8382fb1236eb4bbdd.zip
Adding comprehensive test cases for resolve_my_address.
Also, improve comments on resolve_my_address to explain what it actually does.
Diffstat (limited to 'src/common/compat.h')
-rw-r--r--src/common/compat.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common/compat.h b/src/common/compat.h
index 9a381fb97f..4e614c0580 100644
--- a/src/common/compat.h
+++ b/src/common/compat.h
@@ -537,10 +537,11 @@ struct sockaddr_in6 {
};
#endif
+MOCK_DECL(int,tor_gethostname,(char *name, size_t namelen));
int tor_inet_aton(const char *cp, struct in_addr *addr) ATTR_NONNULL((1,2));
const char *tor_inet_ntop(int af, const void *src, char *dst, size_t len);
int tor_inet_pton(int af, const char *src, void *dst);
-int tor_lookup_hostname(const char *name, uint32_t *addr) ATTR_NONNULL((1,2));
+MOCK_DECL(int,tor_lookup_hostname,(const char *name, uint32_t *addr));
int set_socket_nonblocking(tor_socket_t socket);
int tor_socketpair(int family, int type, int protocol, tor_socket_t fd[2]);
int network_init(void);