From 7effc1a7a43dd4962c5777538e26a09a67914ecd Mon Sep 17 00:00:00 2001 From: Sree Harsha Totakura Date: Wed, 25 Jul 2012 15:02:53 +0000 Subject: -helper service shutdown fixes; overlay connect message --- src/testbed/testbed_api_peers.h | 58 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 54 insertions(+), 4 deletions(-) (limited to 'src/testbed/testbed_api_peers.h') diff --git a/src/testbed/testbed_api_peers.h b/src/testbed/testbed_api_peers.h index b3a74eef7..9c1305c79 100644 --- a/src/testbed/testbed_api_peers.h +++ b/src/testbed/testbed_api_peers.h @@ -47,6 +47,33 @@ struct PeerDetails }; +/** + * Enumeration of possible states a peer could be in + */ +enum PeerState + { + /** + * State to signify that this peer is invalid + */ + PS_INVALID, + + /** + * The peer has been created + */ + PS_CREATED, + + /** + * The peer is running + */ + PS_STARTED, + + /** + * The peer is stopped + */ + PS_STOPPED, + }; + + /** * A peer controlled by the testing framework. A peer runs * at a particular host. @@ -64,17 +91,21 @@ struct GNUNET_TESTBED_Peer */ struct GNUNET_TESTBED_Host *host; + /** + * Internals of the peer for the controlling process; NULL if + * this process is not controlling this peer. + */ + struct PeerDetails *details; + /** * Globally unique ID of the peer. */ uint32_t unique_id; /** - * Internals of the peer for the controlling process; NULL if - * this process is not controlling this peer. + * Peer's state */ - struct PeerDetails *details; - + enum PeerState state; }; @@ -160,6 +191,25 @@ struct PeerInfoData2 }; +/** + * Data structure for OperationType OP_OVERLAY_CONNECT + */ +struct OverlayConnectData +{ + /** + * Peer A to connect to peer B + */ + struct GNUNET_TESTBED_Peer *p1; + + /** + * Peer B + */ + struct GNUNET_TESTBED_Peer *p2; + +}; + + + /** * Create the given peer at the specified host using the given * controller. If the given controller is not running on the target -- cgit v1.2.3