aboutsummaryrefslogtreecommitdiff
path: root/src/common/address.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2008-12-26 21:26:05 +0000
committerNick Mathewson <nickm@torproject.org>2008-12-26 21:26:05 +0000
commit374c1e979f0206f50dc2afd026289d502ce49e30 (patch)
treedb1c1b9f0fc132eca2a8db8b14e5d8e902e610c2 /src/common/address.h
parent616f6643ef9c6222418a4e75e84691c8ed9507f9 (diff)
downloadtor-374c1e979f0206f50dc2afd026289d502ce49e30.tar.gz
tor-374c1e979f0206f50dc2afd026289d502ce49e30.zip
Refactor tor_addr_t manipulation functions so that as few as possible look at the tor_addr_t representation.
svn:r17790
Diffstat (limited to 'src/common/address.h')
-rw-r--r--src/common/address.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/common/address.h b/src/common/address.h
index 0bc7674913..689d566ed5 100644
--- a/src/common/address.h
+++ b/src/common/address.h
@@ -157,6 +157,8 @@ void tor_addr_from_ipv4n(tor_addr_t *dest, uint32_t v4addr);
#define tor_addr_from_ipv4h(dest, v4addr) \
tor_addr_from_ipv4n((dest), htonl(v4addr))
void tor_addr_from_ipv6_bytes(tor_addr_t *dest, const char *bytes);
+#define tor_addr_from_in(dest, in) \
+ tor_addr_from_ipv4n((dest), (in)->s_addr);
void tor_addr_from_in6(tor_addr_t *dest, const struct in6_addr *in6);
int tor_addr_is_null(const tor_addr_t *addr);
int tor_addr_is_loopback(const tor_addr_t *addr);