- relaxed to accommodate overlay linking timeouts
[oweals/gnunet.git] / src / testbed / testbed_api_peers.h
index 357f45e51d6a21a1f480d6aac69d1a95ead623d8..f16dd8a302d952edbcb67b54b292a29450f9b5a5 100644 (file)
@@ -190,6 +190,7 @@ struct PeerInfoData
  */
 struct OverlayConnectData
 {
+
   /**
    * Peer A to connect to peer B
    */
@@ -210,6 +211,40 @@ struct OverlayConnectData
    */
   void *cb_cls;
 
+  /**
+   * OperationContext for forwarded operations generated when peer1's controller doesn't have the
+   * configuration of peer2's controller for linking laterally to attemp an
+   * overlay connection between peer 1 and peer 2.
+   */
+  struct OperationContext *sub_opc;
+
+  /**
+   * State information for this context data
+   */
+  enum OCDState {
+    
+    /**
+     * The initial state
+     */
+    OCD_INIT,
+
+    /**
+     * State where we attempt to acquire peer2's controller's configuration
+     */
+    OCD_CFG_ACQUIRE,
+
+    /**
+     * State where we link peer1's controller to peer2's controller
+     */
+    OCD_LINK_CONTROLLERS,
+    
+    /**
+     * State where we re-ask controller of peer1 to attempt an overlay connect
+     * between peer1 and peer2
+     */
+    OCD_REATTEMPT_OVERLAY_CONNECT
+  } state;
+
 };