28 #ifndef NEW_TESTING_API_PEERS_H
29 #define NEW_TESTING_API_PEERS_H
static char * peer_id
Option –peer.
API for writing tests and creating large-scale emulation testbeds for GNUnet.
void(* GNUNET_TESTBED_PeerChurnCallback)(void *cls, const char *emsg)
Functions of this signature are called when a peer has been successfully started or stopped.
GNUNET_TESTBED_PeerInformationType
Types of information that can be requested about a peer.
void(* GNUNET_TESTBED_OperationCompletionCallback)(void *cls, struct GNUNET_TESTBED_Operation *op, const char *emsg)
Callback to be called when an operation is 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.
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...
Handle to interact with a GNUnet testbed controller.
Opaque handle to a host running experiments managed by the testing framework.
Message sent from client to testing service to obtain the configuration of a peer.
uint64_t operation_id
Operation ID that is used to identify this operation.
A peer controlled by the testing framework.
enum PeerState state
Peer's state.
struct GNUNET_TESTBED_Controller * controller
Our controller context (not necessarily the controller that is responsible for starting/running the p...
struct GNUNET_TESTBED_Peer * next
peer list DLL
uint8_t underlay_model_exists
Has an underlay model already set for this peer?
struct GNUNET_TESTBED_Peer * prev
peer list DLL
uint32_t unique_id
Globally unique ID of the peer.
struct GNUNET_TESTBED_Host * host
Which host does this peer run on?
struct GNUNET_TESTBED_Peer * peer
GNUNET_TESTBED_OperationCompletionCallback cb
Context information for GNUNET_TESTBED_Operation.
Data structure for OperationType OP_OVERLAY_CONNECT.
void * cb_cls
The closure for the above callback.
struct GNUNET_TESTBED_Peer * p2
Peer B.
GNUNET_TESTBED_OperationCompletionCallback cb
The operation completion callback to call once this operation is done.
struct OperationContext * sub_opc
OperationContext for forwarded operations generated when peer1's controller doesn't have the configur...
struct GNUNET_TESTBED_Peer * p1
Peer A to connect to peer B.
Data for the OperationType OP_PEER_CREATE.
const struct GNUNET_CONFIGURATION_Handle * cfg
The template configuration of the peer.
struct GNUNET_TESTBED_Host * host
The host where the peer has to be created.
struct GNUNET_TESTBED_Peer * peer
The peer structure to return when we get success message.
void * cls
The closure for the above callback.
GNUNET_TESTBED_PeerCreateCallback cb
The call back to call when we receive peer create success message.
Data for the OperationType OP_PEER_DESTROY;.
struct GNUNET_TESTBED_Peer * peer
The peer structure.
Data for OperationType OP_PEER_START and OP_PEER_STOP.
struct GNUNET_TESTBED_Peer * peer
The handle of the peer to start.
GNUNET_TESTBED_PeerChurnCallback pcc
The Peer churn callback to call when this operation is completed.
void * pcc_cls
Closure for the above callback.
Data for the OperationType OP_PEER_INFO.
GNUNET_TESTBED_PeerInfoCallback cb
The Peer info callback to call when this operation has completed.
struct GNUNET_TESTBED_Peer * peer
The peer whose information has been requested.
void * cb_cls
The closure for peer info callback.
enum GNUNET_TESTBED_PeerInformationType pit
The type of peer information requested.
void GNUNET_TESTBED_peer_deregister_(struct GNUNET_TESTBED_Peer *peer)
Removes a peer from the peer list.
void GNUNET_TESTBED_cleanup_peers_(void)
Frees all peers.
struct GNUNET_TESTBED_PeerGetConfigurationMessage * GNUNET_TESTBED_generate_peergetconfig_msg_(uint32_t peer_id, uint64_t operation_id)
Generate PeerGetConfigurationMessage.
PeerState
Enumeration of possible states a peer could be in.
@ TESTBED_PS_INVALID
State to signify that this peer is invalid.
@ TESTBED_PS_STOPPED
The peer is stopped.
@ TESTBED_PS_CREATED
The peer has been created.
@ TESTBED_PS_STARTED
The peer is running.
void GNUNET_TESTBED_peer_register_(struct GNUNET_TESTBED_Peer *peer)
Adds a peer to the peer list.
struct GNUNET_TESTBED_Peer * peer
The peer associated with this model.