Traffic class QoS patch wanted?

Mike Perry mikepery at
Tue Feb 15 09:46:25 UTC 2005

Thus spake Mike Perry (mikepery at

> > Sure, we accept patches, and do so often.  One issue is that we get
> > way more design ideas than we get patches, so we don't always assume
> > that people are going to work on their designs.  If you want to get a
> > significant design feature into the main tor distribution, it's
> > usually a good idea to submit a patch to tor-spec.txt first, so we can
> > talk about the actual details of the design before you spend too much
> > time on the implementation.
> Ok. I'll see about doing this next.

Attached. Let me know what you think. The one thing I'm not sure about
is how an OR might determine the version of an OP that connects to it
to satisfy the last paragraph. I'm assuming all OR to OR connections
can check the directory platform string for version info.. But what of
OP to OR?

Mike Perry
Mad Computer Scientist evil labs
-------------- next part --------------
--- tor-spec.txt	2005-02-15 01:38:23.878301675 -0800
+++ tor-spec.txt.MP	2005-02-15 01:40:28.452287305 -0800
@@ -112,13 +112,35 @@
         CircID                                [2 bytes]
-        Command                               [1 byte]
+        Priority                              [2 bits] (high bits)
+        Command                               [6 bits] (low bits)
         Payload (padded with 0 bytes)         [509 bytes]
                                          [Total size: 512 bytes]
    The CircID field determines which circuit, if any, the cell is
    associated with.
+   [v0.1.0-Proposed] The Priority field is used to provide a form of QoS
+   on the network. Packets are marked with this field according to their
+   desired latency:
+         0 -- Unbuffered interactive traffic (ssh, telnet, rdesktop, tcp dns)
+         1 -- Application buffered interactive traffic (web, irc, aim)
+         2 -- Data transfer (ftp)
+         3 -- Bulk Traffic (bit torrent and the rest)
+   For the time being, this priority field is used only with RELAY cells, and
+   all the other commands will have an implicit 0 priority. When RELAY cells
+   arrive, low value cells SHOULD be forwarded to the next OR before
+   higher value ones.
+   To avoid 'cheating', exit servers SHOULD verify that the priority fields do 
+   in fact match the destination port.
+   These bits MUST be masked off when forwarded to ORs whose platform string
+   in the directory is below v0.1.0. To discourage the use of old clients 
+   to boost bulk traffic priority, this field MUST be set to 3 upon receiving 
+   cells from an OR or OP whose version is below 0.1.0.
    The 'Command' field holds one of the following values:
          0 -- PADDING     (Padding)                 (See Sec 6.2)
          1 -- CREATE      (Create a circuit)        (See Sec 4)

More information about the tor-dev mailing list