summaryrefslogtreecommitdiff
path: root/node/Cluster.hpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2017-01-30 15:40:22 -0800
committerAdam Ierymenko <adam.ierymenko@gmail.com>2017-01-30 15:40:22 -0800
commiteebd271bb1e3ab0d25f48db07a1a3f1154215bc7 (patch)
treeaf7e706bd2fd9265441fea70ba6a74224913b634 /node/Cluster.hpp
parentff74ec248263db8941429e3626738f57b558cbc3 (diff)
downloadinfinitytier-eebd271bb1e3ab0d25f48db07a1a3f1154215bc7.tar.gz
infinitytier-eebd271bb1e3ab0d25f48db07a1a3f1154215bc7.zip
Implement cross cluster sharing of network configs to make clusters able to actually join networks.
Diffstat (limited to 'node/Cluster.hpp')
-rw-r--r--node/Cluster.hpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/node/Cluster.hpp b/node/Cluster.hpp
index dafbf425..aba3b8a9 100644
--- a/node/Cluster.hpp
+++ b/node/Cluster.hpp
@@ -216,14 +216,13 @@ public:
/**
* Replicate a network config for a network we belong to:
- * <[8] 64-bit network ID>
- * <[2] 16-bit length of network config>
- * <[...] serialized network config>
+ * <[...] network config chunk>
*
* This is used by clusters to avoid every member having to query
* for the same netconf for networks all members belong to.
*
- * TODO: not implemented yet!
+ * The first field of a network config chunk is the network ID,
+ * so this can be checked to look up the network on receipt.
*/
CLUSTER_MESSAGE_NETWORK_CONFIG = 7
};
@@ -268,6 +267,14 @@ public:
void broadcastHavePeer(const Identity &id);
/**
+ * Broadcast a network config chunk to other members of cluster
+ *
+ * @param chunk Chunk data
+ * @param len Length of chunk
+ */
+ void broadcastNetworkConfigChunk(const void *chunk,unsigned int len);
+
+ /**
* Send this packet via another node in this cluster if another node has this peer
*
* This is used in the outgoing packet and relaying logic in Switch to