diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/updates/DHT.md | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/docs/updates/DHT.md b/docs/updates/DHT.md index db825a3c..9e94ab11 100644 --- a/docs/updates/DHT.md +++ b/docs/updates/DHT.md | |||
@@ -79,12 +79,9 @@ Protocol | |||
79 | 79 | ||
80 | Node format: | 80 | Node format: |
81 | ``` | 81 | ``` |
82 | [char array (node_id), length=32 bytes][ip (in network byte order), length=4 bytes][port (in network byte order), length=2 bytes][Padding , length=2 bytes] | 82 | [uint8_t family (2 == IPv4, 10 == IPv6, 130 == TCP IPv4, 138 == TCP IPv6)][ip (in network byte order), length=4 bytes if ipv4, 16 bytes if ipv6][port (in network byte order), length=2 bytes][char array (node_id), length=32 bytes] |
83 | ``` | 83 | ``` |
84 | see also: DHT.h (Node4_format struct) | 84 | see also: DHT.h (pack_nodes() and unpack_nodes()) |
85 | |||
86 | IPv6 Node format: | ||
87 | see: DHT.h (Node_format struct) | ||
88 | 85 | ||
89 | Valid queries and Responses: | 86 | Valid queries and Responses: |
90 | 87 | ||
@@ -102,12 +99,7 @@ Packet contents: | |||
102 | ``` | 99 | ``` |
103 | Valid replies: a send_nodes packet | 100 | Valid replies: a send_nodes packet |
104 | 101 | ||
105 | Send_nodes (response (for ipv4 addresses)): | 102 | Send_nodes (response (for all addresses)): |
106 | ``` | ||
107 | [byte with value: 03][char array (client node_id), length=32 bytes][random 24 byte nonce][Encrypted with the nonce and private key of the sender:[Nodes in node format, length=40 * (number of nodes (maximum of 8 nodes)) bytes][Encrypted data, length=NODES_ENCRYPTED_MESSAGE_LENGTH bytes]] | ||
108 | ``` | ||
109 | |||
110 | Send_nodes_IPv6 (response (for ipv6 addresses)): | ||
111 | ``` | 103 | ``` |
112 | [byte with value: 04][char array (client node_id), length=32 bytes][random 24 byte nonce][Encrypted with the nonce and private key of the sender:[Nodes in ipv6_node format, length=56 * (number of nodes (maximum of 8 nodes)) bytes][Encrypted data, length=NODES_ENCRYPTED_MESSAGE_LENGTH bytes]] | 104 | [byte with value: 04][char array (client node_id), length=32 bytes][random 24 byte nonce][Encrypted with the nonce and private key of the sender:[Nodes in node format, length=?? * (number of nodes (maximum of 8 nodes)) bytes][Encrypted data, length=NODES_ENCRYPTED_MESSAGE_LENGTH bytes]] |
113 | ``` | 105 | ``` |