summaryrefslogtreecommitdiff
path: root/node/Packet.hpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2013-10-27 07:26:50 -0400
committerAdam Ierymenko <adam.ierymenko@gmail.com>2013-10-27 07:26:50 -0400
commit17778a36badcb9fdb9b3292e8ec32be3b836c811 (patch)
tree4e7d710e429962bd1d2733ea89707a3c0a4e8234 /node/Packet.hpp
parentdf28cd88b8a8460151a8211ea292bd5bbb4c9a69 (diff)
downloadinfinitytier-17778a36badcb9fdb9b3292e8ec32be3b836c811.tar.gz
infinitytier-17778a36badcb9fdb9b3292e8ec32be3b836c811.zip
Clean up secure random, add packet definitions for update distribution facility.
Diffstat (limited to 'node/Packet.hpp')
-rw-r--r--node/Packet.hpp52
1 files changed, 50 insertions, 2 deletions
diff --git a/node/Packet.hpp b/node/Packet.hpp
index c42b6a2b..56920f6f 100644
--- a/node/Packet.hpp
+++ b/node/Packet.hpp
@@ -566,7 +566,7 @@ public:
*/
VERB_MULTICAST_LIKE = 9,
- /* Network member certificate:
+ /* Network member certificate replication/push:
* <[...] serialized certificate of membership>
* [ ... additional certificates may follow ...]
*
@@ -598,6 +598,9 @@ public:
*
* ERROR response payload:
* <[8] 64-bit network ID>
+ *
+ * Support is optional. Nodes should return UNSUPPORTED_OPERATION if
+ * not supported or enabled.
*/
VERB_NETWORK_CONFIG_REQUEST = 11,
@@ -612,7 +615,52 @@ public:
* It does not generate an OK or ERROR message, and is treated only as
* a hint to refresh now.
*/
- VERB_NETWORK_CONFIG_REFRESH = 12
+ VERB_NETWORK_CONFIG_REFRESH = 12,
+
+ /* Request information about a shared file:
+ * <[1] flags, currently unused and must be 0>
+ * <[2] 16-bit length of filename>
+ * <[...] name of file being requested>
+ *
+ * OK response payload (indicates that we have and will share):
+ * <[1] flags, currently unused and must be 0>
+ * <[2] 16-bit length of filename>
+ * <[...] name of file being requested>
+ * <[64] full length SHA-512 hash of file contents>
+ * <[4] 32-bit length of file in bytes>
+ * <[5] Signing ZeroTier One identity address>
+ * <[2] 16-bit length of signature of SHA-512 hash>
+ * <[...] signature of SHA-512 hash>
+ *
+ * ERROR response payload:
+ * <[2] 16-bit length of filename>
+ * <[...] name of file being requested>
+ *
+ * Support is optional. Nodes should return UNSUPPORTED_OPERATION if
+ * not supported or enabled.
+ */
+ VERB_FILE_INFO_REQUEST = 13,
+
+ /* Request a piece of a shared file
+ * <[16] first 16 bytes of SHA-512 of file being requested>
+ * <[4] 32-bit index of desired chunk>
+ * <[2] 16-bit length of desired chunk>
+ *
+ * OK response payload:
+ * <[16] first 16 bytes of SHA-512 of file being requested>
+ * <[4] 32-bit index of desired chunk>
+ * <[2] 16-bit length of desired chunk>
+ * <[...] the chunk>
+ *
+ * ERROR response payload:
+ * <[16] first 16 bytes of SHA-512 of file being requested>
+ * <[4] 32-bit index of desired chunk>
+ * <[2] 16-bit length of desired chunk>
+ *
+ * Support is optional. Nodes should return UNSUPPORTED_OPERATION if
+ * not supported or enabled.
+ */
+ VERB_FILE_BLOCK_REQUEST = 14
};
/**