aboutsummaryrefslogtreecommitdiff
path: root/src/feature/relay/relay_find_addr.h
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2020-07-13 08:23:20 -0400
committerDavid Goulet <dgoulet@torproject.org>2020-07-20 14:54:13 -0400
commitb239f178a22eb4c5b36e9e1490f237ac42f42449 (patch)
tree3ed36d24c23bd4e1bf2c107ad649db29bc6835b7 /src/feature/relay/relay_find_addr.h
parentc18e52af7ce178e0dc78830e41948a9298e6d314 (diff)
downloadtor-b239f178a22eb4c5b36e9e1490f237ac42f42449.tar.gz
tor-b239f178a22eb4c5b36e9e1490f237ac42f42449.zip
addr: New function to find address to publish
In order for a relay to find which address to publish in its descriptor, router_pick_published_address() is used. However, that function only supports AF_INET and uses the directory server suggested address discovery mechanism. This new function uses a new interface so that the caller can request an address family and get the tor_addr_t object. Furthermore, it drops the use of directory servers address discovery (tor#33244) and instead uses the new suggested cache that is populated at the moment from data in the NETINFO cell coming from the directory authorities. At this commit, function is unused. Related to #40025 Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/feature/relay/relay_find_addr.h')
-rw-r--r--src/feature/relay/relay_find_addr.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/feature/relay/relay_find_addr.h b/src/feature/relay/relay_find_addr.h
index 6f298e6c79..e28ceb933a 100644
--- a/src/feature/relay/relay_find_addr.h
+++ b/src/feature/relay/relay_find_addr.h
@@ -19,6 +19,9 @@ void relay_address_new_suggestion(const tor_addr_t *suggested_addr,
const tor_addr_t *peer_addr,
const char *identity_digest);
+bool relay_find_addr_to_publish(const or_options_t *options, int family,
+ bool cache_only, tor_addr_t *addr_out);
+
#ifdef RELAY_FIND_ADDR_PRIVATE
#endif /* RELAY_FIND_ADDR_PRIVATE */