STREAM_PORT Controller Event

Nick Mathewson nickm at freehaven.net
Sat Jun 16 20:18:13 UTC 2007


On Sat, Jun 16, 2007 at 06:22:01PM +0100, Robert Hogan wrote:
> 
> This patch implements a controller event that tells interested contollers the 
> remote address's port for every new stream.
> 
> This information allows controllers to look up and report the program using 
> that stream. On Linux, this is done by searching /proc/$PID/fd/* for the 
> inode reported in /proc/net/tcp.
> 

Hi, Robert!  I like the idea; just a few suggestions:

1) why not change this from a new event type to an an extra value
given for STREAM NEW events when the EXTENDED_EVENTS flag is set?
That's what it's for: adding new information to existing events[*].
The syntax could be:

      "650" SP "STREAM" SP StreamID SP StreamStatus SP CircID SP Target
          [SP "REASON=" Reason [ SP "REMOTE_REASON=" Reason ]]
          [SP "SOURCE=" Source] [ SP "SOURCE_ADDR=" Addr:Port ] CRLF

2) I'd suggest having the whole address, not just the port.  Usually
the address will just be 127.0.0.1, but if people are running Tor as a
socks proxy for their LAN, they'll want to see which host is using it.

[*]  This could be explained better in control-spec.txt.  The idea is
that if you specify EXTENDED_EVENTS, you're telling Tor that it is
allowed to send you any number of unexpected Key=Value pairs after any
event it sends you.  This is how we try to make events extensible
without breaking backward compatibility.

yrs,
-- 
Nick Mathewson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 652 bytes
Desc: not available
URL: <http://lists.torproject.org/pipermail/tor-dev/attachments/20070616/16423054/attachment.pgp>


More information about the tor-dev mailing list