diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-03-16 17:05:37 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-03-16 17:05:37 -0400 |
commit | 6617822b841e32d6339bac13c79dd5f2b566c3c6 (patch) | |
tree | 43bbf3c16b473a89c94dfe4c44460c39cbf8eedf /src/common/address.c | |
parent | 7f6af7a60281f00fde2e3b3f552edcc5f9311a04 (diff) | |
download | tor-6617822b841e32d6339bac13c79dd5f2b566c3c6.tar.gz tor-6617822b841e32d6339bac13c79dd5f2b566c3c6.zip |
Doxygen documentation for about 100 things that didn't have any
About 860 doxygen-less things remain in 0.2.2
Diffstat (limited to 'src/common/address.c')
-rw-r--r-- | src/common/address.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/common/address.c b/src/common/address.c index 072661bdc5..0046d2da36 100644 --- a/src/common/address.c +++ b/src/common/address.c @@ -508,7 +508,8 @@ tor_addr_parse_mask_ports(const char *s, tor_addr_t *addr_out, tor_assert(s); tor_assert(addr_out); - /* IP, [], /mask, ports */ + /** Longest possible length for an address, mask, and port-range combination. + * Includes IP, [], /mask, :, ports */ #define MAX_ADDRESS_LENGTH (TOR_ADDR_BUF_LEN+2+(1+INET_NTOA_BUF_LEN)+12+1) if (strlen(s) > MAX_ADDRESS_LENGTH) { @@ -800,6 +801,8 @@ int tor_addr_compare_masked(const tor_addr_t *addr1, const tor_addr_t *addr2, maskbits_t mbits, tor_addr_comparison_t how) { + /** Helper: Evaluates to -1 if a is less than b, 0 if a equals b, or 1 if a + * is greater than b. May evaluate a and b more than once. */ #define TRISTATE(a,b) (((a)<(b))?-1: (((a)==(b))?0:1)) sa_family_t family1, family2, v_family1, v_family2; |