Commit 59ec8ca3 authored by Nick Mathewson's avatar Nick Mathewson 🤹
Browse files

Revise tor-spec to add more/better stream end reasons.


svn:r3717
parent 83743d64
Loading
Loading
Loading
Loading
+19 −5
Original line number Diff line number Diff line
@@ -459,16 +459,30 @@ TODO: (very soon)

       1 -- REASON_MISC           (catch-all for unlisted reasons)
       2 -- REASON_RESOLVEFAILED  (couldn't look up hostname)
       3 -- REASON_CONNECTFAILED  (couldn't connect to host/port)
       3 -- REASON_CONNECTREFUSED (remote host refused connection) [*]
       4 -- REASON_EXITPOLICY     (OR refuses to connect to host or port)
       5 -- REASON_DESTROY        (circuit is being destroyed [???-NM])
       6 -- REASON_DONE           (anonymized TCP connection was closed)
       7 -- REASON_TIMEOUT        (OR timed out while connecting [???-NM])
       5 -- REASON_DESTROY        (Circuit is being destroyed)
       6 -- REASON_DONE           (Anonymized TCP connection was closed)
       7 -- REASON_TIMEOUT        (Connection timed out, or OR timed out
                                   while connecting)
       8 -- (unallocated) [**]
       9 -- REASON_HIBERNATING    (OR is temporarily hibernating)
      10 -- REASON_INTERNAL       (Internal error at the OR)
      11 -- REASON_RESOURCELIMIT  (OR has no resources to fulfill request)
      12 -- REASON_CONNRESET      (Connection was unexpectedly reset)

   (With REASON_EXITPOLICY, the 4-byte IPv4 address or 16-byte IPv6 address
   forms the optional data; no other reason currently has extra data.)

   *** [The rest of this section describes unimplemented functionality.]
   OPs and ORs MUST accept reasons not on the above list, since future
   versions of Tor may provide more fine-grained reasons.

   [*] Older versions of Tor also send this reason when connections are
       reset.
   [**] Due to a bug in versions of Tor through 0095, error reason 8 must
        remain allocated until that version is obsolete.

   --- [The rest of this section describes unimplemented functionality.]

   Because TCP connections can be half-open, we follow an equivalent
   to TCP's FIN/FIN-ACK/ACK protocol to close streams.