summaryrefslogtreecommitdiff
path: root/src/common/address.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2008-08-07 19:13:35 +0000
committerNick Mathewson <nickm@torproject.org>2008-08-07 19:13:35 +0000
commitd9601c65e0529c1f79e52ca3576cbc8f0a82f8f6 (patch)
tree7025b74af0ad9c3bfb8a0ce6953864787d150e6a /src/common/address.h
parent635f3c8aeef717d03a86117dfa81944fb6788bca (diff)
downloadtor-d9601c65e0529c1f79e52ca3576cbc8f0a82f8f6.tar.gz
tor-d9601c65e0529c1f79e52ca3576cbc8f0a82f8f6.zip
r17666@tombo: nickm | 2008-08-07 15:12:30 -0400
Make tor_addr_from_sockaddr also give away the port in a useful format svn:r16458
Diffstat (limited to 'src/common/address.h')
-rw-r--r--src/common/address.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common/address.h b/src/common/address.h
index 133a9b192d..c206bf1445 100644
--- a/src/common/address.h
+++ b/src/common/address.h
@@ -40,7 +40,8 @@ static INLINE const struct in6_addr *tor_addr_to_in6(const tor_addr_t *a);
static INLINE int tor_addr_eq_ipv4h(const tor_addr_t *a, uint32_t u);
socklen_t tor_addr_to_sockaddr(const tor_addr_t *a, uint16_t port,
struct sockaddr *sa_out, socklen_t len);
-int tor_addr_from_sockaddr(tor_addr_t *a, const struct sockaddr *sa);
+int tor_addr_from_sockaddr(tor_addr_t *a, const struct sockaddr *sa,
+ uint16_t *port_out);
void tor_addr_make_unspec(tor_addr_t *a);
static INLINE const struct in6_addr *