9 #ifndef TOR_CONFIG_RESOLVE_ADDR_H
10 #define TOR_CONFIG_RESOLVE_ADDR_H
21 RESOLVED_ADDR_NONE = 0,
23 RESOLVED_ADDR_CONFIGURED = 1,
25 RESOLVED_ADDR_CONFIGURED_ORPORT = 2,
27 RESOLVED_ADDR_GETHOSTNAME = 3,
29 RESOLVED_ADDR_INTERFACE = 4,
31 RESOLVED_ADDR_RESOLVED = 5,
36 #define get_orport_addr(family) \
37 (portconf_get_first_advertised_addr(CONN_TYPE_OR_LISTENER, family))
47 const char *hostname_used);
56 #ifdef RESOLVE_ADDR_PRIVATE
60 void resolve_addr_reset_suggested(
int family);
Header file for config.c.
Header file for connection.c.
The or_options_t structure, which represents Tor's configuration.
const char * resolved_addr_method_to_str(const resolved_addr_method_t method)
bool is_local_to_resolve_addr(const tor_addr_t *addr)
: Return true iff the given addr is judged to be local to our resolved address.
void resolved_addr_set_suggested(const tor_addr_t *addr)
void resolved_addr_reset_last(int family)
bool find_my_address(const or_options_t *options, int family, int warn_severity, tor_addr_t *addr_out, resolved_addr_method_t *method_out, char **hostname_out)
Attempt to find our IP address that can be used as our external reachable address.
void resolved_addr_get_suggested(int family, tor_addr_t *addr_out)
bool resolved_addr_is_configured(int family)
void resolved_addr_set_last(const tor_addr_t *addr, const resolved_addr_method_t method_used, const char *hostname_used)
Set the last resolved address cache using the given address.
void resolved_addr_get_last(int family, tor_addr_t *addr_out)
#define MOCK_DECL(rv, funcname, arglist)