GNUnet  0.11.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 
39 {
44 
49 
54 
59 };
60 
61 
67 {
72 
77 
83 
88 
92  uint32_t unique_id;
93 
98 
103 };
104 
105 
110 {
115 
120 
125 
129  void *cls;
130 
135 };
136 
137 
142 {
147 
152 
156  void *pcc_cls;
157 };
158 
159 
164 {
169 
170  // PEERDESTROYDATA
171 };
172 
173 
178 {
183 
188 
192  void *cb_cls;
193 
198 };
199 
200 
205 {
210 
214  char *config;
215 
219  uint16_t cfg_size;
220 };
221 
222 
227 {
232 
237 
242 
246  void *cb_cls;
247 
254 };
255 
256 
258 {
260 
261  void *cb_cls;
262 
264 
266 
267  unsigned int start;
268 
269  uint16_t msize;
270 };
271 
272 
283  uint64_t operation_id);
284 
285 
291 void
293 
294 
300 void
302 
303 
307 void
309 
310 #endif
311 /* 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:193
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:581
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:596
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:85
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:136