diff options
author | teor <teor@torproject.org> | 2019-01-08 14:45:17 +1000 |
---|---|---|
committer | teor <teor@torproject.org> | 2019-01-08 14:45:17 +1000 |
commit | 671c34d9b496ecdde67527cc10b657ff6bd35c9e (patch) | |
tree | 2d3d4347f71f091a31cdd9cef353d80983d67845 /src/lib/net/socketpair.c | |
parent | ae578981b6c43fbf9e13d0e74806ca6153edf7a9 (diff) | |
download | tor-671c34d9b496ecdde67527cc10b657ff6bd35c9e.tar.gz tor-671c34d9b496ecdde67527cc10b657ff6bd35c9e.zip |
lib/net: improve the docs for tor_{ersatz_,}socketpair()
Add some details about IP family support, and point to
tor_socketpair() from tor_ersatz_socketpair().
Closes ticket 29015.
Diffstat (limited to 'src/lib/net/socketpair.c')
-rw-r--r-- | src/lib/net/socketpair.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/net/socketpair.c b/src/lib/net/socketpair.c index 380338f15c..b23f08cab2 100644 --- a/src/lib/net/socketpair.c +++ b/src/lib/net/socketpair.c @@ -105,7 +105,12 @@ sockaddr_eq(struct sockaddr *sa1, struct sockaddr *sa2) /** * Helper used to implement socketpair on systems that lack it, by * making a direct connection to localhost. - */ + * + * See tor_socketpair() for details. + * + * The direct connection defaults to IPv4, but falls back to IPv6 if + * IPv4 is not supported. + **/ int tor_ersatz_socketpair(int family, int type, int protocol, tor_socket_t fd[2]) { |