*** empty log message ***

This commit is contained in:
Arvid Norberg 2004-04-17 10:47:31 +00:00
parent 0e0e1d3cd3
commit a715e57699
2 changed files with 37 additions and 19 deletions

View File

@ -34,8 +34,10 @@
</ul> </ul>
</li> </li>
<li><a class="reference" href="#actions" id="id18" name="id18">actions</a></li> <li><a class="reference" href="#actions" id="id18" name="id18">actions</a></li>
<li><a class="reference" href="#extensions" id="id19" name="id19">extensions</a></li> <li><a class="reference" href="#extensions" id="id19" name="id19">extensions</a><ul>
<li><a class="reference" href="#authentication" id="id20" name="id20">authentication</a></li> <li><a class="reference" href="#authentication" id="id20" name="id20">authentication</a></li>
</ul>
</li>
<li><a class="reference" href="#credits" id="id21" name="id21">credits</a></li> <li><a class="reference" href="#credits" id="id21" name="id21">credits</a></li>
</ul> </ul>
</div> </div>
@ -73,7 +75,9 @@ retrying.</p>
<tbody valign="top"> <tbody valign="top">
<tr><td>int64_t</td> <tr><td>int64_t</td>
<td>connection_id</td> <td>connection_id</td>
<td>Not used, ignored by tracker.</td> <td>Must be initialized to 0x41727101980
in network byte order. This will
identify the protocol.</td>
</tr> </tr>
<tr><td>int32_t</td> <tr><td>int32_t</td>
<td>action</td> <td>action</td>
@ -150,7 +154,8 @@ establishing the connection.</td>
</tr> </tr>
<tr><td>int32_t</td> <tr><td>int32_t</td>
<td>action</td> <td>action</td>
<td>Action. in this case, 1 for announce.</td> <td>Action. in this case, 1 for announce.
See <a class="reference" href="#actions">actions</a>.</td>
</tr> </tr>
<tr><td>int32_t</td> <tr><td>int32_t</td>
<td>transaction_id</td> <td>transaction_id</td>
@ -239,7 +244,8 @@ in the reply. Use -1 for default.</td>
<td>action</td> <td>action</td>
<td>The action this is a reply to. Should <td>The action this is a reply to. Should
in this case be 1 for announce. in this case be 1 for announce.
If 3 (for error) see <a class="reference" href="#errors">errors</a>.</td> If 3 (for error) see <a class="reference" href="#errors">errors</a>.
See <a class="reference" href="#actions">actions</a>.</td>
</tr> </tr>
<tr><td>int32_t</td> <tr><td>int32_t</td>
<td>transaction_id</td> <td>transaction_id</td>
@ -315,7 +321,7 @@ establishing of the connection.</td>
<tr><td>int32_t</td> <tr><td>int32_t</td>
<td>action</td> <td>action</td>
<td>The action, in this case, 2 for <td>The action, in this case, 2 for
scrape.</td> scrape. See <a class="reference" href="#actions">actions</a>.</td>
</tr> </tr>
<tr><td>int32_t</td> <tr><td>int32_t</td>
<td>transaction_id</td> <td>transaction_id</td>
@ -380,7 +386,8 @@ If 3 (for error) see <a class="reference" href="#errors">errors</a>.</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<p>The rest of the packet contains a variable number of the following structures:</p> <p>The rest of the packet contains the following structures once for each info-hash
you asked in the scrape request.</p>
<table border class="table"> <table border class="table">
<colgroup> <colgroup>
<col width="18%" /> <col width="18%" />
@ -432,7 +439,8 @@ leechers.</td>
<tbody valign="top"> <tbody valign="top">
<tr><td>int32_t</td> <tr><td>int32_t</td>
<td>action</td> <td>action</td>
<td>The action, in this case 3, for error.</td> <td>The action, in this case 3, for error.
See <a class="reference" href="#actions">actions</a>.</td>
</tr> </tr>
<tr><td>int32_t</td> <tr><td>int32_t</td>
<td>transaction_id</td> <td>transaction_id</td>
@ -469,9 +477,8 @@ bits are assigned:</p>
<li>1 = <a class="reference" href="#authentication">authentication</a>.</li> <li>1 = <a class="reference" href="#authentication">authentication</a>.</li>
</ul> </ul>
</blockquote> </blockquote>
</div>
<div class="section" id="authentication"> <div class="section" id="authentication">
<h1><a name="authentication">authentication</a></h1> <h2><a name="authentication">authentication</a></h2>
<p>The packet will have an authentication part <p>The packet will have an authentication part
appended to it. It has the following format:</p> appended to it. It has the following format:</p>
<table border class="table"> <table border class="table">
@ -497,16 +504,19 @@ username.</td>
<td>The username, the number of characters <td>The username, the number of characters
as specified in the previous field.</td> as specified in the previous field.</td>
</tr> </tr>
<tr><td>uint8_t[20]</td> <tr><td>uint8_t[8]</td>
<td>passwd_hash</td> <td>passwd_hash</td>
<td>sha1(packet + sha1(password)) <td>sha1(packet + sha1(password))
The packet in this case means the The packet in this case means the
entire packet except these 20 bytes entire packet except these 8 bytes
that are the password hash.</td> that are the password hash. These are
the 8 first bytes (most significant)
from the 20 bytes hash calculated.</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div> </div>
</div>
<div class="section" id="credits"> <div class="section" id="credits">
<h1><a name="credits">credits</a></h1> <h1><a name="credits">credits</a></h1>
<p>Protocol designed by Olaf van der Spek</p> <p>Protocol designed by Olaf van der Spek</p>

View File

@ -40,7 +40,9 @@ Client sends packet:
+-------------+---------------------+----------------------------------------+ +-------------+---------------------+----------------------------------------+
| size | name | description | | size | name | description |
+=============+=====================+========================================+ +=============+=====================+========================================+
| int64_t | connection_id | Not used, ignored by tracker. | | int64_t | connection_id | Must be initialized to 0x41727101980 |
| | | in network byte order. This will |
| | | identify the protocol. |
+-------------+---------------------+----------------------------------------+ +-------------+---------------------+----------------------------------------+
| int32_t | action | 0 for a connection request | | int32_t | action | 0 for a connection request |
+-------------+---------------------+----------------------------------------+ +-------------+---------------------+----------------------------------------+
@ -83,6 +85,7 @@ Client sends packet:
| | | establishing the connection. | | | | establishing the connection. |
+-------------+---------------------+----------------------------------------+ +-------------+---------------------+----------------------------------------+
| int32_t | action | Action. in this case, 1 for announce. | | int32_t | action | Action. in this case, 1 for announce. |
| | | See actions_. |
+-------------+---------------------+----------------------------------------+ +-------------+---------------------+----------------------------------------+
| int32_t | transaction_id | Randomized by client. | | int32_t | transaction_id | Randomized by client. |
+-------------+---------------------+----------------------------------------+ +-------------+---------------------+----------------------------------------+
@ -132,6 +135,7 @@ Server replies with packet:
| int32_t | action | The action this is a reply to. Should | | int32_t | action | The action this is a reply to. Should |
| | | in this case be 1 for announce. | | | | in this case be 1 for announce. |
| | | If 3 (for error) see errors_. | | | | If 3 (for error) see errors_. |
| | | See actions_. |
+-------------+---------------------+----------------------------------------+ +-------------+---------------------+----------------------------------------+
| int32_t | transaction_id | Must match the transaction_id sent | | int32_t | transaction_id | Must match the transaction_id sent |
| | | in the announce request. | | | | in the announce request. |
@ -172,7 +176,7 @@ Client sends packet:
| | | establishing of the connection. | | | | establishing of the connection. |
+-------------+---------------------+----------------------------------------+ +-------------+---------------------+----------------------------------------+
| int32_t | action | The action, in this case, 2 for | | int32_t | action | The action, in this case, 2 for |
| | | scrape. | | | | scrape. See actions_. |
+-------------+---------------------+----------------------------------------+ +-------------+---------------------+----------------------------------------+
| int32_t | transaction_id | Randomized by client. | | int32_t | transaction_id | Randomized by client. |
+-------------+---------------------+----------------------------------------+ +-------------+---------------------+----------------------------------------+
@ -204,7 +208,8 @@ Server replies with packet:
| int32_t | transaction_id | Must match the sent transaction id. | | int32_t | transaction_id | Must match the sent transaction id. |
+-------------+---------------------+----------------------------------------+ +-------------+---------------------+----------------------------------------+
The rest of the packet contains a variable number of the following structures: The rest of the packet contains the following structures once for each info-hash
you asked in the scrape request.
+-------------+---------------------+----------------------------------------+ +-------------+---------------------+----------------------------------------+
| size | name | description | | size | name | description |
@ -231,6 +236,7 @@ server replies packet:
| size | name | description | | size | name | description |
+=============+=====================+========================================+ +=============+=====================+========================================+
| int32_t | action | The action, in this case 3, for error. | | int32_t | action | The action, in this case 3, for error. |
| | | See actions_. |
+-------------+---------------------+----------------------------------------+ +-------------+---------------------+----------------------------------------+
| int32_t | transaction_id | Must match the transaction_id sent | | int32_t | transaction_id | Must match the transaction_id sent |
| | | from the client. | | | | from the client. |
@ -262,7 +268,7 @@ bits are assigned:
authentication authentication
++++++++++++++ --------------
The packet will have an authentication part The packet will have an authentication part
appended to it. It has the following format: appended to it. It has the following format:
@ -276,10 +282,12 @@ appended to it. It has the following format:
| int8_t[] | username | The username, the number of characters | | int8_t[] | username | The username, the number of characters |
| | | as specified in the previous field. | | | | as specified in the previous field. |
+-------------+---------------------+----------------------------------------+ +-------------+---------------------+----------------------------------------+
| uint8_t[20] | passwd_hash | sha1(packet + sha1(password)) | | uint8_t[8] | passwd_hash | sha1(packet + sha1(password)) |
| | | The packet in this case means the | | | | The packet in this case means the |
| | | entire packet except these 20 bytes | | | | entire packet except these 8 bytes |
| | | that are the password hash. | | | | that are the password hash. These are |
| | | the 8 first bytes (most significant) |
| | | from the 20 bytes hash calculated. |
+-------------+---------------------+----------------------------------------+ +-------------+---------------------+----------------------------------------+