aboutsummaryrefslogtreecommitdiff
path: root/src/common/address.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/address.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/address.h')
-rw-r--r--src/common/address.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/common/address.h b/src/common/address.h
index 8dc63b71c1..ecb7adcf52 100644
--- a/src/common/address.h
+++ b/src/common/address.h
@@ -148,7 +148,8 @@ char *tor_dup_addr(const tor_addr_t *addr) ATTR_MALLOC;
const char *fmt_addr_impl(const tor_addr_t *addr, int decorate);
const char *fmt_addrport(const tor_addr_t *addr, uint16_t port);
const char * fmt_addr32(uint32_t addr);
-int get_interface_address6(int severity, sa_family_t family, tor_addr_t *addr);
+MOCK_DECL(int,get_interface_address6,(int severity, sa_family_t family,
+tor_addr_t *addr));
/** Flag to specify how to do a comparison between addresses. In an "exact"
* comparison, addresses are equivalent only if they are in the same family
@@ -225,7 +226,7 @@ int addr_mask_get_bits(uint32_t mask);
#define INET_NTOA_BUF_LEN 16
int tor_inet_ntoa(const struct in_addr *in, char *buf, size_t buf_len);
char *tor_dup_ip(uint32_t addr) ATTR_MALLOC;
-int get_interface_address(int severity, uint32_t *addr);
+MOCK_DECL(int,get_interface_address,(int severity, uint32_t *addr));
tor_addr_port_t *tor_addr_port_new(const tor_addr_t *addr, uint16_t port);