diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-10-11 11:47:13 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-10-11 11:48:21 -0400 |
commit | 491e20ae13c3acdd6d18d994cc41178733a778b5 (patch) | |
tree | 547353fca8e753f1c4b40baac3eb60aa1c7d1986 /src/common | |
parent | 00b2b69add373f168e8729e99f349ec5a3753db3 (diff) | |
download | tor-491e20ae13c3acdd6d18d994cc41178733a778b5.tar.gz tor-491e20ae13c3acdd6d18d994cc41178733a778b5.zip |
Change "reverse_lookup_name" functions to refer to "PTR_name"s
Under the new convention, having a tor_addr.*lookup function that
doesn't do hostname resolution is too close for comfort.
I used this script here, and have made no other changes.
s/tor_addr_parse_reverse_lookup_name/tor_addr_parse_PTR_name/g;
s/tor_addr_to_reverse_lookup_name/tor_addr_to_PTR_name/g;
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/address.c | 4 | ||||
-rw-r--r-- | src/common/address.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/common/address.c b/src/common/address.c index 759199057e..5c2b54015c 100644 --- a/src/common/address.c +++ b/src/common/address.c @@ -384,7 +384,7 @@ tor_addr_to_str(char *dest, const tor_addr_t *addr, size_t len, int decorate) * IPv4 or IPv6 address too. */ int -tor_addr_parse_reverse_lookup_name(tor_addr_t *result, const char *address, +tor_addr_parse_PTR_name(tor_addr_t *result, const char *address, int family, int accept_regular) { if (!strcasecmpend(address, ".in-addr.arpa")) { @@ -474,7 +474,7 @@ tor_addr_parse_reverse_lookup_name(tor_addr_t *result, const char *address, * the result in the <b>outlen</b>-byte buffer at <b>out</b>. Return 0 on * success, -1 on failure. */ int -tor_addr_to_reverse_lookup_name(char *out, size_t outlen, +tor_addr_to_PTR_name(char *out, size_t outlen, const tor_addr_t *addr) { if (addr->family == AF_INET) { diff --git a/src/common/address.h b/src/common/address.h index 877062e2bb..01aeb89799 100644 --- a/src/common/address.h +++ b/src/common/address.h @@ -154,9 +154,9 @@ int tor_addr_is_internal(const tor_addr_t *ip, int for_listening) ATTR_PURE; /** Longest length that can be required for a reverse lookup name. */ /* 32 nybbles, 32 dots, 8 characters of "ip6.arpa", 1 NUL: 73 characters. */ #define REVERSE_LOOKUP_NAME_BUF_LEN 73 -int tor_addr_to_reverse_lookup_name(char *out, size_t outlen, +int tor_addr_to_PTR_name(char *out, size_t outlen, const tor_addr_t *addr); -int tor_addr_parse_reverse_lookup_name(tor_addr_t *result, const char *address, +int tor_addr_parse_PTR_name(tor_addr_t *result, const char *address, int family, int accept_regular); int tor_addr_port_lookup(const char *s, tor_addr_t *addr_out, |