Command to stop the netjail script. More...
#include "platform.h"
#include "gnunet_util_lib.h"
#include "gnunet_testing_ng_lib.h"
#include "gnunet_testing_plugin.h"
#include "gnunet_testing_barrier.h"
#include "gnunet_testing_netjail_lib.h"
Go to the source code of this file.
Data Structures | |
struct | NetJailState |
Struct to hold information for callbacks. More... | |
Macros | |
#define | NETJAIL_STOP_SCRIPT "netjail_stop.sh" |
Functions | |
static void | netjail_stop_cleanup (void *cls) |
The cleanup function of this cmd frees resources the cmd allocated. More... | |
static void | child_completed_callback (void *cls, enum GNUNET_OS_ProcessStatusType type, long unsigned int exit_code) |
Callback which will be called if the setup script finished. More... | |
static void | netjail_stop_run (void *cls, struct GNUNET_TESTING_Interpreter *is) |
The run method starts the script which deletes the network namespaces. More... | |
struct GNUNET_TESTING_Command | GNUNET_TESTING_cmd_netjail_stop (const char *label, char *topology_config, unsigned int *read_file) |
This command executes a shell script to remove the netjail environment. More... | |
Command to stop the netjail script.
Definition in file testing_api_cmd_netjail_stop.c.
#define NETJAIL_STOP_SCRIPT "netjail_stop.sh" |
Definition at line 34 of file testing_api_cmd_netjail_stop.c.
|
static |
The cleanup function of this cmd frees resources the cmd allocated.
Definition at line 73 of file testing_api_cmd_netjail_stop.c.
References GNUNET_assert, GNUNET_free, GNUNET_OK, GNUNET_OS_process_destroy(), GNUNET_OS_process_kill(), GNUNET_OS_process_wait(), GNUNET_wait_child_cancel(), and ns.
|
static |
Callback which will be called if the setup script finished.
Definition at line 101 of file testing_api_cmd_netjail_stop.c.
References exit_code, GNUNET_OS_process_destroy(), GNUNET_TESTING_async_fail(), GNUNET_TESTING_async_finish(), and ns.
Referenced by netjail_stop_run().
|
static |
The run method starts the script which deletes the network namespaces.
cls | closure. |
is | interpreter state. |
Definition at line 128 of file testing_api_cmd_netjail_stop.c.
References child_completed_callback(), GNUNET_asprintf(), GNUNET_break, GNUNET_ERROR_TYPE_ERROR, GNUNET_free, GNUNET_log, GNUNET_NO, GNUNET_OS_check_helper_binary(), GNUNET_OS_INHERIT_STD_ERR, GNUNET_OS_installation_get_path(), GNUNET_OS_IPK_DATADIR, GNUNET_OS_start_process_vap(), GNUNET_TESTING_interpreter_fail(), GNUNET_wait_child(), GNUNET_YES, is, NETJAIL_STOP_SCRIPT, ns, pid, and read_file().
struct GNUNET_TESTING_Command GNUNET_TESTING_cmd_netjail_stop | ( | const char * | label, |
char * | topology_config, | ||
unsigned int * | read_file | ||
) |
This command executes a shell script to remove the netjail environment.
label | name for command. |
topology_config | Configuration file for the test topology. |
read_file | Flag indicating if the the name of the topology file is send to the helper, or a string with the topology data. |
Definition at line 128 of file testing_api_cmd_netjail_stop.c.