forked from I2P_Developers/i2p.www
propagate from branch 'i2p.www' (head bffd2812f9c516072d67f9e255c5a6404da88202)
to branch 'i2p.www.revamp' (head a6fb5601cc1d2b4567e099fda4ee15c3b5915465)
This commit is contained in:
@@ -16,12 +16,30 @@ Parameters are only provided in a named way (maps).
|
||||
{%- endtrans %}</p>
|
||||
|
||||
<h4>{% trans %}JSON-RPC 2 format{% endtrans %}</h4>
|
||||
<div class="box" style="clear: none;"><pre>
|
||||
{{ _('Request:') }}
|
||||
{"id":"id", "method":"Method-name","params":{"Param-key-1":"param-value-1", "Param-key-2":"param-value-2", "Token":"**actual token**"}, "jsonrpc":"2.0"}
|
||||
{% highlight lang='json' %}
|
||||
{
|
||||
"id": "id",
|
||||
"method": "Method-name",
|
||||
"params": {
|
||||
"Param-key-1": "param-value-1",
|
||||
"Param-key-2": "param-value-2",
|
||||
"Token": "**actual token**"
|
||||
},
|
||||
"jsonrpc": "2.0"
|
||||
}
|
||||
{% endhighlight %}
|
||||
{{ _('Response:') }}
|
||||
{"id":"id","result":{"Result-key-1":"result-value-1","Result-key-2":"result-value-2"},"jsonrpc":"2.0"}
|
||||
</pre></div>
|
||||
{% highlight lang='json' %}
|
||||
{
|
||||
"id": "id",
|
||||
"result": {
|
||||
"Result-key-1": "result-value-1",
|
||||
"Result-key-2": "result-value-2"
|
||||
},
|
||||
"jsonrpc": "2.0"
|
||||
}
|
||||
{% endhighlight %}
|
||||
<ul>method-name – {{ _('Description') }}
|
||||
<ul>{{ _('Request:') }}
|
||||
<li>Param-key-1 – {{ _('Description') }}</li>
|
||||
|
@@ -394,7 +394,7 @@ Change from Session Tags to
|
||||
<li>{% trans tunnelmessage=site_url('docs/spec/tunnel-message') -%}
|
||||
Several of these ideas may require a new I2NP message type, or
|
||||
set a flag in the
|
||||
<a href="{{ tunnelmessage }}#delivery">Delivery Instructions</a>,
|
||||
<a href="{{ tunnelmessage }}#struct_TunnelMessageDeliveryInstructions">Delivery Instructions</a>,
|
||||
or set a magic number in the first few bytes of the Session Key field
|
||||
and accept a small risk of the random Session Key matching the magic number.
|
||||
{%- endtrans %}</li>
|
||||
|
@@ -153,8 +153,7 @@ the tunnel encryption is sufficient.
|
||||
<p>{% trans commonstructures=site_url('docs/spec/common-structures'),
|
||||
elgamalaes=site_url('docs/how/elgamal-aes'),
|
||||
i2cp=site_url('docs/protocol/i2cp'),
|
||||
i2npspec=site_url('docs/spec/i2np'),
|
||||
tunnelmessage=site_url('docs/spec/tunnel-message') -%}
|
||||
i2npspec=site_url('docs/spec/i2np') -%}
|
||||
At the layer above tunnels, I2P delivers end-to-end messages between
|
||||
<a href="{{ commonstructures }}#struct_Destination">Destinations</a>.
|
||||
Just as within a single tunnel, we use
|
||||
@@ -163,7 +162,7 @@ Each client message as delivered to the router through the
|
||||
<a href="{{ i2cp }}">I2CP interface</a> becomes a single
|
||||
<a href="{{ i2npspec }}#struct_GarlicClove">Garlic Clove</a>
|
||||
with its own
|
||||
<a href="{{ tunnelmessage }}#delivery">Delivery Instructions</a>,
|
||||
<a href="{{ i2npspec }}#struct_GarlicCloveDeliveryInstructions">Delivery Instructions</a>,
|
||||
inside a
|
||||
<a href="{{ i2npspec }}#msg_Garlic">Garlic Message</a>.
|
||||
Delivery Instructions may specify a Destination, Router, or Tunnel.
|
||||
@@ -177,12 +176,11 @@ cloves in the Garlic Message:
|
||||
<img src="/_static/images/garliccloves.png" alt="{{ _('Garlic Message Cloves') }}" title="{{ _('Garlic Message Cloves') }}" style="text-align:center;"/>
|
||||
|
||||
<ol>
|
||||
<li>{% trans i2npspec=site_url('docs/spec/i2np'),
|
||||
tunnelmessage=site_url('docs/spec/tunnel-message') -%}
|
||||
<li>{% trans i2npspec=site_url('docs/spec/i2np') -%}
|
||||
A
|
||||
<a href="{{ i2npspec }}#msg_DeliveryStatus">Delivery Status Message</a>,
|
||||
with
|
||||
<a href="{{ tunnelmessage }}#delivery">Delivery Instructions</a>
|
||||
<a href="{{ i2npspec }}#struct_GarlicCloveDeliveryInstructions">Delivery Instructions</a>
|
||||
specifying that it be sent back to the originating router as an acknowledgment.
|
||||
This is similar to the "reply block" or "reply onion"
|
||||
described in the references.
|
||||
@@ -193,14 +191,13 @@ or take other actions.
|
||||
{%- endtrans %}</li>
|
||||
<li>{% trans i2npspec=site_url('docs/spec/i2np'),
|
||||
commonstructures=site_url('docs/spec/common-structures'),
|
||||
tunnelmessage=site_url('docs/spec/tunnel-message'),
|
||||
netdb=site_url('docs/how/network-database') -%}
|
||||
A
|
||||
<a href="{{ i2npspec }}#msg_DatabaseStore">Database Store Message</a>,
|
||||
containing a
|
||||
<a href="{{ commonstructures }}#struct_LeaseSet">LeaseSet</a>
|
||||
for the originating Destination, with
|
||||
<a href="{{ tunnelmessage }}#delivery">Delivery Instructions</a>
|
||||
<a href="{{ i2npspec }}#struct_GarlicCloveDeliveryInstructions">Delivery Instructions</a>
|
||||
specifying the far-end destination's router.
|
||||
By periodically bundling a LeaseSet, the router ensures that the far-end will be able
|
||||
to maintain communications.
|
||||
@@ -256,7 +253,7 @@ so it is not visible to the tunnel's outbound gateway.
|
||||
The Garlic Message mechanism is very flexible and provides a structure for
|
||||
implementing many types of mixnet delivery methods.
|
||||
Together with the unused delay option in the
|
||||
<a href="{{ tunnelmessage }}#delivery">tunnel message Delivery Instructions</a>,
|
||||
<a href="{{ tunnelmessage }}#struct_TunnelMessageDeliveryInstructions">tunnel message Delivery Instructions</a>,
|
||||
a wide spectrum of batching, delay, mixing, and routing strategies are possible.
|
||||
{%- endtrans %}</p>
|
||||
|
||||
|
@@ -279,7 +279,7 @@ A random number
|
||||
|
||||
<h4><a href="http://docs.i2p-projekt.de/javadoc/net/i2p/data/SessionTag.html">Javadoc</a></h4>
|
||||
|
||||
<h2 id="type_tunnelId">TunnelId</h2>
|
||||
<h2 id="type_TunnelId">TunnelId</h2>
|
||||
<h4>{% trans %}Description{% endtrans %}</h4>
|
||||
<p>{% trans -%}
|
||||
Defines an identifier that is unique to each router in a tunnel.
|
||||
@@ -1010,9 +1010,9 @@ for standard options that are expected to be present in all router infos.
|
||||
|
||||
<h2 id="struct_DeliveryInstructions">Delivery Instructions</h2>
|
||||
<p>{% trans tunnelmessage=site_url('docs/spec/tunnel-message') -%}
|
||||
Tunnel Message Delivery Instructions are defined in the <a href="{{ tunnelmessage }}#delivery">Tunnel Message Specification</a>.
|
||||
Tunnel Message Delivery Instructions are defined in the <a href="{{ tunnelmessage }}#struct_TunnelMessageDeliveryInstructions">Tunnel Message Specification</a>.
|
||||
{% endtrans %}</p>
|
||||
<p>{% trans i2npmessage=site_url('docs/spec/i2np') -%}
|
||||
Garlic Message Delivery Instructions are defined in the <a href="{{ i2npmessage }}#struct_DeliveryInstructions">I2NP Message Specification</a>.
|
||||
Garlic Message Delivery Instructions are defined in the <a href="{{ i2npmessage }}#struct_GarlicCloveDeliveryInstructions">I2NP Message Specification</a>.
|
||||
{% endtrans %}</p>
|
||||
{% endblock %}
|
||||
|
@@ -42,7 +42,7 @@ currently limit messages to about 32 KB, although this may be raised in the futu
|
||||
Repliable datagrams contain a 'from' address and a signature. These add at least 427 bytes of overhead.
|
||||
{%- endtrans %}</p>
|
||||
<h4>Format</h4>
|
||||
<pre>
|
||||
{% highlight lang='dataspec' %}
|
||||
+----+----+----+----+----+----+----+----+
|
||||
| from |
|
||||
+ +
|
||||
@@ -68,27 +68,24 @@ Repliable datagrams contain a 'from' address and a signature. These add at least
|
||||
+----+----+----+----//
|
||||
|
||||
|
||||
|
||||
from :: a <a href="{{ site_url('docs/spec/common-structures') }}#struct_Destination">Destination</a>
|
||||
from :: a `Destination`
|
||||
length: 387+ bytes
|
||||
The originator and signer of the datagram
|
||||
|
||||
signature :: a <a href="{{ site_url('docs/spec/common-structures') }}#type_Signature">Signature</a>
|
||||
Signature type must match the signing public key type in the 'from' Destination.
|
||||
signature :: a `Signature`
|
||||
Signature type must match the signing public key type of $from
|
||||
length: 40+ bytes, as implied by the Signature type.
|
||||
For the default DSA_SHA1 key type:
|
||||
The DSA <a href="{{ site_url('docs/spec/common-structures') }}#type_Signature">signature</a> of the SHA-256 hash of the payload.
|
||||
The DSA `Signature` of the SHA-256 hash of the payload.
|
||||
For other key types:
|
||||
The <a href="{{ site_url('docs/spec/common-structures') }}#type_Signature">signature</a> of the payload.
|
||||
The signature may be verified by the signing public key of the 'from' Destination.
|
||||
The `Signature` of the payload.
|
||||
The signature may be verified by the signing public key of $from
|
||||
|
||||
payload :: The data
|
||||
Length: 0 to ~31.5 KB (see notes)
|
||||
|
||||
Total length: Payload length + 427+
|
||||
|
||||
|
||||
</pre>
|
||||
{% endhighlight %}
|
||||
|
||||
<h4>{% trans %}Notes{% endtrans %}</h4>
|
||||
<ul>
|
||||
|
@@ -299,7 +299,7 @@ A basic summary of the I2CP protocol versions is as follows. For details, see be
|
||||
|
||||
|
||||
|
||||
<h3 id="struct_header">I2CP message header</h3>
|
||||
<h3 id="struct_I2CPMessageHeader">I2CP message header</h3>
|
||||
<h4>Description</h4>
|
||||
<p>
|
||||
Common header to all I2CP messages, containing the message length and message type.
|
||||
|
@@ -90,7 +90,7 @@ see the NTCP and SSU transport documentation for details.
|
||||
The following structures are elements of multiple I2NP messages.
|
||||
They are not complete messages.
|
||||
|
||||
<h3 id="struct_header">I2NP message header</h3>
|
||||
<h3 id="struct_I2NPMessageHeader">I2NP message header</h3>
|
||||
<h4>Description</h4>
|
||||
<p>
|
||||
Common header to all I2NP messages, which contains important information like a checksum, expiration date, etc.
|
||||
@@ -122,7 +122,7 @@ Short (SSU, 5 bytes):
|
||||
{% endhighlight %}
|
||||
|
||||
<h4>Definition</h4>
|
||||
<pre>
|
||||
{% highlight lang='dataspec' %}
|
||||
type :: `Integer`
|
||||
length -> 1 byte
|
||||
|
||||
@@ -155,11 +155,11 @@ chks :: `Integer`
|
||||
purpose -> checksum of the payload
|
||||
SHA256 hash truncated to the first byte
|
||||
|
||||
data :: Data
|
||||
data ::
|
||||
length -> $size bytes
|
||||
|
||||
purpose -> actual message contents
|
||||
</pre>
|
||||
{% endhighlight %}
|
||||
|
||||
<h4>Notes</h4>
|
||||
<ul><li>
|
||||
@@ -274,11 +274,12 @@ ElGamal and AES encrypted:
|
||||
{% endhighlight %}
|
||||
|
||||
<h4>Definition</h4>
|
||||
<pre>
|
||||
{% highlight lang='dataspec' %}
|
||||
unencrypted:
|
||||
|
||||
receive_tunnel :: `TunnelId`
|
||||
length -> 4 bytes
|
||||
|
||||
our_ident :: `Hash`
|
||||
length -> 32 bytes
|
||||
|
||||
@@ -335,7 +336,7 @@ encrypted_data :: ElGamal and AES encrypted data
|
||||
|
||||
total length: 528
|
||||
|
||||
</pre>
|
||||
{% endhighlight %}
|
||||
|
||||
<h4>Notes</h4>
|
||||
<ul><li>
|
||||
@@ -369,18 +370,18 @@ unencrypted:
|
||||
+----+----+----+----+----+----+----+----+
|
||||
{% endhighlight %}
|
||||
<h4>Definition</h4>
|
||||
<pre>
|
||||
{% highlight lang='dataspec' %}
|
||||
unencrypted:
|
||||
bytes 0-31 : SHA-256 Hash of bytes 32-527
|
||||
bytes 32-526 : random data
|
||||
byte 527 : reply
|
||||
|
||||
encrypted:
|
||||
bytes 0-527: AES-encrypted record(note: same size as BuildRequestRecord)
|
||||
bytes 0-527: AES-encrypted record (note: same size as `BuildRequestRecord`)
|
||||
|
||||
total length: 528
|
||||
|
||||
</pre>
|
||||
{% endhighlight %}
|
||||
|
||||
<h4>Notes</h4>
|
||||
<ul><li>
|
||||
@@ -411,7 +412,7 @@ unencrypted:
|
||||
+----+----+----+----+----+----+----+
|
||||
{% endhighlight %}
|
||||
<h4>Definition</h4>
|
||||
<pre>
|
||||
{% highlight lang='dataspec' %}
|
||||
unencrypted:
|
||||
Delivery Instructions :: as defined below
|
||||
Length varies but is typically 1, 33, or 37 bytes
|
||||
@@ -424,7 +425,7 @@ Expiration :: `Date` (8 bytes)
|
||||
|
||||
Certificate :: Always NULL in the current implementation (3 bytes total, all zeroes)
|
||||
|
||||
</pre>
|
||||
{% endhighlight %}
|
||||
|
||||
<h4>Notes</h4>
|
||||
<ul>
|
||||
@@ -450,7 +451,7 @@ Certificate :: Always NULL in the current implementation (3 bytes total, all zer
|
||||
</ul>
|
||||
|
||||
|
||||
<h3 id="struct_DeliveryInstructions">Garlic Clove Delivery Instructions</h3>
|
||||
<h3 id="struct_GarlicCloveDeliveryInstructions">Garlic Clove Delivery Instructions</h3>
|
||||
|
||||
<p>
|
||||
This specification is for Delivery Instructions inside Garlic Cloves only.
|
||||
@@ -458,7 +459,7 @@ Note that "Delivery Instructions" are also used inside
|
||||
Tunnel Messages,
|
||||
where the format is significantly different.
|
||||
See the
|
||||
<a href="{{ site_url('docs/spec/tunnel-message') }}#delivery">Tunnel Message documentation</a>
|
||||
<a href="{{ site_url('docs/spec/tunnel-message') }}#struct_TunnelMessageDeliveryInstructions">Tunnel Message documentation</a>
|
||||
for details.
|
||||
Do NOT use the following specification for Tunnel Message Delivery Instructions!
|
||||
|
||||
@@ -488,8 +489,8 @@ Do NOT use the following specification for Tunnel Message Delivery Instructions!
|
||||
{% endhighlight %}
|
||||
|
||||
<h4>Definition</h4>
|
||||
<pre>
|
||||
flag:
|
||||
{% highlight lang='dataspec' %}
|
||||
flag ::
|
||||
1 byte
|
||||
Bit order: 76543210
|
||||
bit 7: encrypted? Unimplemented, always 0
|
||||
@@ -500,33 +501,33 @@ flag:
|
||||
If 1, four delay bytes are included
|
||||
bits 3-0: reserved, set to 0 for compatibility with future uses
|
||||
|
||||
Session Key:
|
||||
Session Key ::
|
||||
32 bytes
|
||||
Optional, present encrypt flag bit is set. Unimplemented, never set, never present.
|
||||
Optional, present if encrypt flag bit is set. Unimplemented, never set, never present.
|
||||
|
||||
To Hash:
|
||||
To Hash ::
|
||||
32 bytes
|
||||
Optional, present if delivery type is DESTINATION, ROUTER, or TUNNEL
|
||||
If DESTINATION, the SHA256 Hash of the destination
|
||||
If ROUTER, the SHA256 Hash of the router
|
||||
If TUNNEL, the SHA256 Hash of the gateway router
|
||||
|
||||
Tunnel ID:
|
||||
Tunnel ID :: `TunnelId`
|
||||
4 bytes
|
||||
Optional, present if delivery type is TUNNEL
|
||||
The destination tunnel ID
|
||||
|
||||
Delay:
|
||||
Delay :: `Integer`
|
||||
4 bytes
|
||||
Optional, present if delay included flag is set
|
||||
Not fully implemented. A 4 byte integer specifying the delay in seconds.
|
||||
Not fully implemented. Specifies the delay in seconds.
|
||||
|
||||
Total length: Typical length is:
|
||||
1 byte for LOCAL delivery;
|
||||
33 bytes for ROUTER / DESTINATION delivery;
|
||||
37 bytes for TUNNEL delivery
|
||||
|
||||
</pre>
|
||||
{% endhighlight %}
|
||||
|
||||
|
||||
|
||||
@@ -606,9 +607,9 @@ with reply token:
|
||||
+ +
|
||||
| |
|
||||
+----+----+----+----+----+----+----+----+
|
||||
|type| reply token | reply tunnel-
|
||||
|type| reply token |reply_tunnelId
|
||||
+----+----+----+----+----+----+----+----+
|
||||
Id | SHA256 of the gateway RouterInfo |
|
||||
| SHA256 of the gateway RouterInfo |
|
||||
+----+ +
|
||||
| |
|
||||
+ +
|
||||
@@ -633,12 +634,12 @@ with reply token == 0:
|
||||
+----+----+----+----+----+-//
|
||||
{% endhighlight %}
|
||||
<h4>Definition</h4>
|
||||
<pre>
|
||||
key:
|
||||
{% highlight lang='dataspec' %}
|
||||
key ::
|
||||
32 bytes
|
||||
SHA256 hash
|
||||
|
||||
type:
|
||||
type ::
|
||||
1 byte
|
||||
type identifier
|
||||
bit 0:
|
||||
@@ -648,32 +649,32 @@ type:
|
||||
Through release 0.9.17, must be 0
|
||||
As of release 0.9.18, ignored, reserved for future options, set to 0 for compatibility
|
||||
|
||||
reply token:
|
||||
reply token ::
|
||||
4 bytes
|
||||
If greater than zero, a <a href="#msg_DeliveryStatus">Delivery Status Message</a>
|
||||
If greater than zero, a Delivery Status Message
|
||||
is requested with the Message ID set to the value of the Reply Token.
|
||||
A floodfill router is also expected to flood the data to the closest floodfill peers
|
||||
if the token is greater than zero.
|
||||
|
||||
reply tunnelId:
|
||||
4 byte `TunnelID`
|
||||
reply_tunnelId ::
|
||||
4 byte `TunnelId`
|
||||
Only included if reply token > 0
|
||||
This is the <a href="{{ site_url('docs/spec/common-structures') }}#type_TunnelId">tunnel ID</a> of the inbound gateway of the tunnel the response should be sent to
|
||||
If the tunnelId is zero, the reply is sent directy to the reply gateway router.
|
||||
This is the `TunnelId` of the inbound gateway of the tunnel the response should be sent to
|
||||
If $reply_tunnelId is zero, the reply is sent directy to the reply gateway router.
|
||||
|
||||
reply gateway:
|
||||
reply gateway ::
|
||||
32 bytes
|
||||
Hash of the routerInfo entry to reach the gateway
|
||||
Only included if reply token > 0
|
||||
If the tunnelId is nonzero, this is the router hash of the inbound gateway
|
||||
If $reply_tunnelId is nonzero, this is the router hash of the inbound gateway
|
||||
of the tunnel the response should be sent to.
|
||||
If the tunnelId is zero, this is the router hash the response should be sent to.
|
||||
If $reply_tunnelId is zero, this is the router hash the response should be sent to.
|
||||
|
||||
data:
|
||||
If type == 0, data is a 2-byte integer specifying the number of bytes that follow,
|
||||
data ::
|
||||
If type == 0, data is a 2-byte `Integer` specifying the number of bytes that follow,
|
||||
followed by a gzip-compressed `RouterInfo`.
|
||||
If type == 1, data is an uncompressed `LeaseSet`.
|
||||
</pre>
|
||||
{% endhighlight %}
|
||||
|
||||
<h4>Notes</h4>
|
||||
<ul><li>
|
||||
@@ -744,7 +745,7 @@ The key is the "real" hash of the RouterIdentity or Destination, NOT the routing
|
||||
{% endhighlight %}
|
||||
|
||||
<h4>Definition</h4>
|
||||
<pre>
|
||||
{% highlight lang='dataspec' %}
|
||||
key ::
|
||||
32 bytes
|
||||
SHA256 hash of the object to lookup
|
||||
@@ -772,10 +773,10 @@ flags ::
|
||||
through release 0.9.5, must be set to 00
|
||||
as of release 0.9.6, ignored
|
||||
as of release 0.9.16:
|
||||
00 => normal lookup, return RI or LS or DSRM
|
||||
01 => LS lookup, return LS or DSRM
|
||||
10 => RI lookup, return RI or DSRM
|
||||
11 => exploration lookup, return DSRM containing non-floodfill routers only
|
||||
00 => normal lookup, return RI or LS or `DatabaseSearchReplyMessage`
|
||||
01 => LS lookup, return LS or `DatabaseSearchReplyMessage`
|
||||
10 => RI lookup, return RI or `DatabaseSearchReplyMessage`
|
||||
11 => exploration lookup, return `DatabaseSearchReplyMessage` containing non-floodfill routers only
|
||||
(replaces an excludedPeer of all zeroes)
|
||||
bits 7-4:
|
||||
through release 0.9.5, must be set to 0
|
||||
@@ -789,14 +790,14 @@ reply_tunnelId ::
|
||||
size ::
|
||||
2 byte `Integer`
|
||||
valid range: 0-512
|
||||
number of peers to exclude from the DatabaseSearchReply Message
|
||||
number of peers to exclude from the `DatabaseSearchReplyMessage`
|
||||
|
||||
excludedPeers ::
|
||||
$size SHA256 hashes of 32 bytes each (total $size*32 bytes)
|
||||
if the lookup fails, these peers are requested to be excluded from the list in
|
||||
the DatabaseSearchReply Message.
|
||||
the `DatabaseSearchReplyMessage`.
|
||||
if excludedPeers includes a hash of all zeroes, the request is exploratory, and
|
||||
the DatabaseSearchReply Message is requested to list non-floodfill routers only.
|
||||
the `DatabaseSearchReplyMessage` is requested to list non-floodfill routers only.
|
||||
|
||||
reply_key ::
|
||||
32 byte `SessionKey`
|
||||
@@ -812,7 +813,7 @@ reply_tags ::
|
||||
one or more 32 byte `SessionTags` (typically one)
|
||||
only included if encryptionFlag == 1, only as of release 0.9.7
|
||||
|
||||
</pre>
|
||||
{% endhighlight %}
|
||||
|
||||
<h4>Notes</h4>
|
||||
<ul><li>
|
||||
@@ -850,17 +851,13 @@ The lookup key and exclude keys are the "real" hashes, NOT routing keys.
|
||||
+ +
|
||||
| |
|
||||
+----+----+----+----+----+----+----+----+
|
||||
|num | peer_hash $1 |
|
||||
|num | peer_hashes |
|
||||
+----+ +
|
||||
| |
|
||||
+ +
|
||||
| |
|
||||
+ +
|
||||
| |
|
||||
+ +----+----+----+----+----+----+----+
|
||||
| | |
|
||||
+----+ $num peer_hashes +
|
||||
|
||||
+ +----+----+----+----+----+----+----+
|
||||
| | from |
|
||||
+----+ +
|
||||
@@ -877,7 +874,7 @@ The lookup key and exclude keys are the "real" hashes, NOT routing keys.
|
||||
{% endhighlight %}
|
||||
|
||||
<h4>Definition</h4>
|
||||
<pre>
|
||||
{% highlight lang='dataspec' %}
|
||||
key ::
|
||||
32 bytes
|
||||
SHA256 of the object being searched
|
||||
@@ -886,14 +883,14 @@ num ::
|
||||
1 byte `Integer`
|
||||
number of peer hashes that follow, 0-255
|
||||
|
||||
peer_hash ($num entries) ::
|
||||
32 bytes
|
||||
peer_hashes ::
|
||||
$num SHA256 hashes of 32 bytes each (total $num*32 bytes)
|
||||
SHA256 of the `RouterIdentity` that the other router thinks is close to the key
|
||||
|
||||
from ::
|
||||
32 bytes
|
||||
SHA256 of the `RouterInfo` of the router this reply was sent from
|
||||
</pre>
|
||||
{% endhighlight %}
|
||||
|
||||
<h4>Notes</h4>
|
||||
<ul><li>
|
||||
@@ -927,15 +924,15 @@ The lookup key, peer hashes, and from hash are "real" hashes, NOT routing keys.
|
||||
{% endhighlight %}
|
||||
|
||||
<h4>Definition</h4>
|
||||
<pre>
|
||||
msg_id ::
|
||||
{% highlight lang='dataspec' %}
|
||||
msg_id :: `Integer`
|
||||
4 bytes
|
||||
unique ID of the message we deliver the DeliveryStatus for (see common I2NP header for details)
|
||||
unique ID of the message we deliver the DeliveryStatus for (see `I2NPMessageHeader` for details)
|
||||
|
||||
time_stamp :: Date
|
||||
time_stamp :: `Date`
|
||||
8 bytes
|
||||
time the message was successfully created or delivered
|
||||
</pre>
|
||||
{% endhighlight %}
|
||||
|
||||
<h4>Notes</h4>
|
||||
<ul><li>
|
||||
@@ -990,11 +987,11 @@ unencrypted data:
|
||||
{% endhighlight %}
|
||||
|
||||
<h4>Definition</h4>
|
||||
<pre>
|
||||
{% highlight lang='dataspec' %}
|
||||
Encrypted:
|
||||
|
||||
length ::
|
||||
4 byte Integer
|
||||
4 byte `Integer`
|
||||
number of bytes that follow 0 - 64 KB
|
||||
|
||||
data ::
|
||||
@@ -1005,7 +1002,7 @@ data ::
|
||||
Unencrypted data:
|
||||
|
||||
num ::
|
||||
1 byte Integer number of `GarlicCloves` to follow
|
||||
1 byte `Integer` number of `GarlicClove`s to follow
|
||||
|
||||
clove :: a `GarlicClove`
|
||||
|
||||
@@ -1015,7 +1012,7 @@ Message_ID :: 4 byte `Integer`
|
||||
|
||||
Expiration :: `Date` (8 bytes)
|
||||
|
||||
</pre>
|
||||
{% endhighlight %}
|
||||
|
||||
<h4>Notes</h4>
|
||||
<ul>
|
||||
@@ -1065,15 +1062,15 @@ Expiration :: `Date` (8 bytes)
|
||||
{% endhighlight %}
|
||||
|
||||
<h4>Definition</h4>
|
||||
<pre>
|
||||
{% highlight lang='dataspec' %}
|
||||
tunnelId ::
|
||||
4 byte `TunnelID`
|
||||
4 byte `TunnelId`
|
||||
identifies the tunnel this message is directed at
|
||||
|
||||
data ::
|
||||
1024 bytes
|
||||
payload data.. fixed to 1024 bytes
|
||||
</pre>
|
||||
{% endhighlight %}
|
||||
|
||||
<h4>Notes</h4>
|
||||
<ul>
|
||||
@@ -1097,9 +1094,9 @@ data ::
|
||||
{% endhighlight %}
|
||||
|
||||
<h4>Definition</h4>
|
||||
<pre>
|
||||
{% highlight lang='dataspec' %}
|
||||
tunnelId ::
|
||||
4 byte `TunnelID`
|
||||
4 byte `TunnelId`
|
||||
identifies the tunnel this message is directed at
|
||||
|
||||
length ::
|
||||
@@ -1109,7 +1106,7 @@ length ::
|
||||
data ::
|
||||
$length bytes
|
||||
actual payload of this message
|
||||
</pre>
|
||||
{% endhighlight %}
|
||||
|
||||
<h4>Notes</h4>
|
||||
<ul>
|
||||
@@ -1134,7 +1131,7 @@ data ::
|
||||
{% endhighlight %}
|
||||
|
||||
<h4>Definition</h4>
|
||||
<pre>
|
||||
{% highlight lang='dataspec' %}
|
||||
length ::
|
||||
4 bytes
|
||||
length of the payload
|
||||
@@ -1142,7 +1139,7 @@ length ::
|
||||
data ::
|
||||
$length bytes
|
||||
actual payload of this message
|
||||
</pre>
|
||||
{% endhighlight %}
|
||||
|
||||
<h3 id="msg_TunnelBuild">TunnelBuild</h3>
|
||||
{% highlight lang='dataspec' %}
|
||||
@@ -1162,11 +1159,11 @@ data ::
|
||||
{% endhighlight %}
|
||||
|
||||
<h4>Definition</h4>
|
||||
<pre>
|
||||
Just 8 `BuildRequestRecords` attached together
|
||||
{% highlight lang='dataspec' %}
|
||||
Just 8 `BuildRequestRecord`s attached together
|
||||
record size: 528 bytes
|
||||
total size: 8*528 = 4224 bytes
|
||||
</pre>
|
||||
{% endhighlight %}
|
||||
|
||||
<h4>Notes</h4>
|
||||
<ul>
|
||||
@@ -1179,7 +1176,7 @@ total size: 8*528 = 4224 bytes
|
||||
|
||||
<h3 id="msg_TunnelBuildReply">TunnelBuildReply</h3>
|
||||
{% highlight lang='dataspec' %}
|
||||
same format as `TunnelBuild` message, with `BuildResponseRecords`
|
||||
Same format as `TunnelBuildMessage`, with `BuildResponseRecord`s
|
||||
{% endhighlight %}
|
||||
|
||||
<h4>Notes</h4>
|
||||
@@ -1198,17 +1195,17 @@ same format as `TunnelBuild` message, with `BuildResponseRecords`
|
||||
{% endhighlight %}
|
||||
|
||||
<h4>Definition</h4>
|
||||
<pre>
|
||||
Same format as TunnelBuildMessage, except for the addition of an "num" field in front
|
||||
and $num number of Build Request Records instead of 8
|
||||
{% highlight lang='dataspec' %}
|
||||
Same format as `TunnelBuildMessage`, except for the addition of a $num field in front
|
||||
and $num number of `BuildRequestRecord`s instead of 8
|
||||
|
||||
num ::
|
||||
1 byte `Integer`
|
||||
Valid values: 1-8
|
||||
|
||||
record size: 528 bytes
|
||||
total size: 1 + $num*528
|
||||
</pre>
|
||||
total size: 1+$num*528
|
||||
{% endhighlight %}
|
||||
|
||||
<h4>Notes</h4>
|
||||
<ul>
|
||||
@@ -1228,7 +1225,9 @@ total size: 1 + $num*528
|
||||
{% endhighlight %}
|
||||
|
||||
<h4>Definition</h4>
|
||||
Same format as VariableTunnelBuild message, with Build Response Records.
|
||||
{% highlight lang='dataspec' %}
|
||||
Same format as `VariableTunnelBuildMessage`, with `BuildResponseRecord`s.
|
||||
{% endhighlight %}
|
||||
|
||||
|
||||
<h4>Notes</h4>
|
||||
|
@@ -31,7 +31,7 @@ observing message size.
|
||||
After the tunnel messages are created, they are encrypted as described in
|
||||
<a href="{{ site_url('docs/tunnels/implementation') }}">the tunnel documentation</a>.
|
||||
|
||||
<h2 id="msg_Data">Tunnel Message (Encrypted)</h2>
|
||||
<h2 id="msg_Tunnel">Tunnel Message (Encrypted)</h2>
|
||||
These are the contents of a tunnel data message after encryption.
|
||||
{% highlight lang='dataspec' %}
|
||||
+----+----+----+----+----+----+----+----+
|
||||
@@ -52,7 +52,7 @@ These are the contents of a tunnel data message after encryption.
|
||||
|
||||
<h4>Definition</h4>
|
||||
{% highlight lang='dataspec' %}
|
||||
Tunnel ID ::
|
||||
Tunnel ID :: `TunnelId`
|
||||
4 bytes
|
||||
the ID of the next hop
|
||||
|
||||
@@ -69,7 +69,7 @@ total size: 1028 Bytes
|
||||
{% endhighlight %}
|
||||
|
||||
|
||||
<h2 id="msg_Data">Tunnel Message (Decrypted)</h2>
|
||||
<h2>Tunnel Message (Decrypted)</h2>
|
||||
These are the contents of a tunnel data message when decrypted.
|
||||
{% highlight lang='dataspec' %}
|
||||
+----+----+----+----+----+----+----+----+
|
||||
@@ -112,8 +112,8 @@ These are the contents of a tunnel data message when decrypted.
|
||||
{% endhighlight %}
|
||||
|
||||
<h4>Definition</h4>
|
||||
<pre>
|
||||
Tunnel ID ::
|
||||
{% highlight lang='dataspec' %}
|
||||
Tunnel ID :: `TunnelId`
|
||||
4 bytes
|
||||
the ID of the next hop
|
||||
|
||||
@@ -133,10 +133,9 @@ Zero ::
|
||||
1 byte
|
||||
the value 0x00
|
||||
|
||||
Delivery Instructions ::
|
||||
Delivery Instructions :: `TunnelMessageDeliveryInstructions`
|
||||
length varies but is typically 7, 39, 43, or 47 bytes
|
||||
Indicates the fragment and the routing for the fragment
|
||||
See <a href="#delivery">below</a> for specification
|
||||
|
||||
Message Fragment ::
|
||||
1 to 996 bytes, actual maximum depends on delivery instruction size
|
||||
@@ -144,7 +143,7 @@ Message Fragment ::
|
||||
|
||||
total size: 1028 Bytes
|
||||
|
||||
</pre>
|
||||
{% endhighlight %}
|
||||
|
||||
<h4>Notes</h4>
|
||||
<ul><li>
|
||||
@@ -157,7 +156,7 @@ and take the Hash of that.
|
||||
</li></ul>
|
||||
|
||||
|
||||
<h2 id="delivery">Tunnel Message Delivery Instructions</h2>
|
||||
<h2 id="struct_TunnelMessageDeliveryInstructions">Tunnel Message Delivery Instructions</h2>
|
||||
|
||||
<p>The instructions are encoded with a single control byte, followed by any
|
||||
necessary additional information. The first bit (MSB) in that control byte determines
|
||||
@@ -171,7 +170,7 @@ Note that "Delivery Instructions" are also used inside
|
||||
<a href="{{ site_url('docs/spec/i2np') }}#struct_GarlicClove">Garlic Cloves</a>,
|
||||
where the format is significantly different.
|
||||
See the
|
||||
<a href="{{ site_url('docs/spec/i2np') }}#struct_DeliveryInstructions">I2NP documentation</a>
|
||||
<a href="{{ site_url('docs/spec/i2np') }}#struct_GarlicCloveDeliveryInstructions">I2NP documentation</a>
|
||||
for details.
|
||||
Do NOT use the following specification for Garlic Clove Delivery Instructions!
|
||||
|
||||
@@ -196,8 +195,8 @@ or a complete (unfragmented) I2NP message, and the instructions are:</p>
|
||||
{% endhighlight %}
|
||||
|
||||
<h4>Definition</h4>
|
||||
<pre>
|
||||
flag:
|
||||
{% highlight lang='dataspec' %}
|
||||
flag ::
|
||||
1 byte
|
||||
Bit order: 76543210
|
||||
bit 7: 0 to specify an initial fragment or an unfragmented message
|
||||
@@ -212,39 +211,39 @@ flag:
|
||||
If 1, extended options are included
|
||||
bits 1-0: reserved, set to 0 for compatibility with future uses
|
||||
|
||||
Tunnel ID:
|
||||
Tunnel ID :: `TunnelId`
|
||||
4 bytes
|
||||
Optional, present if delivery type is TUNNEL
|
||||
The destination tunnel ID
|
||||
|
||||
To Hash:
|
||||
To Hash ::
|
||||
32 bytes
|
||||
Optional, present if delivery type is DESTINATION, ROUTER, or TUNNEL
|
||||
If DESTINATION, the SHA256 Hash of the destination
|
||||
If ROUTER, the SHA256 Hash of the router
|
||||
If TUNNEL, the SHA256 Hash of the gateway router
|
||||
|
||||
Delay:
|
||||
Delay ::
|
||||
1 byte
|
||||
Optional, present if delay included flag is set
|
||||
In tunnel messages: Unimplemented, never present; original specification:
|
||||
bit 7: type (0 = strict, 1 = randomized)
|
||||
bits 6-0: delay exponent (2^value minutes)
|
||||
|
||||
Message ID:
|
||||
Message ID ::
|
||||
4 bytes
|
||||
Optional, present if this message is the first of 2 or more fragments
|
||||
(i.e. if the fragmented bit is 1)
|
||||
An ID that uniquely identifies all fragments as belonging to a single message
|
||||
(the current implementation uses the <a href="{{ site_url('docs/spec/i2np') }}#struct_header">I2NP Message ID</a>)
|
||||
(the current implementation uses `I2NPMessageHeader.msg_id`)
|
||||
|
||||
Extended Options:
|
||||
Extended Options ::
|
||||
2 or more bytes
|
||||
Optional, present if extend options flag is set
|
||||
Unimplemented, never present; original specification:
|
||||
One byte length and then that many bytes
|
||||
|
||||
size:
|
||||
size ::
|
||||
2 bytes
|
||||
The length of the fragment that follows
|
||||
Valid values: 1 to approx. 960 in a tunnel message
|
||||
@@ -254,7 +253,7 @@ Total length: Typical length is:
|
||||
35 bytes for ROUTER / DESTINATION delivery or 39 bytes for TUNNEL delivery (unfragmented tunnel message);
|
||||
39 bytes for ROUTER delivery or 43 bytes for TUNNEL delivery (first fragment)
|
||||
|
||||
</pre>
|
||||
{% endhighlight %}
|
||||
|
||||
<h3>Follow-on Fragment Delivery Instructions</h3>
|
||||
<p>If the MSB of the first byte is 1, this is a follow-on fragment, and the instructions are:</p>
|
||||
@@ -265,7 +264,7 @@ Total length: Typical length is:
|
||||
{% endhighlight %}
|
||||
|
||||
<h4>Definition</h4>
|
||||
<pre>
|
||||
{% highlight lang='dataspec' %}
|
||||
frag ::
|
||||
1 byte
|
||||
Bit order: 76543210
|
||||
@@ -286,7 +285,7 @@ size ::
|
||||
valid values: 1 to 996
|
||||
|
||||
total length: 7 bytes
|
||||
</pre>
|
||||
{% endhighlight %}
|
||||
|
||||
<h3><a href="http://docs.i2p-projekt.de/javadoc/net/i2p/data/i2np/DeliveryInstructions.html">Delivery Instructions Javadoc</a></h3>
|
||||
|
||||
|
@@ -4,36 +4,73 @@
|
||||
!_TAG_PROGRAM_NAME Exuberant Ctags //
|
||||
!_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/
|
||||
!_TAG_PROGRAM_VERSION 5.9~svn20110310 //
|
||||
Boolean docs/spec/common-structures.html 73;" t
|
||||
BuildRequestRecord docs/spec/i2np.html 108;" s
|
||||
BuildResponseRecord docs/spec/i2np.html 277;" s
|
||||
Certificate docs/spec/common-structures.html 249;" t
|
||||
Date docs/spec/common-structures.html 50;" t
|
||||
DeliveryInstructions docs/spec/common-structures.html 950;" s
|
||||
DeliveryInstructions docs/spec/i2np.html 378;" s
|
||||
Destination docs/spec/common-structures.html 543;" s
|
||||
GarlicClove docs/spec/i2np.html 319;" s
|
||||
Hash docs/spec/common-structures.html 213;" t
|
||||
Integer docs/spec/common-structures.html 40;" t
|
||||
Lease docs/spec/common-structures.html 601;" s
|
||||
LeaseSet docs/spec/common-structures.html 646;" s
|
||||
Mapping docs/spec/common-structures.html 405;" t
|
||||
MessageId docs/spec/i2cp.html 162;" s
|
||||
Payload docs/spec/i2cp.html 182;" s
|
||||
PrivateKey docs/spec/common-structures.html 101;" t
|
||||
PublicKey docs/spec/common-structures.html 88;" t
|
||||
RouterAddress docs/spec/common-structures.html 783;" s
|
||||
RouterIdentity docs/spec/common-structures.html 488;" s
|
||||
RouterInfo docs/spec/common-structures.html 845;" s
|
||||
SessionConfig docs/spec/i2cp.html 204;" s
|
||||
SessionId docs/spec/i2cp.html 236;" s
|
||||
SessionKey docs/spec/common-structures.html 114;" t
|
||||
SessionTag docs/spec/common-structures.html 225;" t
|
||||
Signature docs/spec/common-structures.html 184;" t
|
||||
SigningPrivateKey docs/spec/common-structures.html 155;" t
|
||||
SigningPublicKey docs/spec/common-structures.html 126;" t
|
||||
String docs/spec/common-structures.html 61;" t
|
||||
TunnelId docs/spec/common-structures.html 237;" t
|
||||
header docs/spec/i2cp.html 140;" s
|
||||
header docs/spec/i2np.html 18;" s
|
||||
sampleDatagrams docs/spec/ssu.html 932;" a
|
||||
BandwidthLimits docs/spec/i2cp.html 588;" m
|
||||
Boolean docs/spec/common-structures.html 74;" t
|
||||
BuildRequestRecord docs/spec/i2np.html 183;" s
|
||||
BuildResponseRecord docs/spec/i2np.html 353;" s
|
||||
Certificate docs/spec/common-structures.html 296;" t
|
||||
CreateLeaseSet docs/spec/i2cp.html 630;" m
|
||||
CreateSession docs/spec/i2cp.html 668;" m
|
||||
Data docs/spec/i2np.html 1118;" m
|
||||
DatabaseLookup docs/spec/i2np.html 688;" m
|
||||
DatabaseSearchReply docs/spec/i2np.html 835;" m
|
||||
DatabaseStore docs/spec/i2np.html 590;" m
|
||||
Date docs/spec/common-structures.html 51;" t
|
||||
DeliveryInstructions docs/spec/common-structures.html 1010;" s
|
||||
DeliveryStatus docs/spec/i2np.html 910;" m
|
||||
DestLookup docs/spec/i2cp.html 697;" m
|
||||
DestReply docs/spec/i2cp.html 719;" m
|
||||
Destination docs/spec/common-structures.html 639;" s
|
||||
Disconnect docs/spec/i2cp.html 763;" m
|
||||
Garlic docs/spec/i2np.html 948;" m
|
||||
GarlicClove docs/spec/i2np.html 395;" s
|
||||
GarlicCloveDeliveryInstructions docs/spec/i2np.html 454;" s
|
||||
GetBandwidthLimits docs/spec/i2cp.html 783;" m
|
||||
GetDate docs/spec/i2cp.html 802;" m
|
||||
Hash docs/spec/common-structures.html 257;" t
|
||||
HostLookup docs/spec/i2cp.html 840;" m
|
||||
HostReply docs/spec/i2cp.html 889;" m
|
||||
I2CPMessageHeader docs/spec/i2cp.html 302;" s
|
||||
I2NPMessageHeader docs/spec/i2np.html 93;" s
|
||||
Integer docs/spec/common-structures.html 41;" t
|
||||
KeysAndCert docs/spec/common-structures.html 549;" s
|
||||
Lease docs/spec/common-structures.html 668;" s
|
||||
LeaseSet docs/spec/common-structures.html 713;" s
|
||||
Mapping docs/spec/common-structures.html 461;" t
|
||||
MessageId docs/spec/i2cp.html 324;" s
|
||||
MessagePayload docs/spec/i2cp.html 921;" m
|
||||
MessageStatus docs/spec/i2cp.html 943;" m
|
||||
Payload docs/spec/i2cp.html 344;" s
|
||||
PrivateKey docs/spec/common-structures.html 102;" t
|
||||
PublicKey docs/spec/common-structures.html 89;" t
|
||||
ReceiveMessageBegin docs/spec/i2cp.html 1048;" m
|
||||
ReceiveMessageEnd docs/spec/i2cp.html 1077;" m
|
||||
ReconfigureSession docs/spec/i2cp.html 1103;" m
|
||||
ReportAbuse docs/spec/i2cp.html 1133;" m
|
||||
RequestLeaseSet docs/spec/i2cp.html 1164;" m
|
||||
RequestVariableLeaseSet docs/spec/i2cp.html 1197;" m
|
||||
RouterAddress docs/spec/common-structures.html 843;" s
|
||||
RouterIdentity docs/spec/common-structures.html 613;" s
|
||||
RouterInfo docs/spec/common-structures.html 910;" s
|
||||
SendMessage docs/spec/i2cp.html 1225;" m
|
||||
SendMessageExpires docs/spec/i2cp.html 1272;" m
|
||||
SessionConfig docs/spec/i2cp.html 366;" s
|
||||
SessionId docs/spec/i2cp.html 398;" s
|
||||
SessionKey docs/spec/common-structures.html 115;" t
|
||||
SessionStatus docs/spec/i2cp.html 1403;" m
|
||||
SessionTag docs/spec/common-structures.html 269;" t
|
||||
SetDate docs/spec/i2cp.html 1437;" m
|
||||
Signature docs/spec/common-structures.html 214;" t
|
||||
SigningPrivateKey docs/spec/common-structures.html 171;" t
|
||||
SigningPublicKey docs/spec/common-structures.html 128;" t
|
||||
String docs/spec/common-structures.html 62;" t
|
||||
Tunnel docs/spec/tunnel-message.html 34;" m
|
||||
TunnelBuild docs/spec/i2np.html 1144;" m
|
||||
TunnelBuildReply docs/spec/i2np.html 1177;" m
|
||||
TunnelData docs/spec/i2np.html 1044;" m
|
||||
TunnelGateway docs/spec/i2np.html 1084;" m
|
||||
TunnelId docs/spec/common-structures.html 281;" t
|
||||
TunnelMessageDeliveryInstructions docs/spec/tunnel-message.html 159;" s
|
||||
VariableTunnelBuild docs/spec/i2np.html 1190;" m
|
||||
VariableTunnelBuildReply docs/spec/i2np.html 1220;" m
|
||||
sampleDatagrams docs/spec/ssu.html 1062;" a
|
||||
|
Reference in New Issue
Block a user