GNUnet  0.11.x
Data Structures | Macros | Enumerations | Functions
gnunet_testing_netjail_lib.h File Reference
#include "gnunet_util_lib.h"
#include "gnunet_testing_plugin.h"
#include "gnunet_testing_ng_lib.h"
Include dependency graph for gnunet_testing_netjail_lib.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  GNUNET_TESTING_NetjailRouter
 API for writing an interpreter to test GNUnet components. More...
 
struct  GNUNET_TESTING_AddressPrefix
 Protocol address prefix für a connection between nodes. More...
 
struct  GNUNET_TESTING_NodeConnection
 Connection to another node. More...
 
struct  GNUNET_TESTING_NetjailNode
 Node in the netjail topology. More...
 
struct  GNUNET_TESTING_NetjailNamespace
 Subnet in a topology. More...
 
struct  GNUNET_TESTING_NetjailTopology
 Toplogy of our netjail setup. More...
 
struct  BlockState
 Struct with information for callbacks. More...
 
struct  LocalPreparedState
 Struct to hold information for callbacks. More...
 

Macros

#define GNUNET_TESTING_SIMPLE_NETJAIL_TRAITS(op)
 Call op on all simple traits. More...
 

Enumerations

enum  GNUNET_TESTING_NODE_TYPE { GNUNET_TESTING_SUBNET_NODE , GNUNET_TESTING_GLOBAL_NODE }
 Enum for the different types of nodes. More...
 

Functions

struct GNUNET_TESTING_NetjailTopologyGNUNET_TESTING_get_topo_from_file (const char *filename)
 Getting the topology from file. More...
 
struct GNUNET_TESTING_NetjailTopologyGNUNET_TESTING_get_topo_from_string (char *data)
 Parse the topology data. More...
 
struct GNUNET_TESTING_NodeConnectionGNUNET_TESTING_get_connections (unsigned int num, struct GNUNET_TESTING_NetjailTopology *topology)
 Get the connections to other nodes for a specific node. More...
 
char * GNUNET_TESTING_get_address (struct GNUNET_TESTING_NodeConnection *connection, char *prefix)
 Get the address for a specific communicator from a connection. More...
 
void GNUNET_TESTING_free_topology (struct GNUNET_TESTING_NetjailTopology *topology)
 Deallocate memory of the struct GNUNET_TESTING_NetjailTopology. More...
 
unsigned int GNUNET_TESTING_calculate_num (struct GNUNET_TESTING_NodeConnection *node_connection, struct GNUNET_TESTING_NetjailTopology *topology)
 Calculate the unique id identifying a node from a given connction. More...
 
struct GNUNET_TESTING_Command GNUNET_TESTING_cmd_system_destroy (const char *label, const char *create_label)
 Create command. More...
 
struct GNUNET_TESTING_Command GNUNET_TESTING_cmd_system_create (const char *label, const char *testdir)
 Create command. More...
 
struct GNUNET_TESTING_Command GNUNET_TESTING_cmd_netjail_start (const char *label, char *topology_config, unsigned int *read_file)
 Create command. More...
 
struct GNUNET_TESTING_Command GNUNET_TESTING_cmd_netjail_stop (const char *label, char *topology_config, unsigned int *read_file)
 Create command. More...
 
struct GNUNET_TESTING_Command GNUNET_TESTING_cmd_netjail_start_testing_system (const char *label, struct GNUNET_TESTING_NetjailTopology *topology, unsigned int *read_file, char *topology_data, struct GNUNET_TIME_Relative timeout)
 Create command. More...
 
struct GNUNET_TESTING_Command GNUNET_TESTING_cmd_stop_testing_system (const char *label, const char *helper_start_label, struct GNUNET_TESTING_NetjailTopology *topology)
 Create command. More...
 
struct GNUNET_MessageHeaderGNUNET_TESTING_send_local_test_finished_msg (enum GNUNET_GenericReturnValue rv)
 Create a GNUNET_CMDS_LOCAL_FINISHED message. More...
 
struct GNUNET_TESTING_Command GNUNET_TESTING_cmd_barrier_create (const char *label)
 
struct GNUNET_TESTING_Command GNUNET_TESTING_cmd_barrier_setup_finished (const char *label)
 
struct GNUNET_TESTING_Command GNUNET_TESTING_cmd_barrier_reached (const char *label, const char *barrier_label)
 
struct GNUNET_TESTING_Command GNUNET_TESTING_cmd_block_until_all_peers_started (const char *label, unsigned int *all_peers_started)
 
struct GNUNET_TESTING_Command GNUNET_TESTING_cmd_block_until_external_trigger (const char *label)
 Create command. More...
 
struct GNUNET_TESTING_Command GNUNET_TESTING_cmd_send_peer_ready (const char *label, TESTING_CMD_HELPER_write_cb write_message)
 Create command. More...
 
struct GNUNET_TESTING_Command GNUNET_TESTING_cmd_local_test_finished (const char *label, TESTING_CMD_HELPER_write_cb write_message)
 Create command. More...
 
struct GNUNET_TESTING_Command GNUNET_TESTING_cmd_local_test_prepared (const char *label, TESTING_CMD_HELPER_write_cb write_message)
 Create command. More...
 
enum GNUNET_GenericReturnValue GNUNET_TESTING_get_trait_test_system (const struct GNUNET_TESTING_Command *cmd, const struct GNUNET_TESTING_System **ret)
 
struct GNUNET_TESTING_Trait GNUNET_TESTING_make_trait_test_system (const struct GNUNET_TESTING_System *value)
 
enum GNUNET_GenericReturnValue GNUNET_TESTING_get_trait_async_context (const struct GNUNET_TESTING_Command *cmd, const struct GNUNET_TESTING_AsyncContext **ret)
 
struct GNUNET_TESTING_Trait GNUNET_TESTING_make_trait_async_context (const struct GNUNET_TESTING_AsyncContext *value)
 
enum GNUNET_GenericReturnValue GNUNET_TESTING_get_trait_helper_handles (const struct GNUNET_TESTING_Command *cmd, const struct GNUNET_HELPER_Handle ***ret)
 
struct GNUNET_TESTING_Trait GNUNET_TESTING_make_trait_helper_handles (const struct GNUNET_HELPER_Handle **value)
 
enum GNUNET_GenericReturnValue GNUNET_TESTING_get_trait_local_prepared_state (const struct GNUNET_TESTING_Command *cmd, const struct LocalPreparedState **ret)
 
struct GNUNET_TESTING_Trait GNUNET_TESTING_make_trait_local_prepared_state (const struct LocalPreparedState *value)
 
enum GNUNET_GenericReturnValue GNUNET_TESTING_get_trait_block_state (const struct GNUNET_TESTING_Command *cmd, const struct BlockState **ret)
 
struct GNUNET_TESTING_Trait GNUNET_TESTING_make_trait_block_state (const struct BlockState *value)
 

Macro Definition Documentation

◆ GNUNET_TESTING_SIMPLE_NETJAIL_TRAITS

#define GNUNET_TESTING_SIMPLE_NETJAIL_TRAITS (   op)
Value:
op (async_context, const struct GNUNET_TESTING_AsyncContext) \
op (helper_handles, const struct GNUNET_HELPER_Handle *) \
op (local_prepared_state, const struct LocalPreparedState) \
op (block_state, const struct BlockState)
static struct GNUNET_ARM_Operation * op
Current operation.
Definition: gnunet-arm.c:144
static struct GNUNET_TESTING_System * test_system
Handle to the testing system.
Struct with information for callbacks.
The handle to a helper process.
Definition: helper.c:79
State each asynchronous command must have in its closure.
Handle for a system on which GNUnet peers are executed; a system is used for reserving unique paths a...
Definition: testing.c:103
Struct to hold information for callbacks.

Call op on all simple traits.

Definition at line 501 of file gnunet_testing_netjail_lib.h.

Enumeration Type Documentation

◆ GNUNET_TESTING_NODE_TYPE

Enum for the different types of nodes.

Enumerator
GNUNET_TESTING_SUBNET_NODE 

Node in a subnet.

GNUNET_TESTING_GLOBAL_NODE 

Global known node.

Definition at line 55 of file gnunet_testing_netjail_lib.h.

56 {
61 
66 };
@ GNUNET_TESTING_SUBNET_NODE
Node in a subnet.
@ GNUNET_TESTING_GLOBAL_NODE
Global known node.

Function Documentation

◆ GNUNET_TESTING_get_topo_from_file()

struct GNUNET_TESTING_NetjailTopology* GNUNET_TESTING_get_topo_from_file ( const char *  filename)

Getting the topology from file.

Parameters
filenameThe name of the topology file.
Returns
The GNUNET_TESTING_NetjailTopology

Definition at line 2634 of file testing.c.

2635 {
2636  uint64_t fs;
2637  char *data;
2638  struct GNUNET_TESTING_NetjailTopology *topo;
2639 
2641  {
2643  _ ("Topology file %s not found\n"),
2644  filename);
2645  return NULL;
2646  }
2647  if (GNUNET_OK !=
2649  {
2651  _ ("Topology file %s has no data\n"),
2652  filename);
2653  return NULL;
2654  }
2655  data = GNUNET_malloc (fs + 1);
2656  if (fs != GNUNET_DISK_fn_read (filename, data, fs))
2657  {
2659  _ ("Topology file %s cannot be read\n"),
2660  filename);
2661  GNUNET_free (data);
2662  return NULL;
2663  }
2664 
2666  "file lenght %lu\n",
2667  fs);
2668  data[fs] = '\0';
2669 
2671 
2672  GNUNET_free (data);
2673 
2674  return topo;
2675 }
static char * filename
static struct GNUNET_FS_Handle * fs
Handle to FS service.
Definition: gnunet-fs.c:36
uint32_t data
The data value.
@ GNUNET_OK
Definition: gnunet_common.h:95
@ GNUNET_YES
Definition: gnunet_common.h:97
enum GNUNET_GenericReturnValue GNUNET_DISK_file_test(const char *fil)
Check that fil corresponds to a filename (of a file that exists and that is not a directory).
Definition: disk.c:482
enum GNUNET_GenericReturnValue GNUNET_DISK_file_size(const char *filename, uint64_t *size, int include_symbolic_links, int single_file_mode)
Get the size of the file (or directory) of the given file (in bytes).
Definition: disk.c:222
ssize_t GNUNET_DISK_fn_read(const char *fn, void *result, size_t len)
Read the contents of a binary file into a buffer.
Definition: disk.c:664
@ GNUNET_ERROR_TYPE_ERROR
@ GNUNET_ERROR_TYPE_DEBUG
#define GNUNET_malloc(size)
Wrapper around malloc.
#define GNUNET_free(ptr)
Wrapper around free.
#define _(String)
GNU gettext support macro.
Definition: platform.h:177
struct GNUNET_TESTING_NetjailTopology * GNUNET_TESTING_get_topo_from_string(char *data)
Parse the topology data.
Definition: testing.c:2380
#define LOG(kind,...)
Definition: testing.c:39

References _, data, filename, fs, GNUNET_DISK_file_size(), GNUNET_DISK_file_test(), GNUNET_DISK_fn_read(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_ERROR, GNUNET_free, GNUNET_malloc, GNUNET_OK, GNUNET_TESTING_get_topo_from_string(), GNUNET_YES, and LOG.

Here is the call graph for this function:

◆ GNUNET_TESTING_get_topo_from_string()

struct GNUNET_TESTING_NetjailTopology* GNUNET_TESTING_get_topo_from_string ( char *  data)

Parse the topology data.

Parameters
dataThe topology data.
Returns
The GNUNET_TESTING_NetjailTopology

Definition at line 2380 of file testing.c.

2381 {
2382  char *token;
2383  char *key = NULL;
2384  unsigned int out;
2385  char *rest = NULL;
2386  char *value = NULL;
2387  char *value2;
2388  int ret;
2389  struct GNUNET_TESTING_NetjailTopology *topo;
2390  struct GNUNET_TESTING_NetjailNode *node;
2391  struct GNUNET_TESTING_NetjailRouter *router;
2392  struct GNUNET_TESTING_NetjailNamespace *namespace;
2393  struct GNUNET_ShortHashCode *hkey;
2394  struct GNUNET_HashCode hc;
2395 
2396  token = strtok_r (data, "\n", &rest);
2398  topo->map_namespaces =
2400  topo->map_globals =
2402 
2403  while (NULL != token)
2404  {
2405  if (NULL != key)
2406  free (key);
2407  key = get_key (token);
2409  "In the loop with token: %s beginning with %s\n",
2410  token,
2411  key);
2412  if (0 == strcmp (key, "M"))
2413  {
2415  "Get first Value for M.\n");
2416  out = get_first_value (token);
2418  "M: %u\n",
2419  out);
2420  topo->nodes_m = out;
2421  }
2422  else if (0 == strcmp (key, "N"))
2423  {
2425  "Get first Value for N.\n");
2426  out = get_first_value (token);
2428  "N: %u\n",
2429  out);
2430  topo->namespaces_n = out;
2431  }
2432  else if (0 == strcmp (key, "X"))
2433  {
2435  "Get first Value for X.\n");
2436  out = get_first_value (token);
2438  "X: %u\n",
2439  out);
2440  topo->nodes_x = out;
2441  }
2442  else if (0 == strcmp (key, "T"))
2443  {
2445  "Get first string value for T.\n");
2446  value = get_first_string_value (token);
2448  "value: %s\n",
2449  value);
2450  topo->plugin = value;
2451  }
2452  else if (0 == strcmp (key, "K"))
2453  {
2454  hkey = GNUNET_new (struct GNUNET_ShortHashCode);
2455  node = GNUNET_new (struct GNUNET_TESTING_NetjailNode);
2456 
2458  "Get first Value for K.\n");
2459  out = get_first_value (token);
2461  "K: %u\n",
2462  out);
2463  node->node_n = out;
2464  GNUNET_CRYPTO_hash (&out, sizeof(out), &hc);
2465  memcpy (hkey,
2466  &hc,
2467  sizeof (*hkey));
2468  node->is_global = GNUNET_YES;
2469 
2471  topo->map_globals,
2472  hkey))
2473  GNUNET_break (0);
2474  else
2476  hkey,
2477  node,
2480  "Get value for key value on K.\n");
2481  value = get_value ("plugin", token);
2483  "value: %s\n",
2484  value);
2485  node->plugin = value;
2486  node_connections (token, node);
2487  }
2488  else if (0 == strcmp (key, "R"))
2489  {
2490  hkey = GNUNET_new (struct GNUNET_ShortHashCode);
2491  router = GNUNET_new (struct GNUNET_TESTING_NetjailRouter);
2492  node = GNUNET_new (struct GNUNET_TESTING_NetjailNode);
2493 
2495  "Get first Value for R.\n");
2496  out = get_first_value (token);
2498  "R: %u\n",
2499  out);
2500  node->node_n = out;
2501  GNUNET_CRYPTO_hash (&out, sizeof(out), &hc);
2502  memcpy (hkey,
2503  &hc,
2504  sizeof (*hkey));
2506  "Get value for key tcp_port on R.\n");
2507  value = get_value ("tcp_port", token);
2509  "tcp_port: %s\n",
2510  value);
2511  ret = sscanf (value, "%u", &(router->tcp_port));
2512 
2513  GNUNET_break (0 != ret && 1 >= router->tcp_port);
2514 
2516  "Get value for key udp_port on R.\n");
2517  value2 = get_value ("udp_port", token);
2518  ret = sscanf (value2, "%u", &(router->udp_port));
2519  GNUNET_break (0 != ret && 1 >= router->udp_port);
2521  "udp_port: %s\n",
2522  value2);
2523 
2525  topo->map_namespaces,
2526  hkey))
2527  {
2528  namespace = GNUNET_CONTAINER_multishortmap_get (topo->map_namespaces,
2529  hkey);
2530  }
2531  else
2532  {
2533  namespace = GNUNET_new (struct GNUNET_TESTING_NetjailNamespace);
2534  namespace->namespace_n = out;
2535  namespace->nodes = GNUNET_CONTAINER_multishortmap_create (1,GNUNET_NO);
2537  hkey,
2538  namespace,
2540  }
2541  namespace->router = router;
2542 
2543  }
2544  else if (0 == strcmp (key, "P"))
2545  {
2546  hkey = GNUNET_new (struct GNUNET_ShortHashCode);
2547  node = GNUNET_new (struct GNUNET_TESTING_NetjailNode);
2548 
2550  "Get first Value for P.\n");
2551  out = get_first_value (token);
2553  "P: %u\n",
2554  out);
2555  GNUNET_CRYPTO_hash (&out, sizeof(out), &hc);
2556  memcpy (hkey,
2557  &hc,
2558  sizeof (*hkey));
2559 
2561  topo->map_namespaces,
2562  hkey))
2563  {
2564  namespace = GNUNET_CONTAINER_multishortmap_get (topo->map_namespaces,
2565  hkey);
2566  }
2567  else
2568  {
2569  namespace = GNUNET_new (struct GNUNET_TESTING_NetjailNamespace);
2570  namespace->nodes = GNUNET_CONTAINER_multishortmap_create (1,GNUNET_NO);
2571  namespace->namespace_n = out;
2573  hkey,
2574  namespace,
2576  }
2578  "Get second Value for P.\n");
2579  out = get_second_value (token);
2581  "P: %u\n",
2582  out);
2583  GNUNET_CRYPTO_hash (&out, sizeof(out), &hc);
2584  memcpy (hkey,
2585  &hc,
2586  sizeof (*hkey));
2588  namespace->nodes,
2589  hkey))
2590  {
2591  GNUNET_break (0);
2592  }
2593  else
2594  {
2595  node = GNUNET_new (struct GNUNET_TESTING_NetjailNode);
2596  GNUNET_CONTAINER_multishortmap_put (namespace->nodes,
2597  hkey,
2598  node,
2601  "Get value for key plugin on P.\n");
2602  value = get_value ("plugin", token);
2604  "plugin: %s\n",
2605  value);
2606  node->plugin = value;
2607  node->node_n = out;
2608  node->namespace_n = namespace->namespace_n;
2609  }
2610  node_connections (token, node);
2611  }
2612  token = strtok_r (NULL, "\n", &rest);
2613  if (NULL != token)
2615  "Next token %s\n",
2616  token);
2617  }
2618  if (NULL != key)
2619  GNUNET_free (key);
2620  /*if (NULL != value)
2621  GNUNET_free (value);*/
2622 
2623  return topo;
2624 }
static int ret
Return value of the commandline.
Definition: gnunet-abd.c:81
struct GNUNET_HashCode key
The key used in the DHT.
static char * value
Value of the record to add/remove.
@ GNUNET_NO
Definition: gnunet_common.h:94
void GNUNET_CRYPTO_hash(const void *block, size_t size, struct GNUNET_HashCode *ret)
Compute hash of a given block.
Definition: crypto_hash.c:41
struct GNUNET_CONTAINER_MultiShortmap * GNUNET_CONTAINER_multishortmap_create(unsigned int len, int do_not_copy_keys)
Create a multi peer map (hash map for public keys of peers).
int GNUNET_CONTAINER_multishortmap_put(struct GNUNET_CONTAINER_MultiShortmap *map, const struct GNUNET_ShortHashCode *key, void *value, enum GNUNET_CONTAINER_MultiHashMapOption opt)
Store a key-value pair in the map.
void * GNUNET_CONTAINER_multishortmap_get(const struct GNUNET_CONTAINER_MultiShortmap *map, const struct GNUNET_ShortHashCode *key)
Given a key find a value in the map matching the key.
int GNUNET_CONTAINER_multishortmap_contains(const struct GNUNET_CONTAINER_MultiShortmap *map, const struct GNUNET_ShortHashCode *key)
Check if the map contains any value under the given key (including values that are NULL).
@ GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE
Allow multiple values with the same key.
#define GNUNET_break(cond)
Use this for internal assertion violations that are not fatal (can be handled) but should not occur.
#define GNUNET_new(type)
Allocate a struct or union of the given type.
A 512-bit hashcode.
A 256-bit hashcode.
Node in the netjail topology.
unsigned int namespace_n
The number of the subnet this node is running in.
unsigned int is_global
Flag indicating if this node is a global known node.
char * plugin
Plugin for the test case to be run on this node.
unsigned int node_n
The number of this node in the subnet.
API for writing an interpreter to test GNUnet components.
unsigned int tcp_port
Will tcp be forwarded?
unsigned int udp_port
Will udp be forwarded?
struct GNUNET_CONTAINER_MultiShortmap * map_globals
Hash map containing the global known nodes which are not natted.
char * plugin
Default plugin for the test case to be run on nodes.
unsigned int nodes_m
Number of nodes per subnet.
unsigned int nodes_x
Number of global known nodes.
unsigned int namespaces_n
Number of subnets.
struct GNUNET_CONTAINER_MultiShortmap * map_namespaces
Hash map containing the subnets (for natted nodes) of the topology.
static char * get_value(char *key, char *line)
Definition: testing.c:1874
static void node_connections(char *line, struct GNUNET_TESTING_NetjailNode *node)
Definition: testing.c:1984
static unsigned int get_second_value(char *line)
Definition: testing.c:1853
static unsigned int get_first_value(char *line)
Definition: testing.c:1788
static char * get_key(char *line)
Definition: testing.c:1808
static char * get_first_string_value(char *line)
Definition: testing.c:1828

References data, get_first_string_value(), get_first_value(), get_key(), get_second_value(), get_value(), GNUNET_break, GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE, GNUNET_CONTAINER_multishortmap_contains(), GNUNET_CONTAINER_multishortmap_create(), GNUNET_CONTAINER_multishortmap_get(), GNUNET_CONTAINER_multishortmap_put(), GNUNET_CRYPTO_hash(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_free, GNUNET_new, GNUNET_NO, GNUNET_YES, GNUNET_TESTING_NetjailNode::is_global, key, LOG, GNUNET_TESTING_NetjailTopology::map_globals, GNUNET_TESTING_NetjailTopology::map_namespaces, GNUNET_TESTING_NetjailNode::namespace_n, GNUNET_TESTING_NetjailTopology::namespaces_n, node_connections(), GNUNET_TESTING_NetjailNode::node_n, GNUNET_TESTING_NetjailTopology::nodes_m, GNUNET_TESTING_NetjailTopology::nodes_x, GNUNET_TESTING_NetjailNode::plugin, GNUNET_TESTING_NetjailTopology::plugin, ret, GNUNET_TESTING_NetjailRouter::tcp_port, GNUNET_TESTING_NetjailRouter::udp_port, and value.

Referenced by GNUNET_TESTING_get_topo_from_file().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GNUNET_TESTING_get_connections()

struct GNUNET_TESTING_NodeConnection* GNUNET_TESTING_get_connections ( unsigned int  num,
struct GNUNET_TESTING_NetjailTopology topology 
)

Get the connections to other nodes for a specific node.

Parameters
numThe specific node we want the connections for.
topologyThe topology we get the connections from.
Returns
The connections of the node.

Definition at line 2097 of file testing.c.

2099 {
2100  struct GNUNET_TESTING_NetjailNode *node;
2101  struct GNUNET_ShortHashCode *hkey;
2102  struct GNUNET_HashCode hc;
2103  struct GNUNET_TESTING_NetjailNamespace *namespace;
2104  unsigned int namespace_n, node_m;
2106 
2108  "gaga 1\n");
2109  log_topo (topology);
2111  "gaga 2\n");
2112  hkey = GNUNET_new (struct GNUNET_ShortHashCode);
2114  "num: %u \n",
2115  num);
2116  if (topology->nodes_x >= num)
2117  {
2118 
2119  GNUNET_CRYPTO_hash (&num, sizeof(num), &hc);
2120  memcpy (hkey,
2121  &hc,
2122  sizeof (*hkey));
2124  hkey);
2125  if (NULL != node)
2127  }
2128  else
2129  {
2130  namespace_n = (unsigned int) ceil ((double) (num - topology->nodes_x)
2131  / topology->nodes_m);
2133  "ceil num: %u nodes_x: %u nodes_m: %u namespace_n: %u\n",
2134  num,
2135  topology->nodes_x,
2136  topology->nodes_m,
2137  namespace_n);
2138  hkey = GNUNET_new (struct GNUNET_ShortHashCode);
2139  GNUNET_CRYPTO_hash (&namespace_n, sizeof(namespace_n), &hc);
2140  memcpy (hkey,
2141  &hc,
2142  sizeof (*hkey));
2143  namespace = GNUNET_CONTAINER_multishortmap_get (topology->map_namespaces,
2144  hkey);
2145  if (NULL == namespace)
2146  return NULL;
2147  node_m = num - topology->nodes_x - topology->nodes_m * (namespace_n - 1);
2148  hkey = GNUNET_new (struct GNUNET_ShortHashCode);
2149  GNUNET_CRYPTO_hash (&node_m, sizeof(node_m), &hc);
2150  memcpy (hkey,
2151  &hc,
2152  sizeof (*hkey));
2153  node = GNUNET_CONTAINER_multishortmap_get (namespace->nodes,
2154  hkey);
2155  if (NULL != node)
2157  }
2158 
2159  GNUNET_free (hkey);
2160  return node_connections;
2161 }
enum GNUNET_TESTBED_TopologyOption topology
The topology to generate.
unsigned int namespace_n
The number of the subnet.
struct GNUNET_TESTING_NodeConnection * node_connections_head
Head of the DLL with the connections which shall be established to other nodes.
struct GNUNET_TESTING_NetjailNode * node
The node which establish the connection.
unsigned int namespace_n
The number of the subnet of the node this connection points to.
static int log_topo(struct GNUNET_TESTING_NetjailTopology *topology)
Definition: testing.c:2072

References GNUNET_CONTAINER_multishortmap_get(), GNUNET_CRYPTO_hash(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_free, GNUNET_new, consensus-simulation::int, LOG, log_topo(), GNUNET_TESTING_NodeConnection::namespace_n, GNUNET_TESTING_NetjailNamespace::namespace_n, GNUNET_TESTING_NodeConnection::node, node_connections(), GNUNET_TESTING_NetjailNode::node_connections_head, and topology.

Referenced by backchannel_check_run(), connect_peers_run(), and send_simple_run().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GNUNET_TESTING_get_address()

char* GNUNET_TESTING_get_address ( struct GNUNET_TESTING_NodeConnection connection,
char *  prefix 
)

Get the address for a specific communicator from a connection.

Parameters
connectionThe connection we like to have the address from.
prefixThe communicator protocol prefix.
Returns
The address of the communicator.

Definition at line 2295 of file testing.c.

2297 {
2298  struct GNUNET_TESTING_NetjailNode *node;
2299  char *addr;
2300  char *template;
2301 
2303  "node_n: %u\n",
2304  connection->node_n);
2305 
2306  node = connection->node;
2307  if (connection->namespace_n == node->namespace_n)
2308  {
2309  template = CONNECT_ADDRESS_TEMPLATE;
2310  }
2311  else if (0 == connection->namespace_n)
2312  {
2313  template = KNOWN_CONNECT_ADDRESS_TEMPLATE;
2314  }
2315  else if (1 == connection->node_n)
2316  {
2318  }
2319  else
2320  {
2321  return NULL;
2322  }
2323 
2324  if (0 == strcmp (PREFIX_TCP, prefix))
2325  {
2326 
2327  GNUNET_asprintf (&addr,
2328  template,
2329  prefix,
2330  connection->node_n);
2331  }
2332  else if (0 == strcmp (PREFIX_UDP, prefix))
2333  {
2334  GNUNET_asprintf (&addr,
2335  template,
2336  prefix,
2337  connection->node_n);
2338  }
2339  else
2340  {
2341  GNUNET_assert (0);
2342  }
2343 
2344  return addr;
2345 }
static int prefix
If printing the value of PREFIX has been requested.
Definition: gnunet-config.c:53
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
int int GNUNET_asprintf(char **buf, const char *format,...) __attribute__((format(printf
Like asprintf, just portable.
unsigned int node_n
The number of the node this connection points to.
#define PREFIX_TCP
Definition: testing.c:47
#define CONNECT_ADDRESS_TEMPLATE
Definition: testing.c:41
#define PREFIX_UDP
Definition: testing.c:49
#define KNOWN_CONNECT_ADDRESS_TEMPLATE
Definition: testing.c:45
#define ROUTER_CONNECT_ADDRESS_TEMPLATE
Definition: testing.c:43

References CONNECT_ADDRESS_TEMPLATE, GNUNET_asprintf(), GNUNET_assert, GNUNET_ERROR_TYPE_DEBUG, KNOWN_CONNECT_ADDRESS_TEMPLATE, LOG, GNUNET_TESTING_NodeConnection::namespace_n, GNUNET_TESTING_NetjailNode::namespace_n, GNUNET_TESTING_NodeConnection::node, GNUNET_TESTING_NodeConnection::node_n, prefix, PREFIX_TCP, PREFIX_UDP, and ROUTER_CONNECT_ADDRESS_TEMPLATE.

Referenced by connect_peers_run().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GNUNET_TESTING_free_topology()

void GNUNET_TESTING_free_topology ( struct GNUNET_TESTING_NetjailTopology topology)

Deallocate memory of the struct GNUNET_TESTING_NetjailTopology.

Parameters
topologyThe GNUNET_TESTING_NetjailTopology to be deallocated.

Definition at line 2249 of file testing.c.

2250 {
2252  free_namespaces_cb, NULL);
2255  NULL);
2257  GNUNET_free (topology->plugin);
2259 }
int GNUNET_CONTAINER_multishortmap_iterate(struct GNUNET_CONTAINER_MultiShortmap *map, GNUNET_CONTAINER_ShortmapIterator it, void *it_cls)
Iterate over all entries in the map.
void GNUNET_CONTAINER_multishortmap_destroy(struct GNUNET_CONTAINER_MultiShortmap *map)
Destroy a hash map.
int free_nodes_cb(void *cls, const struct GNUNET_ShortHashCode *key, void *value)
Definition: testing.c:2195
int free_namespaces_cb(void *cls, const struct GNUNET_ShortHashCode *key, void *value)
Definition: testing.c:2228

References free_namespaces_cb(), free_nodes_cb(), GNUNET_CONTAINER_multishortmap_destroy(), GNUNET_CONTAINER_multishortmap_iterate(), GNUNET_free, and topology.

Here is the call graph for this function:

◆ GNUNET_TESTING_calculate_num()

unsigned int GNUNET_TESTING_calculate_num ( struct GNUNET_TESTING_NodeConnection node_connection,
struct GNUNET_TESTING_NetjailTopology topology 
)

Calculate the unique id identifying a node from a given connction.

Parameters
node_connectionThe connection we calculate the id from.
topologyThe topology we get all needed information from.
Returns
The unique id of the node from the connection.

Definition at line 2269 of file testing.c.

2272 {
2273  unsigned int n, m, num;
2274 
2275  n = node_connection->namespace_n;
2276  m = node_connection->node_n;
2277 
2278  if (0 == n)
2279  num = m;
2280  else
2281  num = (n - 1) * topology->nodes_m + m + topology->nodes_x;
2282 
2283  return num;
2284 }
static struct GNUNET_ARM_MonitorHandle * m
Monitor connection with ARM.
Definition: gnunet-arm.c:104

References m, GNUNET_TESTING_NodeConnection::namespace_n, GNUNET_TESTING_NodeConnection::node_n, and topology.

Referenced by connect_peers_run(), and notify_connect().

Here is the caller graph for this function:

◆ GNUNET_TESTING_cmd_system_destroy()

struct GNUNET_TESTING_Command GNUNET_TESTING_cmd_system_destroy ( const char *  label,
const char *  create_label 
)

Create command.

Parameters
labelname for command.
create_labelLabel of the cmd which started the test system.
Returns
command.

Definition at line 70 of file testing_api_cmd_system_destroy.c.

102 {
103  struct TestSystemState *tss;
104 
105  tss = GNUNET_new (struct TestSystemState);
106  tss->create_label = create_label;
107  {
108  struct GNUNET_TESTING_Command cmd = {
109  .cls = tss,
110  .label = label,
111  .run = &system_destroy_run,
112  .cleanup = &system_destroy_cleanup,
113  .traits = &system_destroy_traits
114  };
115 
116  return cmd;
117  }
118 }
A command to be run by the interpreter.
const char * label
Label for the command.
void * cls
Closure for all commands with command-specific context information.
Struct to hold information for callbacks.
static void system_destroy_cleanup(void *cls)
The cleanup function of this cmd frees resources the cmd allocated.
static void system_destroy_run(void *cls, struct GNUNET_TESTING_Interpreter *is)
The run method of this cmd will remove the test environment for a node.
static enum GNUNET_GenericReturnValue system_destroy_traits(void *cls, const void **ret, const char *trait, unsigned int index)
Trait function of this cmd does nothing.

◆ GNUNET_TESTING_cmd_system_create()

struct GNUNET_TESTING_Command GNUNET_TESTING_cmd_system_create ( const char *  label,
const char *  testdir 
)

Create command.

Parameters
labelname for command.
labelname for the test environment directory.
Returns
command.

Definition at line 96 of file testing_api_cmd_system_create.c.

114 {
115  struct TestSystemState *tss;
116 
117  tss = GNUNET_new (struct TestSystemState);
118  tss->testdir = testdir;
119 
120  struct GNUNET_TESTING_Command cmd = {
121  .cls = tss,
122  .label = label,
123  .run = &system_create_run,
124  .cleanup = &system_create_cleanup,
125  .traits = &system_create_traits
126  };
127 
128  return cmd;
129 }
static void system_create_run(void *cls, struct GNUNET_TESTING_Interpreter *is)
The run method of this cmd will setup a test environment for a node.
static int system_create_traits(void *cls, const void **ret, const char *trait, unsigned int index)
This function prepares an array with traits.
static void system_create_cleanup(void *cls)
The cleanup function of this cmd frees resources the cmd allocated.

◆ GNUNET_TESTING_cmd_netjail_start()

struct GNUNET_TESTING_Command GNUNET_TESTING_cmd_netjail_start ( const char *  label,
char *  topology_config,
unsigned int *  read_file 
)

Create command.

Parameters
labelname for command.
topology_configConfiguration file for the test topology.
read_fileFlag indicating if the the name of the topology file is send to the helper, or a string with the topology data.
Returns
command.
Parameters
labelname for command.
topology_configConfiguration file for the test topology.
Returns
command.

Definition at line 136 of file testing_api_cmd_netjail_start.c.

219 {
220  struct NetJailState *ns;
221 
222  ns = GNUNET_new (struct NetJailState);
223  ns->topology_config = topology_config;
224  ns->read_file = read_file;
225  {
226  struct GNUNET_TESTING_Command cmd = {
227  .cls = ns,
228  .label = label,
229  .run = &netjail_start_run,
230  .ac = &ns->ac,
231  .cleanup = &netjail_start_cleanup
232  };
233 
234  return cmd;
235  }
236 }
static struct GNUNET_NAMESTORE_Handle * ns
Handle to the namestore.
Definition: gnunet-abd.c:41
enum GNUNET_GenericReturnValue read_file(char const *const filename, char **buffer)
Definition: pabc_helper.c:70
Struct to hold information for callbacks.
char * topology_config
Configuration file for the test topology.
static void netjail_start_run(void *cls, struct GNUNET_TESTING_Interpreter *is)
The run method starts the script which setup the network namespaces.
static void netjail_start_cleanup(void *cls)
The cleanup function of this cmd frees resources the cmd allocated.

◆ GNUNET_TESTING_cmd_netjail_stop()

struct GNUNET_TESTING_Command GNUNET_TESTING_cmd_netjail_stop ( const char *  label,
char *  topology_config,
unsigned int *  read_file 
)

Create command.

Parameters
labelname for command.
topology_configConfiguration file for the test topology.
read_fileFlag indicating if the the name of the topology file is send to the helper, or a string with the topology data.
Returns
command.

Definition at line 126 of file testing_api_cmd_netjail_stop.c.

186 {
187  struct NetJailState *ns;
188 
189  ns = GNUNET_new (struct NetJailState);
190  ns->topology_config = topology_config;
191  ns->read_file = read_file;
192  {
193  struct GNUNET_TESTING_Command cmd = {
194  .cls = ns,
195  .label = label,
196  .run = &netjail_stop_run,
197  .ac = &ns->ac,
198  .cleanup = &netjail_stop_cleanup
199  };
200 
201  return cmd;
202  }
203 }
static void netjail_stop_cleanup(void *cls)
The cleanup function of this cmd frees resources the cmd allocated.
static void netjail_stop_run(void *cls, struct GNUNET_TESTING_Interpreter *is)
The run method starts the script which deletes the network namespaces.

◆ GNUNET_TESTING_cmd_netjail_start_testing_system()

struct GNUNET_TESTING_Command GNUNET_TESTING_cmd_netjail_start_testing_system ( const char *  label,
struct GNUNET_TESTING_NetjailTopology topology,
unsigned int *  read_file,
char *  topology_data,
struct GNUNET_TIME_Relative  timeout 
)

Create command.

Parameters
labelName for the command.
topologyThe complete topology information.
read_fileFlag indicating if the the name of the topology file is send to the helper, or a string with the topology data.
topology_dataIf read_file is GNUNET_NO, topology_data holds the string with the topology.
timeoutBefore this timeout is reached this cmd MUST finish.
Returns
command.

Definition at line 739 of file testing_api_cmd_netjail_start_testsystem.c.

788 {
789  struct NetJailState *ns;
790 
791  ns = GNUNET_new (struct NetJailState);
792  ns->local_m = topology->nodes_m;
793  ns->global_n = topology->namespaces_n;
794  ns->known = topology->nodes_x;
795  ns->plugin_name = topology->plugin;
796  ns->topology = topology;
797  ns->read_file = read_file;
798  ns->topology_data = topology_data;
800 
801  struct GNUNET_TESTING_Command cmd = {
802  .cls = ns,
803  .label = label,
804  .run = &netjail_exec_run,
805  .ac = &ns->ac,
806  .cleanup = &netjail_exec_cleanup,
807  .traits = &netjail_exec_traits
808  };
809 
810  return cmd;
811 }
static struct GNUNET_TIME_Relative timeout
Desired timeout for the lookup (default is no timeout).
Definition: gnunet-abd.c:61
struct GNUNET_TIME_Relative GNUNET_TIME_relative_subtract(struct GNUNET_TIME_Relative a1, struct GNUNET_TIME_Relative a2)
Subtract relative timestamp from the other.
Definition: time.c:572
char * topology_data
String with topology data or name of topology file.
static void netjail_exec_cleanup(void *cls)
Code to clean up resource this cmd used.
static void netjail_exec_run(void *cls, struct GNUNET_TESTING_Interpreter *is)
This function starts a helper process for each node.
static enum GNUNET_GenericReturnValue netjail_exec_traits(void *cls, const void **ret, const char *trait, unsigned int index)
This function prepares an array with traits.

◆ GNUNET_TESTING_cmd_stop_testing_system()

struct GNUNET_TESTING_Command GNUNET_TESTING_cmd_stop_testing_system ( const char *  label,
const char *  helper_start_label,
struct GNUNET_TESTING_NetjailTopology topology 
)

Create command.

Parameters
labelname for command.
helper_start_labellabel of the cmd to start the test system.
topologyThe complete topology information.
Returns
command.

Definition at line 85 of file testing_api_cmd_netjail_stop_testsystem.c.

140 {
141  struct StopHelperState *shs;
142 
143  shs = GNUNET_new (struct StopHelperState);
145  shs->local_m = topology->nodes_m;
146  shs->global_n = topology->namespaces_n;
147  shs->known = topology->nodes_x;
148  shs->topology = topology;
149 
150  struct GNUNET_TESTING_Command cmd = {
151  .cls = shs,
152  .label = label,
153  .run = &stop_testing_system_run,
154  .cleanup = &stop_testing_system_cleanup,
155  };
156 
157  return cmd;
158 }
Struct to store information handed over to callbacks.
unsigned int known
Number of global known nodes.
struct GNUNET_TESTING_NetjailTopology * topology
The complete topology information.
static void stop_testing_system_run(void *cls, struct GNUNET_TESTING_Interpreter *is)
This function stops the helper process for each node.
static void stop_testing_system_cleanup(void *cls)
Code to clean up resource this cmd used.

◆ GNUNET_TESTING_send_local_test_finished_msg()

struct GNUNET_MessageHeader* GNUNET_TESTING_send_local_test_finished_msg ( enum GNUNET_GenericReturnValue  rv)

Create a GNUNET_CMDS_LOCAL_FINISHED message.

Parameters
rvThe result of the local test as GNUNET_GenericReturnValue.
Returns
The GNUNET_CMDS_LOCAL_FINISHED message.

Definition at line 2355 of file testing.c.

2356 {
2357  struct GNUNET_CMDS_LOCAL_FINISHED *reply;
2358  size_t msg_length;
2359 
2361  "Local test exits with status %d\n",
2362  rv);
2363  msg_length = sizeof(struct GNUNET_CMDS_LOCAL_FINISHED);
2364  reply = GNUNET_new (struct GNUNET_CMDS_LOCAL_FINISHED);
2366  reply->header.size = htons ((uint16_t) msg_length);
2367  reply->result = htons (rv);
2368 
2369  return (struct GNUNET_MessageHeader *) reply;
2370 }
#define GNUNET_log(kind,...)
#define GNUNET_MESSAGE_TYPE_CMDS_HELPER_LOCAL_FINISHED
struct GNUNET_MessageHeader header
Type is GNUNET_MESSAGE_TYPE_CMDS_HELPER_LOCAL_FINISHED.
Definition: testing_cmds.h:85
enum GNUNET_GenericReturnValue result
Definition: testing_cmds.h:87
Header for all communications.
uint16_t type
The type of the message (GNUNET_MESSAGE_TYPE_XXXX), in big-endian format.
uint16_t size
The length of the struct (in bytes, including the length field itself), in big-endian format.

References GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, GNUNET_MESSAGE_TYPE_CMDS_HELPER_LOCAL_FINISHED, GNUNET_new, GNUNET_CMDS_LOCAL_FINISHED::header, GNUNET_CMDS_LOCAL_FINISHED::result, GNUNET_MessageHeader::size, and GNUNET_MessageHeader::type.

◆ GNUNET_TESTING_cmd_barrier_create()

struct GNUNET_TESTING_Command GNUNET_TESTING_cmd_barrier_create ( const char *  label)

◆ GNUNET_TESTING_cmd_barrier_setup_finished()

struct GNUNET_TESTING_Command GNUNET_TESTING_cmd_barrier_setup_finished ( const char *  label)

◆ GNUNET_TESTING_cmd_barrier_reached()

struct GNUNET_TESTING_Command GNUNET_TESTING_cmd_barrier_reached ( const char *  label,
const char *  barrier_label 
)

◆ GNUNET_TESTING_cmd_block_until_all_peers_started()

struct GNUNET_TESTING_Command GNUNET_TESTING_cmd_block_until_all_peers_started ( const char *  label,
unsigned int *  all_peers_started 
)

◆ GNUNET_TESTING_cmd_block_until_external_trigger()

struct GNUNET_TESTING_Command GNUNET_TESTING_cmd_block_until_external_trigger ( const char *  label)

Create command.

Parameters
labelname for command.
all_peers_startedFlag which will be set from outside.
asynchronous_finishIf GNUNET_YES this command will not block.
Returns
command.
Parameters
labelname for command.
all_peers_startedFlag which will be set from outside.
asynchronous_finishIf GNUNET_YES this command will not block. Can be NULL.
Returns
command.

Definition at line 75 of file testing_api_cmd_block_until_external_trigger.c.

107 {
108  struct BlockState *bs;
109 
110  bs = GNUNET_new (struct BlockState);
111  bs->label = label;
113  {
114  struct GNUNET_TESTING_Command cmd = {
115  .cls = bs,
116  .label = label,
118  .ac = &bs->ac,
121  };
122 
123  return cmd;
124  }
125 }
struct GNUNET_TESTING_AsyncContext ac
Context for our asynchronous completion.
unsigned int asynchronous_finish
If this command will block.
const char * label
The label of this command.
static void block_until_all_peers_started_cleanup(void *cls)
The cleanup function of this cmd frees resources the cmd allocated.
static int block_until_external_trigger_traits(void *cls, const void **ret, const char *trait, unsigned int index)
static void block_until_all_peers_started_run(void *cls, struct GNUNET_TESTING_Interpreter *is)
This function does nothing but to start the cmd.

◆ GNUNET_TESTING_cmd_send_peer_ready()

struct GNUNET_TESTING_Command GNUNET_TESTING_cmd_send_peer_ready ( const char *  label,
TESTING_CMD_HELPER_write_cb  write_message 
)

Create command.

Parameters
labelname for command.
write_messageCallback to write messages to the master loop.
Returns
command.

Definition at line 85 of file testing_api_cmd_send_peer_ready.c.

111 {
112  struct SendPeerReadyState *sprs;
113 
114  sprs = GNUNET_new (struct SendPeerReadyState);
116  {
117  struct GNUNET_TESTING_Command cmd = {
118  .cls = sprs,
119  .label = label,
120  .run = &send_peer_ready_run,
121  .cleanup = &send_peer_ready_cleanup,
122  .traits = &send_peer_ready_traits
123  };
124 
125  return cmd;
126  }
127 }
static int write_message(uint16_t message_type, const char *data, size_t data_length)
Write message to the master process.
Struct to hold information for callbacks.
TESTING_CMD_HELPER_write_cb write_message
Callback to write messages to the master loop.
static void send_peer_ready_run(void *cls, struct GNUNET_TESTING_Interpreter *is)
This function sends a GNUNET_MESSAGE_TYPE_CMDS_HELPER_PEER_STARTED message to the master loop.
static void send_peer_ready_cleanup(void *cls)
The cleanup function of this cmd frees resources the cmd allocated.
static enum GNUNET_GenericReturnValue send_peer_ready_traits(void *cls, const void **ret, const char *trait, unsigned int index)
Trait function of this cmd does nothing.

◆ GNUNET_TESTING_cmd_local_test_finished()

struct GNUNET_TESTING_Command GNUNET_TESTING_cmd_local_test_finished ( const char *  label,
TESTING_CMD_HELPER_write_cb  write_message 
)

Create command.

Parameters
labelname for command.
write_messageCallback to write messages to the master loop.
Returns
command.

Definition at line 77 of file testing_api_cmd_local_test_finished.c.

105 {
106  struct LocalFinishedState *lfs;
107 
108  lfs = GNUNET_new (struct LocalFinishedState);
110  {
111  struct GNUNET_TESTING_Command cmd = {
112  .cls = lfs,
113  .label = label,
114  .run = &local_test_finished_run,
115  .cleanup = &local_test_finished_cleanup,
116  };
117 
118  return cmd;
119  }
120 }
Struct to hold information for callbacks.
TESTING_CMD_HELPER_write_cb write_message
Callback to write messages to the master loop.
static void local_test_finished_run(void *cls, struct GNUNET_TESTING_Interpreter *is)
This function sends a GNUNET_MESSAGE_TYPE_CMDS_HELPER_LOCAL_FINISHED message to the master loop.
static void local_test_finished_cleanup(void *cls)
The cleanup function of this cmd frees resources the cmd allocated.

◆ GNUNET_TESTING_cmd_local_test_prepared()

struct GNUNET_TESTING_Command GNUNET_TESTING_cmd_local_test_prepared ( const char *  label,
TESTING_CMD_HELPER_write_cb  write_message 
)

Create command.

Parameters
labelname for command.
write_messageCallback to write messages to the master loop.
all_local_tests_preparedFlag which will be set from outside.
Returns
command.

Definition at line 78 of file testing_api_cmd_local_test_prepared.c.

107 {
108  struct LocalPreparedState *lfs;
109 
110  lfs = GNUNET_new (struct LocalPreparedState);
112 
113  struct GNUNET_TESTING_Command cmd = {
114  .cls = lfs,
115  .label = label,
116  .run = &local_test_prepared_run,
117  .ac = &lfs->ac,
118  .cleanup = &local_test_prepared_cleanup,
119  .traits = &local_test_prepared_traits
120  };
121 
122  return cmd;
123 }
TESTING_CMD_HELPER_write_cb write_message
Callback to write messages to the master loop.
struct GNUNET_TESTING_AsyncContext ac
Context for our asynchronous completion.
static void local_test_prepared_run(void *cls, struct GNUNET_TESTING_Interpreter *is)
This function sends a GNUNET_MESSAGE_TYPE_CMDS_HELPER_LOCAL_TESTS_PREPARED message to the master loop...
enum GNUNET_GenericReturnValue local_test_prepared_traits(void *cls, const void **ret, const char *trait, unsigned int index)
This function prepares an array with traits.
static void local_test_prepared_cleanup(void *cls)
The cleanup function of this cmd frees resources the cmd allocated.

◆ GNUNET_TESTING_get_trait_test_system()

enum GNUNET_GenericReturnValue GNUNET_TESTING_get_trait_test_system ( const struct GNUNET_TESTING_Command cmd,
const struct GNUNET_TESTING_System **  ret 
)

Referenced by backchannel_check_run(), connect_peers_run(), send_simple_run(), start_peer_run(), and system_destroy_run().

Here is the caller graph for this function:

◆ GNUNET_TESTING_make_trait_test_system()

struct GNUNET_TESTING_Trait GNUNET_TESTING_make_trait_test_system ( const struct GNUNET_TESTING_System value)

Referenced by system_create_traits().

Here is the caller graph for this function:

◆ GNUNET_TESTING_get_trait_async_context()

enum GNUNET_GenericReturnValue GNUNET_TESTING_get_trait_async_context ( const struct GNUNET_TESTING_Command cmd,
const struct GNUNET_TESTING_AsyncContext **  ret 
)

◆ GNUNET_TESTING_make_trait_async_context()

struct GNUNET_TESTING_Trait GNUNET_TESTING_make_trait_async_context ( const struct GNUNET_TESTING_AsyncContext value)

Referenced by block_until_external_trigger_traits().

Here is the caller graph for this function:

◆ GNUNET_TESTING_get_trait_helper_handles()

enum GNUNET_GenericReturnValue GNUNET_TESTING_get_trait_helper_handles ( const struct GNUNET_TESTING_Command cmd,
const struct GNUNET_HELPER_Handle ***  ret 
)

Referenced by stop_testing_system_run().

Here is the caller graph for this function:

◆ GNUNET_TESTING_make_trait_helper_handles()

struct GNUNET_TESTING_Trait GNUNET_TESTING_make_trait_helper_handles ( const struct GNUNET_HELPER_Handle **  value)

◆ GNUNET_TESTING_get_trait_local_prepared_state()

enum GNUNET_GenericReturnValue GNUNET_TESTING_get_trait_local_prepared_state ( const struct GNUNET_TESTING_Command cmd,
const struct LocalPreparedState **  ret 
)

◆ GNUNET_TESTING_make_trait_local_prepared_state()

struct GNUNET_TESTING_Trait GNUNET_TESTING_make_trait_local_prepared_state ( const struct LocalPreparedState value)

◆ GNUNET_TESTING_get_trait_block_state()

enum GNUNET_GenericReturnValue GNUNET_TESTING_get_trait_block_state ( const struct GNUNET_TESTING_Command cmd,
const struct BlockState **  ret 
)

◆ GNUNET_TESTING_make_trait_block_state()

struct GNUNET_TESTING_Trait GNUNET_TESTING_make_trait_block_state ( const struct BlockState value)

Referenced by block_until_external_trigger_traits().

Here is the caller graph for this function: