From a79eafbb5292b5fb5ae677c97a9bf2ecc4f853b0 Mon Sep 17 00:00:00 2001 From: irungentoo Date: Fri, 25 Apr 2014 09:02:49 -0400 Subject: The data in the DHT get nodes and send nodes packets can now be of variable length. --- docs/updates/DHT.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/updates/DHT.md b/docs/updates/DHT.md index 9e94ab11..ba6abe3a 100644 --- a/docs/updates/DHT.md +++ b/docs/updates/DHT.md @@ -95,11 +95,11 @@ ping_id = a random integer, the response must contain the exact same number as t Get nodes (Request): Packet contents: ``` -[byte with value: 02][char array (client node_id), length=32 bytes][random 24 byte nonce][Encrypted with the nonce and private key of the sender:[char array: requested_node_id (node_id of which we want the ip), length=32 bytes][Encrypted data (must be sent back unmodified by in the response), length=NODES_ENCRYPTED_MESSAGE_LENGTH bytes]] +[byte with value: 02][char array (client node_id), length=32 bytes][random 24 byte nonce][Encrypted with the nonce and private key of the sender:[char array: requested_node_id (node_id of which we want the ip), length=32 bytes][Sendback data (must be sent back unmodified by in the response), length=1 to NODES_ENCRYPTED_MESSAGE_LENGTH bytes]] ``` Valid replies: a send_nodes packet Send_nodes (response (for all addresses)): ``` -[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]] +[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:[uint8_t number of nodes in this packet][Nodes in node format, length=?? * (number of nodes (maximum of 8 nodes)) bytes][Sendback data, length=1 to NODES_ENCRYPTED_MESSAGE_LENGTH bytes]] ``` -- cgit v1.2.3