[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] Docment or add DOCDOC comments to undocumented functions in...
Update of /home/or/cvsroot/tor/src/tools
In directory moria:/tmp/cvs-serv7477/src/tools
Modified Files:
tor-resolve.c
Log Message:
Docment or add DOCDOC comments to undocumented functions in src/or. Make function definition format uniform.
Index: tor-resolve.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/tools/tor-resolve.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- tor-resolve.c 1 Apr 2005 20:15:56 -0000 1.17
+++ tor-resolve.c 11 Jun 2005 18:52:12 -0000 1.18
@@ -44,6 +44,9 @@
do { log_fn(LOG_ERR, "Error while %s: %s", act, \
tor_socket_strerror(tor_socket_errno(_s))); } while (0)
+/** Set *out to a newly allocated SOCKS4a resolve request with
+ * username and hostname as provided. Return the number of bytes in
+ * the request. */
static int
build_socks4a_resolve_request(char **out,
const char *username,
@@ -66,6 +69,9 @@
return len;
}
+/** Given a len-byte SOCKS4a response in <b>response</b>, set *addr_out to the
+ * address it contains (in host order). Return 0 on success, -1 on error.
+ */
static int
parse_socks4a_resolve_response(const char *response, size_t len,
uint32_t *addr_out)
@@ -96,6 +102,10 @@
return 0;
}
+/** Send a resolve request for <b>hostname</b> to the Tor listening on
+ * <b>sockshost</b>:<b>socksport</b>. Store the resulting IPv4
+ * address (in host order) into <b>result_addr</b>.
+ */
static int
do_resolve(const char *hostname, uint32_t sockshost, uint16_t socksport,
uint32_t *result_addr)
@@ -163,6 +173,7 @@
return 0;
}
+/** Print a usage message and exit. */
static void
usage(void)
{
@@ -170,6 +181,7 @@
exit(1);
}
+/** Entry point to tor-resolve */
int
main(int argc, char **argv)
{