internal API to access the 'peers' subsystem More...
Go to the source code of this file.
Data Structures | |
struct | GNUNET_TESTBED_Peer |
A peer controlled by the testing framework. More... | |
struct | PeerCreateData |
Data for the OperationType OP_PEER_CREATE. More... | |
struct | PeerEventData |
Data for OperationType OP_PEER_START and OP_PEER_STOP. More... | |
struct | PeerDestroyData |
Data for the OperationType OP_PEER_DESTROY;. More... | |
struct | PeerInfoData |
Data for the OperationType OP_PEER_INFO. More... | |
struct | PeerReconfigureData |
Data for the operations of type OP_PEER_RECONFIGURE. More... | |
struct | OverlayConnectData |
Data structure for OperationType OP_OVERLAY_CONNECT. More... | |
struct | ManageServiceData |
Enumerations | |
enum | PeerState { TESTBED_PS_INVALID , TESTBED_PS_CREATED , TESTBED_PS_STARTED , TESTBED_PS_STOPPED } |
Enumeration of possible states a peer could be in. More... | |
Functions | |
struct GNUNET_TESTBED_PeerGetConfigurationMessage * | GNUNET_TESTBED_generate_peergetconfig_msg_ (uint32_t peer_id, uint64_t operation_id) |
Generate PeerGetConfigurationMessage. More... | |
void | GNUNET_TESTBED_peer_register_ (struct GNUNET_TESTBED_Peer *peer) |
Adds a peer to the peer list. More... | |
void | GNUNET_TESTBED_peer_deregister_ (struct GNUNET_TESTBED_Peer *peer) |
Removes a peer from the peer list. More... | |
void | GNUNET_TESTBED_cleanup_peers_ (void) |
Frees all peers. More... | |
internal API to access the 'peers' subsystem
Definition in file testbed_api_peers.h.
enum PeerState |
Enumeration of possible states a peer could be in.
Enumerator | |
---|---|
TESTBED_PS_INVALID | State to signify that this peer is invalid. |
TESTBED_PS_CREATED | The peer has been created. |
TESTBED_PS_STARTED | The peer is running. |
TESTBED_PS_STOPPED | The peer is stopped. |
Definition at line 38 of file testbed_api_peers.h.
struct GNUNET_TESTBED_PeerGetConfigurationMessage* GNUNET_TESTBED_generate_peergetconfig_msg_ | ( | uint32_t | peer_id, |
uint64_t | operation_id | ||
) |
Generate PeerGetConfigurationMessage.
peer_id | the id of the peer whose information we have to get |
operation_id | the ip of the operation that should be represented in the message |
Definition at line 335 of file testbed_api_peers.c.
References GNUNET_htonll(), GNUNET_malloc, GNUNET_MESSAGE_TYPE_TESTBED_GET_PEER_INFORMATION, msg, GNUNET_TESTBED_PeerGetConfigurationMessage::operation_id, peer_id, GNUNET_MessageHeader::size, and GNUNET_MessageHeader::type.
Referenced by opstart_peer_getinfo(), and opstart_service_connect().
void GNUNET_TESTBED_peer_register_ | ( | struct GNUNET_TESTBED_Peer * | peer | ) |
Adds a peer to the peer list.
peer | the peer to add to the peer list |
Definition at line 54 of file testbed_api_peers.c.
References GNUNET_CONTAINER_DLL_insert_tail, peer, peer_list_head, and peer_list_tail.
Referenced by handle_peer_create_success().
void GNUNET_TESTBED_peer_deregister_ | ( | struct GNUNET_TESTBED_Peer * | peer | ) |
Removes a peer from the peer list.
peer | the peer to remove |
Definition at line 66 of file testbed_api_peers.c.
References GNUNET_CONTAINER_DLL_remove, peer, peer_list_head, and peer_list_tail.
Referenced by GNUNET_TESTBED_cleanup_peers_(), and handle_opsuccess().
void GNUNET_TESTBED_cleanup_peers_ | ( | void | ) |
Frees all peers.
Definition at line 76 of file testbed_api_peers.c.
References GNUNET_free, GNUNET_TESTBED_peer_deregister_(), peer, and peer_list_head.
Referenced by handle_opsuccess().