#include "platform.h"
#include "gnunet_util_lib.h"
#include "gnunet_testing_lib.h"
#include "gnunet_testbed_lib.h"
#include "gnunet_testing_arm_lib.h"
#include "gnunet_arm_service.h"
Go to the source code of this file.
Data Structures | |
struct | StopPeerState |
Struct to hold information for callbacks. More... | |
Functions | |
static void | stop_cb (void *cls, enum GNUNET_ARM_RequestStatus rs, enum GNUNET_ARM_Result result) |
Function called in response to a start/stop request. More... | |
static void | stop_peer_run (void *cls, struct GNUNET_TESTING_Interpreter *is) |
The run method of this cmd will stop all services of a peer which were used to test the transport service. More... | |
static void | stop_peer_cleanup (void *cls) |
The cleanup function of this cmd frees resources the cmd allocated. More... | |
static int | stop_peer_traits (void *cls, const void **ret, const char *trait, unsigned int index) |
Trait function of this cmd does nothing. More... | |
struct GNUNET_TESTING_Command | GNUNET_TESTING_cmd_stop_peer (const char *label, const char *start_label) |
Create command. More... | |
|
static |
Function called in response to a start/stop request.
Will be called when request was not sent successfully, or when a reply comes. If the request was not sent successfully, rs will indicate that, and result will be undefined.
cls | closure |
rs | status of the request |
result | result of the operation |
Definition at line 68 of file testing_arm_cmd_stop_peer.c.
References StopPeerState::ac, GNUNET_ARM_RESULT_STOPPED, GNUNET_TESTING_async_fail(), GNUNET_TESTING_async_finish(), StopPeerState::op, and result.
Referenced by stop_peer_run().
|
static |
The run method of this cmd will stop all services of a peer which were used to test the transport service.
Definition at line 90 of file testing_arm_cmd_stop_peer.c.
References ah, GNUNET_ARM_request_service_stop(), GNUNET_OK, GNUNET_TESTING_FAIL, GNUNET_TESTING_interpreter_lookup_command(), is, StopPeerState::is, StopPeerState::op, StopPeerState::start_label, and stop_cb().
Referenced by GNUNET_TESTING_cmd_stop_peer().
|
static |
The cleanup function of this cmd frees resources the cmd allocated.
Definition at line 121 of file testing_arm_cmd_stop_peer.c.
References GNUNET_ARM_operation_cancel(), GNUNET_free, GNUNET_TESTING_command_incomplete, StopPeerState::is, StopPeerState::label, and StopPeerState::op.
Referenced by GNUNET_TESTING_cmd_stop_peer().
|
static |
Trait function of this cmd does nothing.
Definition at line 141 of file testing_arm_cmd_stop_peer.c.
References GNUNET_TESTING_get_trait(), GNUNET_TESTING_trait_end(), GNUNET_TESTING_Trait::index, ret, and traits().
Referenced by GNUNET_TESTING_cmd_stop_peer().
struct GNUNET_TESTING_Command GNUNET_TESTING_cmd_stop_peer | ( | const char * | label, |
const char * | start_label | ||
) |
Create command.
label | name for command. |
start_label | Label of the cmd to start the peer. |
Definition at line 159 of file testing_arm_cmd_stop_peer.c.
References StopPeerState::ac, GNUNET_new, GNUNET_TESTING_command_new_ac(), StopPeerState::label, StopPeerState::start_label, stop_peer_cleanup(), stop_peer_run(), and stop_peer_traits().