Implement all the rest of the new controller protocol, debug a little, add some new features, add ADDRMAP events.

svn:r4460
This commit is contained in:
Nick Mathewson
2005-06-19 20:40:41 +00:00
parent b5fd75a063
commit 64fc1f7bae
6 changed files with 296 additions and 116 deletions
+12 -8
View File
@@ -54,15 +54,19 @@ For 0.1.0.x:
for 0.1.1.x:
N . Controller improvements
. new controller protocol
. Specify
. Implement
- controller should have an event to learn about new addressmappings,
e.g. when we learn a hostname to IP mapping ?
- make sure err-level log events get flushed to the controller
immediately, since tor will exit right after.
- add new getinfo options to enumerate things we only find out about
o new controller protocol
o Specify
o Implement
. Test, debug
o add new getinfo options to enumerate things we only find out about
currently via events.
o controller should have an event to learn about new addressmappings,
e.g. when we learn a hostname to IP mapping ?
. make sure err-level log events get flushed to the controller
immediately, since tor will exit right after.
o Implement
- Test, debug
- Switch example controllers to use new protocol
- switch accountingmax to count total in+out, not either in or
out. it's easy to move in this direction (not risky), but hard to
back, out if we decide we prefer it the way it already is. hm.
+18 -8
View File
@@ -159,7 +159,7 @@ $Id$
"SETEVENTS" *(SP EventCode) CRLF
EventCode = "CIRC" / "STREAM" / "ORCONN" / "BW" / "DEBUG" /
"INFO" / "NOTICE" / "WARN" / "ERR" / "NEWDESC"
"INFO" / "NOTICE" / "WARN" / "ERR" / "NEWDESC" / "ADDRMAP"
[XXX We should have an "ADDRESSMAP" event to hear when we learn
about dns resolves, etc, so the controller can keep synced. -RD]
@@ -318,7 +318,7 @@ about dns resolves, etc, so the controller can keep synced. -RD]
"stream-status"
A series of lines as for a stream status event. Each is of the form:
StreamID SP StreamStatus SP Target CRLF
StreamID SP StreamStatus SP CircID SP Target CRLF
"orconn-status"
A series of lines as for an OR connection status event. Each is of the
@@ -344,9 +344,9 @@ about dns resolves, etc, so the controller can keep synced. -RD]
request for the server to extend an existing circuit with that ID according
to the specified path.
If the request is successful, the server sends a "250 OK" message
containing a message body consisting of the Circuit ID of the (maybe newly
created) circuit.
If the request is successful, the server sends a reply containing a message
body consisting of the Circuit ID of the (maybe newly created) circuit.
The syntax is "250" SP "EXTENDED" SP CircuitID CRLF.
3.10 ATTACHSTREAM
@@ -491,6 +491,8 @@ about dns resolves, etc, so the controller can keep synced. -RD]
554 Invalid descriptor
555 Unmanaged entity
650 Asynchronous event notification
Unless specified to have specific contents, the human-readable messages
@@ -537,20 +539,22 @@ about dns resolves, etc, so the controller can keep synced. -RD]
The syntax is:
"650" SP "STREAM" SP StreamID SP StreamStatus SP Target
"650" SP "STREAM" SP StreamID SP StreamStatus SP CircID SP Target SP
StreamStatus =
"NEW" / ; New request to connect
"NEWRESOLVE" / ; New request to resolve an address
"SENTCONNECT" / ; Sent a connect cell along a circuit
"SENTRESOLVE" / ; Sent a resolve cell along a circuit
"SUCCEEDED" / ; Received a successful reply; stream established
"SUCCEEDED" / ; Received a reply; stream established
"FAILED" / ; Stream failed and not retriable.
"CLOSED" / ; Stream closed
"DETACHED" ; Stream detached from circuit; still retriable
"DETACHED" ; Detached from circuit; still retriable.
Target = Address ":" Port
The circuit ID designates which circuit this stream is attached to. If
the stream is unattached, the circuit ID "0" is given.
4.1.3 OR Connection status changed
@@ -580,6 +584,12 @@ about dns resolves, etc, so the controller can keep synced. -RD]
Syntax:
"650" SP "NEWDESC" 1*(SP ServerID)
4.1.6 New Address mapping
Syntax:
"650" SP "ADDRMAP" SP Address SP Address SP Expiry
Expiry = DQOUTE ISOTime DQUOTE / "NEVER"
5. Implementation notes
5.1. Authentication