GNUnet  0.10.x
testbed_api_peers.h
Go to the documentation of this file.
1 /*
2  This file is part of GNUnet
3  Copyright (C) 2008--2013 GNUnet e.V.
4 
5  GNUnet is free software: you can redistribute it and/or modify it
6  under the terms of the GNU Affero General Public License as published
7  by the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  GNUnet is distributed in the hope that it will be useful, but
11  WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Affero General Public License for more details.
14 
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/>.
17 
18  SPDX-License-Identifier: AGPL3.0-or-later
19  */
20 
28 #ifndef NEW_TESTING_API_PEERS_H
29 #define NEW_TESTING_API_PEERS_H
30 
31 #include "gnunet_testbed_service.h"
32 #include "gnunet_helper_lib.h"
33 
34 
38 enum PeerState {
43 
48 
53 
58 };
59 
60 
70 
75 
81 
86 
90  uint32_t unique_id;
91 
96 
101 };
102 
103 
112 
117 
122 
126  void *cls;
127 
132 };
133 
134 
143 
148 
152  void *pcc_cls;
153 };
154 
155 
164 
165  //PEERDESTROYDATA
166 };
167 
168 
172 struct PeerInfoData {
177 
182 
186  void *cb_cls;
187 
192 };
193 
194 
203 
207  char *config;
208 
212  uint16_t cfg_size;
213 };
214 
215 
224 
229 
234 
238  void *cb_cls;
239 
246 };
247 
248 
251 
252  void *cb_cls;
253 
255 
257 
258  unsigned int start;
259 
260  uint16_t msize;
261 };
262 
263 
274  uint64_t operation_id);
275 
276 
282 void
284 
285 
291 void
293 
294 
298 void
300 
301 #endif
302 /* end of testbed_api_peers.h */
struct GNUNET_TESTBED_Peer * peer
The peer structure.
Data for the OperationType OP_PEER_INFO.
GNUNET_TESTBED_PeerInformationType
Types of information that can be requested about a peer.
void * cb_cls
The closure for the above callback.
Handle to interact with a GNUnet testbed controller.
Definition: testbed_api.h:191
uint16_t cfg_size
the size of the serialized configuration
struct GNUNET_TESTBED_Peer * prev
peer list DLL
void * cb_cls
The closure for peer info callback.
Message sent from client to testing service to obtain the configuration of a peer.
Definition: testbed.h:563
void * cls
The closure for the above callback.
struct GNUNET_TESTBED_Peer * peer
The peer whose information has been requested.
struct OperationContext * sub_opc
OperationContext for forwarded operations generated when peer1&#39;s controller doesn&#39;t have the configur...
Data for the OperationType OP_PEER_DESTROY;.
struct GNUNET_TESTBED_Peer * peer
The handle of the peer to start.
static char * peer_id
Option –peer.
Definition: gnunet-cadet.c:42
GNUNET_TESTBED_PeerCreateCallback cb
The call back to call when we receive peer create success message.
Opaque handle to a host running experiments managed by the testing framework.
const struct GNUNET_CONFIGURATION_Handle * cfg
The template configuration of the peer.
void GNUNET_TESTBED_peer_deregister_(struct GNUNET_TESTBED_Peer *peer)
Removes a peer from the peer list.
Data for OperationType OP_PEER_START and OP_PEER_STOP.
GNUNET_TESTBED_PeerInfoCallback cb
The Peer info callback to call when this operation has completed.
void(* GNUNET_TESTBED_PeerCreateCallback)(void *cls, struct GNUNET_TESTBED_Peer *peer, const char *emsg)
Functions of this signature are called when a peer has been successfully created. ...
enum PeerState state
Peer&#39;s state.
void GNUNET_TESTBED_cleanup_peers_(void)
Frees all peers.
GNUNET_TESTBED_PeerChurnCallback pcc
The Peer churn callback to call when this operation is completed.
uint8_t underlay_model_exists
Has an underlay model already set for this peer?
uint64_t operation_id
Operation ID that is used to identify this operation.
Definition: testbed.h:577
void * pcc_cls
Closure for the above callback.
void(* GNUNET_TESTBED_PeerInfoCallback)(void *cb_cls, struct GNUNET_TESTBED_Operation *op, const struct GNUNET_TESTBED_PeerInformation *pinfo, const char *emsg)
Callback to be called when the requested peer information is available The peer information in the ca...
struct GNUNET_TESTBED_Controller * controller
Our controller context (not necessarily the controller that is responsible for starting/running the p...
PeerState
Enumeration of possible states a peer could be in.
struct GNUNET_TESTBED_Host * host
Which host does this peer run on?
GNUNET_TESTBED_OperationCompletionCallback cb
The operation completion callback to call once this operation is done.
void(* GNUNET_TESTBED_PeerChurnCallback)(void *cls, const char *emsg)
Functions of this signature are called when a peer has been successfully started or stopped...
Data structure for OperationType OP_OVERLAY_CONNECT.
struct GNUNET_TESTBED_Peer * peer
The peer associated with this model.
The peer is stopped.
struct GNUNET_TESTBED_Peer * p1
Peer A to connect to peer B.
GNUNET_TESTBED_OperationCompletionCallback cb
void GNUNET_TESTBED_peer_register_(struct GNUNET_TESTBED_Peer *peer)
Adds a peer to the peer list.
Data for the operations of type OP_PEER_RECONFIGURE.
struct GNUNET_TESTBED_PeerGetConfigurationMessage * GNUNET_TESTBED_generate_peergetconfig_msg_(uint32_t peer_id, uint64_t operation_id)
Generate PeerGetConfigurationMessage.
void(* GNUNET_TESTBED_OperationCompletionCallback)(void *cls, struct GNUNET_TESTBED_Operation *op, const char *emsg)
Callback to be called when an operation is completed.
uint32_t unique_id
Globally unique ID of the peer.
struct GNUNET_TESTBED_Peer * peer
struct GNUNET_TESTBED_Peer * p2
Peer B.
struct GNUNET_TESTBED_Peer * next
peer list DLL
configuration data
Definition: configuration.c:83
struct GNUNET_TESTBED_Peer * peer
The peer structure to return when we get success message.
The peer has been created.
State to signify that this peer is invalid.
The peer is running.
A peer controlled by the testing framework.
char * config
The serialized new configuration template.
Data for the OperationType OP_PEER_CREATE.
struct GNUNET_TESTBED_Host * host
The host where the peer has to be created.
struct GNUNET_TESTBED_Peer * peer
The peer whose information has been requested.
Context information for GNUNET_TESTBED_Operation.
Definition: testbed_api.h:135