]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Document new helper functions in socketpair.c
authorNick Mathewson <nickm@torproject.org>
Wed, 1 Aug 2018 13:43:25 +0000 (09:43 -0400)
committerNick Mathewson <nickm@torproject.org>
Wed, 1 Aug 2018 15:01:52 +0000 (11:01 -0400)
src/lib/net/socketpair.c

index a12c25cc8a8d31a7f5fc5279fbbd3d96fd28b709..8dd04d04868144e7a2f85b5a82604a5dc4260630 100644 (file)
 // 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)
 {