On Mon, Jun 04, 2007 at 08:58:00PM +0200, Peter Palfrader wrote: > Hi, > > this is a first cut at a patch to also offer the control interface over > a unix domain socket, not just a TCP port. > > Things that remain to be done: > - make relative filenames relative to datadir? > - document in manpage > > Please let me know if this is something that should go in, and if yes > how to change it so that it can. This should go in. Here are a few comments about what should/could get changed. - Right now, your code rejects the ControlSocket option as unrecognized. if the code can't support it. That's not how we handle unsupported options right now; instead, we try to give a message that says, "this Tor can't support that (otherwise valid) option." (In some cases, we just ignore the option. That's bad too.) - Make sure your code passes "make check-spaces". - I'm not sure we need to have a new listener type for this. I think, instead, that connection_create_listener should take a "struct sockaddr" as its argument, and that its callers should pass it a sockaddr of the right kind. This will avoid bloating connection_create_listener, and will make the eventual IPv6 listeners easier too. To handle the special-cases on AF_UNIX later on, we could add a one-bit is_unix_socket flag to connection_t. - I think you missed the code to make connection_is_listener() work, in case you don't go with the above. With that in mind, this looks pretty close to complete. Would you like to do the cleanup, or should I? yrs, -- Nick Mathewson
Attachment:
pgpzcvZC4JjsP.pgp
Description: PGP signature