diff options
author | Nick Mathewson <nickm@torproject.org> | 2020-07-14 13:53:27 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2020-07-16 09:02:10 -0400 |
commit | 0ccdf05dc54bf956348b0647414732b6a497d17a (patch) | |
tree | 44caca876238a69ed7f447aa5aff30f0bb29a041 /src/core/or/channel.h | |
parent | 382387882c3f9cfaac6ee0c83908dc24135ba5c4 (diff) | |
download | tor-0ccdf05dc54bf956348b0647414732b6a497d17a.tar.gz tor-0ccdf05dc54bf956348b0647414732b6a497d17a.zip |
Minor refactoring on channel_get_remote_addr_if_possible()
* We no longer call this an optional method
* We document that it returns the real address, not a canonical one.
* We have it try harder if the real address hasn't been set yet.
Diffstat (limited to 'src/core/or/channel.h')
-rw-r--r-- | src/core/or/channel.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/core/or/channel.h b/src/core/or/channel.h index 5fe1fb9cc4..9aa59da2cb 100644 --- a/src/core/or/channel.h +++ b/src/core/or/channel.h @@ -329,11 +329,9 @@ struct channel_t { */ double (*get_overhead_estimate)(channel_t *); /* - * Ask the underlying transport what the remote endpoint address is, in - * a tor_addr_t. This is optional and subclasses may leave this NULL. - * If they implement it, they should write the address out to the - * provided tor_addr_t *, and return 1 if successful or 0 if no address - * available. + * Ask the underlying transport what the remote endpoint address is, in a + * tor_addr_t. Write the address out to the provided tor_addr_t *, and + * return 1 if successful or 0 if no address available. */ int (*get_remote_addr)(const channel_t *, tor_addr_t *); int (*get_transport_name)(channel_t *chan, char **transport_out); |