From 6693f3253097326abe3a57469690330cd73d2456 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 17 Dec 2008 22:58:20 +0000 Subject: Resolve many DOCDOCs. svn:r17662 --- src/or/relay.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/or/relay.c') diff --git a/src/or/relay.c b/src/or/relay.c index 341f71f3d..2ced83acb 100644 --- a/src/or/relay.c +++ b/src/or/relay.c @@ -1844,7 +1844,13 @@ append_cell_to_circuit_queue(circuit_t *circ, or_connection_t *orconn, } } -/** DOCDOC */ +/** Append an encoded value of addr to payload_out, which must + * have at least 18 bytes of free space. The encoding is, as specified in + * tor-spec.txt: + * RESOLVED_TYPE_IPV4 or RESOLVED_TYPE_IPV6 [1 byte] + * LENGTH [1 byte] + * ADDRESS [length bytes] + * Return the number of bytes added, or -1 on error */ int append_address_to_payload(char *payload_out, const tor_addr_t *addr) { @@ -1867,7 +1873,10 @@ append_address_to_payload(char *payload_out, const tor_addr_t *addr) } } -/** DODOC */ +/** Given payload_len bytes at payload, starting with an address + * encoded as by append_address_to_payload(), try to decode the address into + * *addr_out. Return the next byte in the payload after the address on + * success, or NULL on failure. */ const char * decode_address_from_payload(tor_addr_t *addr_out, const char *payload, int payload_len) -- cgit v1.2.3