[tor-commits] [stem/master] Documenting the StreamPurpose values

atagar at torproject.org atagar at torproject.org
Mon Dec 3 02:35:44 UTC 2012


commit 404025ec9a7f0614742ce35ae13a1a001e4d9f9e
Author: Damian Johnson <atagar at torproject.org>
Date:   Fri Nov 23 11:43:13 2012 -0800

    Documenting the StreamPurpose values
    
    Description for the STREAM event's PURPOSE field were added to the spec to
    reflecting that here.
    
    bug report: https://trac.torproject.org/7508
    fix: https://gitweb.torproject.org/torspec.git/commitdiff/e23a24a
---
 stem/__init__.py |   17 ++++++++---------
 1 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/stem/__init__.py b/stem/__init__.py
index 8b5a5c2..4ba83d7 100644
--- a/stem/__init__.py
+++ b/stem/__init__.py
@@ -178,17 +178,15 @@ Library for working with the tor process.
   Purpsoe of the stream. This is only provided with new streams and tor may
   provide purposes not in this enum.
   
-  Enum descriptions are pending...
-  https://trac.torproject.org/7508
-  
   ================= ===========
   StreamPurpose     Description
   ================= ===========
-  **DIR_FETCH**     unknown
-  **UPLOAD_DESC**   unknown
-  **DNS_REQUEST**   unknown
-  **USER**          unknown
-  **DIRPORT_TEST**  unknown
+  **DIR_FETCH**     fetching directory information (descriptors, consensus, etc)
+  **DIR_UPLOAD**    uploading our descriptor to an authority
+  **UPLOAD_DESC**   obsolete
+  **DNS_REQUEST**   user initiated DNS request
+  **DIRPORT_TEST**  checking that our directory port is reachable externally
+  **USER**          either relaying user traffic or not one of the above categories
   ================= ===========
 
 .. data:: ORStatus (enum)
@@ -433,10 +431,11 @@ StreamSource = stem.util.enum.UppercaseEnum(
 
 StreamPurpose = stem.util.enum.UppercaseEnum(
   "DIR_FETCH",
+  "DIR_UPLOAD",
   "UPLOAD_DESC",
   "DNS_REQUEST",
-  "USER",
   "DIRPORT_TEST",
+  "USER",
 )
 
 ORStatus = stem.util.enum.UppercaseEnum(





More information about the tor-commits mailing list