34#define LOG(kind, ...) GNUNET_log (kind, __VA_ARGS__)
65 if (NULL != sps->
peer)
71 "Testing lib failed to stop peer %u (`%s')\n",
118 const char *start_label)
static int ret
Final status code.
struct GNUNET_TESTING_Interpreter * is
const struct GNUNET_TESTING_Command * GNUNET_TESTING_interpreter_lookup_command(struct GNUNET_TESTING_Interpreter *is, const char *label)
Lookup command by label.
struct GNUNET_TESTING_Command GNUNET_TESTING_command_new(void *cls, const char *label, GNUNET_TESTING_CommandRunRoutine run, GNUNET_TESTING_CommandCleanupRoutine cleanup, GNUNET_TESTING_CommandGetTraits traits, struct GNUNET_TESTING_AsyncContext *ac)
Create a new command.
enum GNUNET_GenericReturnValue GNUNET_TRANSPORT_TESTING_get_trait_state(const struct GNUNET_TESTING_Command *cmd, const struct GNUNET_TESTING_StartPeerState **ret)
const char * GNUNET_i2s(const struct GNUNET_PeerIdentity *pid)
Convert a peer identity to a string (for printing debug messages).
@ GNUNET_ERROR_TYPE_ERROR
#define GNUNET_new(type)
Allocate a struct or union of the given type.
#define GNUNET_free(ptr)
Wrapper around free.
void * GNUNET_SCHEDULER_cancel(struct GNUNET_SCHEDULER_Task *task)
Cancel the task with the specified identifier.
int GNUNET_TESTING_peer_stop(struct GNUNET_TESTING_Peer *peer)
Stop the peer.
void GNUNET_TESTING_peer_destroy(struct GNUNET_TESTING_Peer *peer)
Destroy the peer.
A command to be run by the interpreter.
struct GNUNET_TESTING_CommandLabel label
Label for the command.
void * cls
Closure for all commands with command-specific context information.
Global state of the interpreter, used by a command to access information about other commands.
struct GNUNET_PeerIdentity id
Peer identity.
unsigned int no
An unique number to identify the peer.
struct GNUNET_TESTING_Peer * peer
struct GNUNET_TESTING_Peer returned by GNUNET_TESTING_peer_configure.
struct GNUNET_SCHEDULER_Task * rh_task
Hello get task.
Struct to hold information for callbacks.
struct GNUNET_TESTING_Command GNUNET_TESTING_cmd_stop_peer(const char *label, const char *start_label)
Create command.
static int stop_peer_traits(void *cls, const void **ret, const char *trait, unsigned int index)
Trait function of this cmd does nothing.
static void stop_peer_cleanup(void *cls)
The cleanup function of this cmd frees resources the cmd allocated.
#define LOG(kind,...)
Generic logging shortcut.
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 ser...