diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-08-01 09:43:25 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-08-01 11:01:52 -0400 |
commit | ff7229b32cb2f5a3c384200caac35e0626199087 (patch) | |
tree | bcda4691970069fb86a16d77049348e29a0d1c4b /src/lib | |
parent | 1b7b9c7e63848a125c05efc3c1b9a5868946a9cc (diff) | |
download | tor-ff7229b32cb2f5a3c384200caac35e0626199087.tar.gz tor-ff7229b32cb2f5a3c384200caac35e0626199087.zip |
Document new helper functions in socketpair.c
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/net/socketpair.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lib/net/socketpair.c b/src/lib/net/socketpair.c index a12c25cc8a..8dd04d0486 100644 --- a/src/lib/net/socketpair.c +++ b/src/lib/net/socketpair.c @@ -32,6 +32,11 @@ // Avoid warning about call to memcmp. #define raw_memcmp memcmp +/** + * Return a new socket that is bound and listening on the loopback interface + * of family <b>family</b> for a socket of type <b>type</b>. On failure return + * TOR_INVALID_SOCKET. + */ static tor_socket_t get_local_listener(int family, int type) { @@ -72,6 +77,9 @@ get_local_listener(int family, int type) return TOR_INVALID_SOCKET; } +/** + * Return true iff sa1 and sa2 are equivalent AF_INET or AF_INET6 addresses. + */ static int sockaddr_eq(struct sockaddr *sa1, struct sockaddr *sa2) { |