aboutsummaryrefslogtreecommitdiff
path: root/src/testbed/testbed_api_peers.h
diff options
context:
space:
mode:
authorSree Harsha Totakura <totakura@in.tum.de>2012-07-25 15:02:53 +0000
committerSree Harsha Totakura <totakura@in.tum.de>2012-07-25 15:02:53 +0000
commit7effc1a7a43dd4962c5777538e26a09a67914ecd (patch)
tree538f20918d221094761554e46891166ab0ca98bb /src/testbed/testbed_api_peers.h
parent883f76092343cb682016415142245b83c912f816 (diff)
downloadgnunet-7effc1a7a43dd4962c5777538e26a09a67914ecd.tar.gz
gnunet-7effc1a7a43dd4962c5777538e26a09a67914ecd.zip
-helper service shutdown fixes; overlay connect message
Diffstat (limited to 'src/testbed/testbed_api_peers.h')
-rw-r--r--src/testbed/testbed_api_peers.h58
1 files changed, 54 insertions, 4 deletions
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
@@ -48,6 +48,33 @@ struct PeerDetails
48 48
49 49
50/** 50/**
51 * Enumeration of possible states a peer could be in
52 */
53enum PeerState
54 {
55 /**
56 * State to signify that this peer is invalid
57 */
58 PS_INVALID,
59
60 /**
61 * The peer has been created
62 */
63 PS_CREATED,
64
65 /**
66 * The peer is running
67 */
68 PS_STARTED,
69
70 /**
71 * The peer is stopped
72 */
73 PS_STOPPED,
74 };
75
76
77/**
51 * A peer controlled by the testing framework. A peer runs 78 * A peer controlled by the testing framework. A peer runs
52 * at a particular host. 79 * at a particular host.
53 */ 80 */
@@ -65,16 +92,20 @@ struct GNUNET_TESTBED_Peer
65 struct GNUNET_TESTBED_Host *host; 92 struct GNUNET_TESTBED_Host *host;
66 93
67 /** 94 /**
95 * Internals of the peer for the controlling process; NULL if
96 * this process is not controlling this peer.
97 */
98 struct PeerDetails *details;
99
100 /**
68 * Globally unique ID of the peer. 101 * Globally unique ID of the peer.
69 */ 102 */
70 uint32_t unique_id; 103 uint32_t unique_id;
71 104
72 /** 105 /**
73 * Internals of the peer for the controlling process; NULL if 106 * Peer's state
74 * this process is not controlling this peer.
75 */ 107 */
76 struct PeerDetails *details; 108 enum PeerState state;
77
78}; 109};
79 110
80 111
@@ -161,6 +192,25 @@ struct PeerInfoData2
161 192
162 193
163/** 194/**
195 * Data structure for OperationType OP_OVERLAY_CONNECT
196 */
197struct OverlayConnectData
198{
199 /**
200 * Peer A to connect to peer B
201 */
202 struct GNUNET_TESTBED_Peer *p1;
203
204 /**
205 * Peer B
206 */
207 struct GNUNET_TESTBED_Peer *p2;
208
209};
210
211
212
213/**
164 * Create the given peer at the specified host using the given 214 * Create the given peer at the specified host using the given
165 * controller. If the given controller is not running on the target 215 * controller. If the given controller is not running on the target
166 * host, it should find or create a controller at the target host and 216 * host, it should find or create a controller at the target host and