32 if (family == AF_INET) {
34 ap_out->port = router->ipv4_orport;
36 }
else if (family == AF_INET6) {
38 if (tor_addr_port_is_valid(&router->
ipv6_addr, router->ipv6_orport, 0)) {
40 ap_out->port = router->ipv6_orport;
43 tor_addr_port_make_null_ap(ap_out, AF_INET6);
49 tor_addr_port_make_null_ap(ap_out, AF_UNSPEC);
59 orport->port == router->ipv4_orport) ||
61 orport->port == router->ipv6_orport);
72 memset(&fake_node, 0,
sizeof(fake_node));
115 if (!strcmp(s,
"general"))
117 else if (!strcmp(s,
"bridge"))
119 else if (!strcmp(s,
"controller"))
void tor_addr_copy(tor_addr_t *dest, const tor_addr_t *src)
#define tor_addr_eq(a, b)
int ed25519_public_key_is_zero(const ed25519_public_key_t *pubkey)
Node information structure.
smartlist_t * node_get_all_orports(const node_t *node)
Header file for nodelist.c.
Master header file for Tor-specific functionality.
const char * router_purpose_to_string(uint8_t p)
int router_get_orport(const routerinfo_t *router, tor_addr_port_t *ap_out, int family)
uint8_t router_purpose_from_string(const char *s)
smartlist_t * router_get_all_orports(const routerinfo_t *ri)
const ed25519_public_key_t * routerinfo_get_ed25519_id(const routerinfo_t *ri)
Header file for routerinfo.c.
Router descriptor structure.
#define ROUTER_PURPOSE_UNKNOWN
#define ROUTER_PURPOSE_GENERAL
#define ROUTER_PURPOSE_BRIDGE
#define ROUTER_PURPOSE_CONTROLLER
struct tor_cert_st * signing_key_cert
ed25519_public_key_t signing_key
#define tor_assert_nonfatal_unreached()