21 #if defined(HAVE_SECCOMP_H) && defined(__linux__)
22 #define USE_SANDBOX_GETADDRINFO
40 #ifdef USE_SANDBOX_GETADDRINFO
42 int tor_add_addrinfo(
const char *addr);
46 int tor_getaddrinfo(
const char *
name,
const char *servname,
47 const struct addrinfo *hints,
48 struct addrinfo **res);
49 void tor_freeaddrinfo(
struct addrinfo *addrinfo);
50 void tor_free_getaddrinfo_cache(
void);
52 #define tor_getaddrinfo(name, servname, hints, res) \
53 getaddrinfo((name),(servname), (hints),(res))
54 #define tor_add_addrinfo(name) \
56 #define tor_freeaddrinfo(addrinfo) \
57 freeaddrinfo((addrinfo))
58 #define tor_free_getaddrinfo_cache()
61 void sandbox_disable_getaddrinfo_cache(
void);
62 void tor_make_getaddrinfo_cache_active(
void);
67 #ifdef RESOLVE_PRIVATE
int tor_lookup_hostname(const char *name, uint32_t *addr)
int tor_addr_port_lookup(const char *s, struct tor_addr_t *addr_out, uint16_t *port_out)
int tor_addr_lookup(const char *name, uint16_t family, struct tor_addr_t *addr_out)
Macros to implement mocking and selective exposure for the test code.
#define MOCK_DECL(rv, funcname, arglist)
Integer definitions used throughout Tor.