aboutsummaryrefslogtreecommitdiff
path: root/src/testbed/testbed_api_peers.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/testbed/testbed_api_peers.h')
-rw-r--r--src/testbed/testbed_api_peers.h65
1 files changed, 26 insertions, 39 deletions
diff --git a/src/testbed/testbed_api_peers.h b/src/testbed/testbed_api_peers.h
index cf0624eec..6a9b89e7c 100644
--- a/src/testbed/testbed_api_peers.h
+++ b/src/testbed/testbed_api_peers.h
@@ -11,7 +11,7 @@
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Affero General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU Affero General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 17
@@ -35,26 +35,25 @@
35/** 35/**
36 * Enumeration of possible states a peer could be in 36 * Enumeration of possible states a peer could be in
37 */ 37 */
38enum PeerState 38enum PeerState {
39{ 39 /**
40 /** 40 * State to signify that this peer is invalid
41 * State to signify that this peer is invalid 41 */
42 */
43 TESTBED_PS_INVALID, 42 TESTBED_PS_INVALID,
44 43
45 /** 44 /**
46 * The peer has been created 45 * The peer has been created
47 */ 46 */
48 TESTBED_PS_CREATED, 47 TESTBED_PS_CREATED,
49 48
50 /** 49 /**
51 * The peer is running 50 * The peer is running
52 */ 51 */
53 TESTBED_PS_STARTED, 52 TESTBED_PS_STARTED,
54 53
55 /** 54 /**
56 * The peer is stopped 55 * The peer is stopped
57 */ 56 */
58 TESTBED_PS_STOPPED, 57 TESTBED_PS_STOPPED,
59}; 58};
60 59
@@ -63,8 +62,7 @@ enum PeerState
63 * A peer controlled by the testing framework. A peer runs 62 * A peer controlled by the testing framework. A peer runs
64 * at a particular host. 63 * at a particular host.
65 */ 64 */
66struct GNUNET_TESTBED_Peer 65struct GNUNET_TESTBED_Peer {
67{
68 /** 66 /**
69 * peer list DLL 67 * peer list DLL
70 */ 68 */
@@ -106,8 +104,7 @@ struct GNUNET_TESTBED_Peer
106/** 104/**
107 * Data for the OperationType OP_PEER_CREATE 105 * Data for the OperationType OP_PEER_CREATE
108 */ 106 */
109struct PeerCreateData 107struct PeerCreateData {
110{
111 /** 108 /**
112 * The host where the peer has to be created 109 * The host where the peer has to be created
113 */ 110 */
@@ -132,15 +129,13 @@ struct PeerCreateData
132 * The peer structure to return when we get success message 129 * The peer structure to return when we get success message
133 */ 130 */
134 struct GNUNET_TESTBED_Peer *peer; 131 struct GNUNET_TESTBED_Peer *peer;
135
136}; 132};
137 133
138 134
139/** 135/**
140 * Data for OperationType OP_PEER_START and OP_PEER_STOP 136 * Data for OperationType OP_PEER_START and OP_PEER_STOP
141 */ 137 */
142struct PeerEventData 138struct PeerEventData {
143{
144 /** 139 /**
145 * The handle of the peer to start 140 * The handle of the peer to start
146 */ 141 */
@@ -155,15 +150,13 @@ struct PeerEventData
155 * Closure for the above callback 150 * Closure for the above callback
156 */ 151 */
157 void *pcc_cls; 152 void *pcc_cls;
158
159}; 153};
160 154
161 155
162/** 156/**
163 * Data for the OperationType OP_PEER_DESTROY; 157 * Data for the OperationType OP_PEER_DESTROY;
164 */ 158 */
165struct PeerDestroyData 159struct PeerDestroyData {
166{
167 /** 160 /**
168 * The peer structure 161 * The peer structure
169 */ 162 */
@@ -176,8 +169,7 @@ struct PeerDestroyData
176/** 169/**
177 * Data for the OperationType OP_PEER_INFO 170 * Data for the OperationType OP_PEER_INFO
178 */ 171 */
179struct PeerInfoData 172struct PeerInfoData {
180{
181 /** 173 /**
182 * The peer whose information has been requested 174 * The peer whose information has been requested
183 */ 175 */
@@ -203,8 +195,7 @@ struct PeerInfoData
203/** 195/**
204 * Data for the operations of type OP_PEER_RECONFIGURE 196 * Data for the operations of type OP_PEER_RECONFIGURE
205 */ 197 */
206struct PeerReconfigureData 198struct PeerReconfigureData {
207{
208 /** 199 /**
209 * The peer whose information has been requested 200 * The peer whose information has been requested
210 */ 201 */
@@ -225,9 +216,7 @@ struct PeerReconfigureData
225/** 216/**
226 * Data structure for OperationType OP_OVERLAY_CONNECT 217 * Data structure for OperationType OP_OVERLAY_CONNECT
227 */ 218 */
228struct OverlayConnectData 219struct OverlayConnectData {
229{
230
231 /** 220 /**
232 * Peer A to connect to peer B 221 * Peer A to connect to peer B
233 */ 222 */
@@ -254,7 +243,6 @@ struct OverlayConnectData
254 * overlay connection between peer 1 and peer 2. 243 * overlay connection between peer 1 and peer 2.
255 */ 244 */
256 struct OperationContext *sub_opc; 245 struct OperationContext *sub_opc;
257
258}; 246};
259 247
260 248
@@ -270,7 +258,6 @@ struct ManageServiceData {
270 unsigned int start; 258 unsigned int start;
271 259
272 uint16_t msize; 260 uint16_t msize;
273
274}; 261};
275 262
276 263
@@ -283,8 +270,8 @@ struct ManageServiceData {
283 * @return the PeerGetConfigurationMessage 270 * @return the PeerGetConfigurationMessage
284 */ 271 */
285struct GNUNET_TESTBED_PeerGetConfigurationMessage * 272struct GNUNET_TESTBED_PeerGetConfigurationMessage *
286GNUNET_TESTBED_generate_peergetconfig_msg_ (uint32_t peer_id, 273GNUNET_TESTBED_generate_peergetconfig_msg_(uint32_t peer_id,
287 uint64_t operation_id); 274 uint64_t operation_id);
288 275
289 276
290/** 277/**
@@ -293,7 +280,7 @@ GNUNET_TESTBED_generate_peergetconfig_msg_ (uint32_t peer_id,
293 * @param peer the peer to add to the peer list 280 * @param peer the peer to add to the peer list
294 */ 281 */
295void 282void
296GNUNET_TESTBED_peer_register_ (struct GNUNET_TESTBED_Peer *peer); 283GNUNET_TESTBED_peer_register_(struct GNUNET_TESTBED_Peer *peer);
297 284
298 285
299/** 286/**
@@ -302,14 +289,14 @@ GNUNET_TESTBED_peer_register_ (struct GNUNET_TESTBED_Peer *peer);
302 * @param peer the peer to remove 289 * @param peer the peer to remove
303 */ 290 */
304void 291void
305GNUNET_TESTBED_peer_deregister_ (struct GNUNET_TESTBED_Peer *peer); 292GNUNET_TESTBED_peer_deregister_(struct GNUNET_TESTBED_Peer *peer);
306 293
307 294
308/** 295/**
309 * Frees all peers 296 * Frees all peers
310 */ 297 */
311void 298void
312GNUNET_TESTBED_cleanup_peers_ (void); 299GNUNET_TESTBED_cleanup_peers_(void);
313 300
314#endif 301#endif
315/* end of testbed_api_peers.h */ 302/* end of testbed_api_peers.h */