[tor-dev] channel_t to IP Address
andrea at torproject.org
Thu Jul 24 12:59:32 UTC 2014
On Thu, Jul 24, 2014 at 01:55:43PM +0100, Gareth Owen wrote:
> Thanks for taking the time to reply and for the advice. I have just this
> second discovered this method:
> which returns the endpoint as a string. I wonder, is this safer/future
> proof or should this approach be discouraged?
Don't call channel methods directly like that. Do call something like
or channel_get_canonical_remote_descr() (see code in channel.c for
differences among them) on TO_OR_CIRCUIT(circ)->p_chan.
Note: only do this if you want a string to show the user or something like
that. If you're going to parse it, it's very much brittle and not future-
<andrea at torproject.org>
PGP fingerprint (ECC): BDF5 F867 8A52 4E4A BECF DE79 A4FF BC34 F01D D536
PGP fingerprint (RSA): 3611 95A4 0740 ED1B 7EA5 DF7E 4191 13D9 D0CF BDA5
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 328 bytes
Desc: not available
More information about the tor-dev