Command to start 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_START_SCRIPT "netjail_start.sh" |
#define | LOG(kind, ...) GNUNET_log (kind, __VA_ARGS__) |
Functions | |
static void | netjail_start_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_start_run (void *cls, struct GNUNET_TESTING_Interpreter *is) |
The run method starts the script which setup the network namespaces. More... | |
struct GNUNET_TESTING_Command | GNUNET_TESTING_cmd_netjail_start (const char *label, char *topology_config, unsigned int *read_file) |
Create command. More... | |
Command to start the netjail script.
Definition in file testing_api_cmd_netjail_start.c.
#define NETJAIL_START_SCRIPT "netjail_start.sh" |
Definition at line 33 of file testing_api_cmd_netjail_start.c.
#define LOG | ( | kind, | |
... | |||
) | GNUNET_log (kind, __VA_ARGS__) |
Definition at line 35 of file testing_api_cmd_netjail_start.c.
|
static |
The cleanup function of this cmd frees resources the cmd allocated.
Definition at line 73 of file testing_api_cmd_netjail_start.c.
References GNUNET_assert, GNUNET_ERROR_TYPE_DEBUG, GNUNET_free, GNUNET_log, 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 108 of file testing_api_cmd_netjail_start.c.
References exit_code, GNUNET_ERROR_TYPE_ERROR, GNUNET_log, GNUNET_OS_process_destroy(), GNUNET_TESTING_async_fail(), GNUNET_TESTING_async_finish(), and ns.
|
static |
The run method starts the script which setup the network namespaces.
cls | closure. |
is | interpreter state. |
Definition at line 138 of file testing_api_cmd_netjail_start.c.
struct GNUNET_TESTING_Command GNUNET_TESTING_cmd_netjail_start | ( | const char * | label, |
char * | topology_config, | ||
unsigned int * | read_file | ||
) |
Create command.
This command executes a shell script to setup the netjail environment.
label | name for command. |
topology_config | Configuration file for the test topology. |
Definition at line 138 of file testing_api_cmd_netjail_start.c.