[tor-bugs] #1903 [Tor Client]: Teach Tor to control networks with tor-fw-helper.c

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Sun Oct 10 02:35:09 UTC 2010


#1903: Teach Tor to control networks with tor-fw-helper.c
-------------------------+--------------------------------------------------
 Reporter:  ioerror      |       Owner:                     
     Type:  enhancement  |      Status:  needs_review       
 Priority:  normal       |   Milestone:  Deliverable-Sep2010
Component:  Tor Client   |     Version:  Tor: unspecified   
 Keywords:  upnp         |      Parent:  #1775              
-------------------------+--------------------------------------------------

Comment(by nickm):

 Hrm.  First thing to do here is to verify that Windows will even let you
 make a pipe (made with CreatePipe) nonblocking.  If not, let's step back
 and think of a more general solution here.

 Assuming that the general solution is indeed to do nonblocking IO on the
 pipes (or that there is no general solution, and nonblocking IO on pipes
 is the Unix solution):

  * recv is indeed only for sockets.

  * This doesn't need to be super-efficient.  Maybe add to the per-process
 state a smartlistlist of strings that have been read from fgets() before
 the current call to the function that gets a line, and when we hit EAGAIN,
 add the string to the list.  When we finally hit a newline, prepend the
 concatenation of all the strings in the smartlist to what we got.
      * This also suggests to me that we might want to have a struct
 associated with each process we've launched; the number of related things
 that we need to pass around or hold for each one seems to be growing.

 Plausible?

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/1903#comment:9>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list