Command to start the netjail script. More...
Go to the source code of this file.
Data Structures | |
struct | TopologyState |
Macros | |
#define | LOG(kind, ...) GNUNET_log_from (kind, "udp-backchannel",__VA_ARGS__) |
Generic logging shortcut. More... | |
Functions | |
static void | cleanup (void *cls) |
The cleanup function of this cmd frees resources the cmd allocated. More... | |
static enum GNUNET_GenericReturnValue | traits (void *cls, const void **ret, const char *trait, unsigned int index) |
This function prepares an array with traits. More... | |
static char * | get_topo_string_from_file (const char *topology_data_file) |
static void | 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_load_topology_from_file (const char *label, const char *file_name) |
struct GNUNET_TESTING_Command | GNUNET_TESTING_cmd_load_topology_from_string (const char *label, const char *topology_string) |
Command to start the netjail script.
Definition in file testing_api_cmd_get_topo.c.
#define LOG | ( | kind, | |
... | |||
) | GNUNET_log_from (kind, "udp-backchannel",__VA_ARGS__) |
Generic logging shortcut.
Definition at line 33 of file testing_api_cmd_get_topo.c.
|
static |
The cleanup function of this cmd frees resources the cmd allocated.
Definition at line 70 of file testing_api_cmd_get_topo.c.
References GNUNET_free, GNUNET_TESTING_free_topology(), TopologyState::topology, and TopologyState::topology_alloc.
Referenced by GNUNET_TESTING_cmd_load_topology_from_file(), and GNUNET_TESTING_cmd_load_topology_from_string().
|
static |
This function prepares an array with traits.
Definition at line 88 of file testing_api_cmd_get_topo.c.
References GNUNET_TESTING_get_trait(), GNUNET_TESTING_trait_end(), GNUNET_TESTING_Trait::index, ret, TopologyState::topology, TopologyState::topology_string, and traits().
Referenced by GNUNET_TESTING_cmd_load_topology_from_file(), GNUNET_TESTING_cmd_load_topology_from_string(), and traits().
|
static |
Definition at line 108 of file testing_api_cmd_get_topo.c.
References data, fs, GNUNET_assert, GNUNET_DISK_file_size(), GNUNET_DISK_file_test(), GNUNET_DISK_fn_read(), GNUNET_ERROR_TYPE_ERROR, GNUNET_free, GNUNET_malloc_large, GNUNET_OK, GNUNET_YES, and LOG.
Referenced by run().
|
static |
The run method starts the script which setup the network namespaces.
cls | closure. |
is | interpreter state. |
Definition at line 156 of file testing_api_cmd_get_topo.c.
References TopologyState::file_name, get_topo_string_from_file(), GNUNET_TESTING_FAIL, GNUNET_TESTING_get_topo_from_string_(), is, TopologyState::topology, TopologyState::topology_alloc, and TopologyState::topology_string.
Referenced by GNUNET_TESTING_cmd_load_topology_from_file(), and GNUNET_TESTING_cmd_load_topology_from_string().
struct GNUNET_TESTING_Command GNUNET_TESTING_cmd_load_topology_from_file | ( | const char * | label, |
const char * | file_name | ||
) |
Definition at line 177 of file testing_api_cmd_get_topo.c.
References cleanup(), file_name, TopologyState::file_name, GNUNET_new, GNUNET_TESTING_command_new_ac(), TopologyState::label, run(), and traits().
Referenced by main().
struct GNUNET_TESTING_Command GNUNET_TESTING_cmd_load_topology_from_string | ( | const char * | label, |
const char * | topology_string | ||
) |
Definition at line 197 of file testing_api_cmd_get_topo.c.
References cleanup(), GNUNET_assert, GNUNET_new, GNUNET_strdup, GNUNET_TESTING_command_new_ac(), TopologyState::label, run(), TopologyState::topology_alloc, TopologyState::topology_string, topology_string, and traits().
Referenced by main(), and start_testcase().