[tor-dev] channel_t to IP Address

Gareth Owen gareth.owen at port.ac.uk
Thu Jul 24 12:55:43 UTC 2014


Andrea

Thanks for taking the time to reply and for the advice.  I have just this
second discovered this method:

TO_OR_CIRCUIT(circ)->p_chan->get_remote_descr(TO_OR_CIRCUIT(circ)->p_chan,
0)

which returns the endpoint as a string.  I wonder, is this safer/future
proof or should this approach be discouraged?

Best
Gareth


On 24 July 2014 12:20, Gareth Owen <gareth.owen at port.ac.uk> wrote:

> Hi all
>
> Quick question, how does one turn channel_t into an IP address, e.g. given
> a circuit_t how do I get the IP address of the previous and next hop
> (noting that they might not be in the consensus so I cant use the identity
> hash).  I can see the information is in the connection_t struct but I don't
> know how to get that from the channel/circuit.
>
> Any help appreciated.
>
> Thanks
> Gareth
>
> --
> Dr Gareth Owen
> Senior Lecturer
> School of Computing, University of Portsmouth
>
> Tel: 02392 846423
> Web: ghowen.me
>



-- 
Dr Gareth Owen
Senior Lecturer
School of Computing, University of Portsmouth

Tel: 02392 846423
Web: ghowen.me
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.torproject.org/pipermail/tor-dev/attachments/20140724/d7e4dfc1/attachment.html>


More information about the tor-dev mailing list