aboutsummaryrefslogtreecommitdiff
path: root/src/lib/net/resolve.h
diff options
context:
space:
mode:
authorrl1987 <rl1987@sdf.lonestar.org>2018-07-03 14:27:57 +0300
committerrl1987 <rl1987@sdf.lonestar.org>2018-07-03 15:53:39 +0300
commit439b528f25e29b572a7bd04bc1d5fcaee68f5796 (patch)
treee11e29d8a17dcac8ba634052904b42b90d69023d /src/lib/net/resolve.h
parenta9628c0c0b2cc5c0286c4e49591b3b18dc054e87 (diff)
downloadtor-439b528f25e29b572a7bd04bc1d5fcaee68f5796.tar.gz
tor-439b528f25e29b572a7bd04bc1d5fcaee68f5796.zip
Rename sandbox_getaddrinfo() et. al.
Diffstat (limited to 'src/lib/net/resolve.h')
-rw-r--r--src/lib/net/resolve.h21
1 files changed, 9 insertions, 12 deletions
diff --git a/src/lib/net/resolve.h b/src/lib/net/resolve.h
index a225be87fe..f2280ae7e8 100644
--- a/src/lib/net/resolve.h
+++ b/src/lib/net/resolve.h
@@ -22,27 +22,24 @@ MOCK_DECL(int,tor_lookup_hostname,(const char *name, uint32_t *addr));
struct addrinfo;
#ifdef USE_SANDBOX_GETADDRINFO
/** Pre-calls getaddrinfo in order to pre-record result. */
-int sandbox_add_addrinfo(const char *addr);
+int tor_add_addrinfo(const char *addr);
-// XXXX rename these. They are named as though they were sandbox-only,
-// XXXX but in fact they're the only allowed entry point to getaddrinfo.
-// XXXX They don't invoke the sandbox code; they only have an internal cache.
struct addrinfo;
/** Replacement for getaddrinfo(), using pre-recorded results. */
-int sandbox_getaddrinfo(const char *name, const char *servname,
+int tor_getaddrinfo(const char *name, const char *servname,
const struct addrinfo *hints,
struct addrinfo **res);
-void sandbox_freeaddrinfo(struct addrinfo *addrinfo);
-void sandbox_free_getaddrinfo_cache(void);
-void sandbox_make_getaddrinfo_cache_active(void);
+void tor_freeaddrinfo(struct addrinfo *addrinfo);
+void tor_free_getaddrinfo_cache(void);
+void tor_make_getaddrinfo_cache_active(void);
#else /* !(defined(USE_SANDBOX_GETADDRINFO)) */
-#define sandbox_getaddrinfo(name, servname, hints, res) \
+#define tor_getaddrinfo(name, servname, hints, res) \
getaddrinfo((name),(servname), (hints),(res))
-#define sandbox_add_addrinfo(name) \
+#define tor_add_addrinfo(name) \
((void)(name))
-#define sandbox_freeaddrinfo(addrinfo) \
+#define tor_freeaddrinfo(addrinfo) \
freeaddrinfo((addrinfo))
-#define sandbox_free_getaddrinfo_cache()
+#define tor_free_getaddrinfo_cache()
#endif /* defined(USE_SANDBOX_GETADDRINFO) */
void sandbox_disable_getaddrinfo_cache(void);