gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnunet] branch master updated: - added tng milestone 2 versions with im


From: gnunet
Subject: [gnunet] branch master updated: - added tng milestone 2 versions with improvements onto version 1 files , fixed smaller issues in milestone 1 versions, added version 1 to buildbot, added new testcase for testing udp backchannel
Date: Mon, 13 Sep 2021 18:25:39 +0200

This is an automated email from the git hooks/post-receive script.

t3sserakt pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new 72d77af52 - added tng milestone 2 versions with improvements onto 
version 1 files , fixed smaller issues in milestone 1 versions, added version 1 
to buildbot, added new testcase for testing udp backchannel
72d77af52 is described below

commit 72d77af5270ba1dabe6fa8c45009601b44d23b7b
Author: t3sserakt <t3ss@posteo.de>
AuthorDate: Mon Sep 13 18:25:21 2021 +0200

    - added tng milestone 2 versions with improvements onto version 1 files , 
fixed smaller issues in milestone 1 versions, added version 1 to buildbot, 
added new testcase for testing udp backchannel
---
 .buildbot/firefly-x86_64-amdepyc_test_tng.sh       |   2 +-
 contrib/scripts/netjail/netjail_setup_internet.sh  |   2 +-
 po/POTFILES.in                                     |   1 +
 src/include/gnunet_testing_ng_lib.h                | 179 +++++++++-
 src/include/gnunet_transport_application_service.h |   7 -
 src/testing/Makefile.am                            |  12 +
 src/testing/gnunet-cmds-helper.c                   |  20 +-
 src/testing/netjail_core_v2.sh                     | 260 ++++++++++++++
 src/testing/netjail_exec_v2.sh                     |  14 +
 src/testing/netjail_start_v2.sh                    |  61 ++++
 src/testing/netjail_stop_v2.sh                     |  59 ++++
 src/testing/test_testing_api_cmd_netjail.c         |  10 +-
 src/testing/testing.c                              | 381 ++++++++++++++++++++-
 .../testing_api_cmd_netjail_start_testsystem.c     |  20 --
 ... testing_api_cmd_netjail_start_testsystem_v2.c} | 266 +++++++++-----
 src/testing/testing_api_cmd_netjail_start_v2.c     | 229 +++++++++++++
 .../testing_api_cmd_netjail_stop_testsystem_v2.c   | 143 ++++++++
 src/testing/testing_api_cmd_netjail_stop_v2.c      | 225 ++++++++++++
 src/testing/topo.sh                                |  95 +++++
 src/transport/Makefile.am                          |  39 ++-
 .../test_transport_plugin_cmd_simple_send.c        |  13 +-
 ... => test_transport_plugin_cmd_simple_send_v2.c} |  48 ++-
 ...st_transport_plugin_cmd_udp_backchannel_recv.c} |  48 ++-
 ...st_transport_plugin_cmd_udp_backchannel_send.c} |  48 ++-
 .../test_transport_port_forward.c}                 |  44 ++-
 .../test_transport_simple_send.c}                  |  35 +-
 .../test_transport_simple_send_v2.c}               |  42 ++-
 src/transport/test_transport_simple_send_v2.sh     |   2 +
 src/transport/transport-testing-cmds.h             | 233 ++++++++++++-
 src/transport/transport-testing-ng.h               | 107 ------
 src/transport/transport_api_cmd_connecting_peers.c |  56 ++-
 ...s.c => transport_api_cmd_connecting_peers_v2.c} |  93 ++---
 src/transport/transport_api_cmd_send_simple_v2.c   | 156 +++++++++
 src/transport/transport_api_cmd_start_peer.c       |  36 +-
 ...rt_peer.c => transport_api_cmd_start_peer_v2.c} | 134 +++++---
 src/transport/transport_api_cmd_stop_peer.c        |   2 +-
 36 files changed, 2679 insertions(+), 443 deletions(-)

diff --git a/.buildbot/firefly-x86_64-amdepyc_test_tng.sh 
b/.buildbot/firefly-x86_64-amdepyc_test_tng.sh
index f247f5a69..55561beac 100755
--- a/.buildbot/firefly-x86_64-amdepyc_test_tng.sh
+++ b/.buildbot/firefly-x86_64-amdepyc_test_tng.sh
@@ -3,6 +3,6 @@
 # echo "Skipped"
 
 pushd src/transport
-make check TESTS='test_communicator_basic-tcp test_communicator_rekey-tcp 
test_communicator_basic-unix test_communicator_basic-udp 
test_communicator_backchannel-udp test_communicator_rekey-udp 
test_communicator_bidirect-tcp'
+make check TESTS='test_communicator_basic-tcp test_communicator_rekey-tcp 
test_communicator_basic-unix test_communicator_basic-udp 
test_communicator_backchannel-udp test_communicator_rekey-udp 
test_communicator_bidirect-tcp test_transport_simple_send.sh'
 pkill --signal 9 -U buildbot gnunet
 popd
diff --git a/contrib/scripts/netjail/netjail_setup_internet.sh 
b/contrib/scripts/netjail/netjail_setup_internet.sh
index e3880783f..ea820f38c 100755
--- a/contrib/scripts/netjail/netjail_setup_internet.sh
+++ b/contrib/scripts/netjail/netjail_setup_internet.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 . "./netjail_core.sh"
 
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 814727dab..f3c82b259 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -438,6 +438,7 @@ src/testing/testing_api_loop.c
 src/testing/testing_api_trait_cmd.c
 src/testing/testing_api_trait_process.c
 src/testing/testing_api_traits.c
+src/testing/testing_json_vnet.c
 src/topology/friends.c
 src/topology/gnunet-daemon-topology.c
 src/transport/gnunet-communicator-tcp.c
diff --git a/src/include/gnunet_testing_ng_lib.h 
b/src/include/gnunet_testing_ng_lib.h
index 939863d67..a6f8429f4 100644
--- a/src/include/gnunet_testing_ng_lib.h
+++ b/src/include/gnunet_testing_ng_lib.h
@@ -47,6 +47,109 @@
   } while (0)
 
 
+/**
+ * Router of a network namespace.
+ */
+struct GNUNET_TESTING_NetjailRouter
+{
+  /**
+   * Will tcp be forwarded?
+   */
+  unsigned int tcp_port;
+
+  /**
+   * Will udp be forwarded?
+   */
+  unsigned int udp_port;
+};
+
+
+/**
+ * Node in the netjail topology.
+ */
+struct GNUNET_TESTING_NetjailNode
+{
+  /**
+   * Plugin for the test case to be run on this node.
+   */
+  char *plugin;
+
+  /**
+   * Flag indicating if this node is a global known node.
+   */
+  unsigned int is_global;
+
+  /**
+   * The number of the namespace this node is running in.
+   */
+  unsigned int namespace_n;
+
+  /**
+   * The number of this node in the namespace.
+   */
+  unsigned int node_n;
+};
+
+
+/**
+ * Namespace in a topology.
+ */
+struct GNUNET_TESTING_NetjailNamespace
+{
+  /**
+   * The number of the namespace.
+   */
+  unsigned int namespace_n;
+
+  /**
+   * Router of the namespace.
+   */
+  struct GNUNET_TESTING_NetjailRouter *router;
+
+  /**
+   * Hash map containing the nodes in this namespace.
+   */
+  struct GNUNET_CONTAINER_MultiShortmap *nodes;
+};
+
+/**
+ * Toplogy of our netjail setup.
+ */
+struct GNUNET_TESTING_NetjailTopology
+{
+
+  /**
+   * Default plugin for the test case to be run on nodes.
+   */
+  char *plugin;
+
+  /**
+   * Number of namespaces.
+   */
+  unsigned int namespaces_n;
+
+  /**
+   * Number of nodes per namespace.
+   */
+  unsigned int nodes_m;
+
+  /**
+   * Number of global known nodes per namespace.
+   */
+  unsigned int nodes_x;
+
+  /**
+   * Hash map containing the namespaces (for natted nodes) of the topology.
+   */
+  struct GNUNET_CONTAINER_MultiShortmap *map_namespaces;
+
+  /**
+   * Hash map containing the global known nodes which are not natted.
+   */
+  struct GNUNET_CONTAINER_MultiShortmap *map_globals;
+};
+
+
 /* ******************* Generic interpreter logic ************ */
 
 /**
@@ -455,6 +558,16 @@ struct GNUNET_TESTING_Timer
 };
 
 
+/**
+ * Getting the topology from file.
+ *
+ * @param filename The name of the topology file.
+ * @return The GNUNET_TESTING_NetjailTopology
+ */
+struct GNUNET_TESTING_NetjailTopology *
+GNUNET_TESTING_get_topo_from_file (const char *filename);
+
+
 /**
  * Obtain performance data from the interpreter.
  *
@@ -853,7 +966,8 @@ GNUNET_TESTING_cmd_system_destroy (const char *label,
  * Create command.
  *
  * @param label name for command.
- * @param binaryname to start.
+ * @param local_m Number of local nodes in each namespace.
+ * @param global_n The number of namespaces.
  * @return command.
  */
 struct GNUNET_TESTING_Command
@@ -861,6 +975,17 @@ GNUNET_TESTING_cmd_netjail_start (const char *label,
                                   char *local_m,
                                   char *global_n);
 
+/**
+ * Create command.
+ *
+ * @param label name for command.
+ * @param topology_config Configuration file for the test topology.
+ * @return command.
+ */
+struct GNUNET_TESTING_Command
+GNUNET_TESTING_cmd_netjail_start_v2 (const char *label,
+                                     char *topology_config);
+
 
 /**
  * Create command.
@@ -877,6 +1002,20 @@ GNUNET_TESTING_cmd_netjail_start_testing_system (const 
char *label,
                                                  unsigned int *rv);
 
 
+/**
+ * Create command.
+ *
+ * @param label Name for the command.
+ * @param topology_config Configuration file for the test topology.
+ * @param rv Pointer to the return value of the test.
+ * @return command.
+ */
+struct GNUNET_TESTING_Command
+GNUNET_TESTING_cmd_netjail_start_testing_system_v2 (const char *label,
+                                                    const char 
*topology_config,
+                                                    unsigned int *rv);
+
+
 /**
  * Create command.
  *
@@ -890,12 +1029,36 @@ GNUNET_TESTING_cmd_netjail_stop (const char *label,
                                  char *global_n);
 
 
+/**
+ * Create command.
+ *
+ * @param label name for command.
+ * @param topology_config Configuration file for the test topology.
+ * @return command.
+ */
+struct GNUNET_TESTING_Command
+GNUNET_TESTING_cmd_netjail_stop_v2 (const char *label,
+                                    char *topology_config);
+
+
 struct GNUNET_TESTING_Command
 GNUNET_TESTING_cmd_stop_testing_system (const char *label,
                                         const char *helper_start_label,
                                         char *local_m,
                                         char *global_n);
 
+/**
+ * Create command.
+ *
+ * @param label name for command.
+ * @param topology_config Configuration file for the test topology.
+ * @return command.
+ */
+struct GNUNET_TESTING_Command
+GNUNET_TESTING_cmd_stop_testing_system_v2 (const char *label,
+                                           const char *helper_start_label,
+                                           const char *topology_config);
+
 
 int
 GNUNET_TESTING_get_trait_helper_handles (const struct
@@ -903,6 +1066,20 @@ GNUNET_TESTING_get_trait_helper_handles (const struct
                                          struct GNUNET_HELPER_Handle 
***helper);
 
 
+/**
+ * Offer handles to testing cmd helper from trait
+ *
+ * @param cmd command to extract the message from.
+ * @param pt pointer to message.
+ * @return #GNUNET_OK on success.
+ */
+int
+GNUNET_TESTING_get_trait_helper_handles_v2 (const struct
+                                            GNUNET_TESTING_Command *cmd,
+                                            struct GNUNET_HELPER_Handle ***
+                                            helper);
+
+
 struct GNUNET_TESTING_Command
 GNUNET_TESTING_cmd_block_until_all_peers_started (const char *label,
                                                   unsigned int *
diff --git a/src/include/gnunet_transport_application_service.h 
b/src/include/gnunet_transport_application_service.h
index 0562e2183..f5d4c4ee0 100644
--- a/src/include/gnunet_transport_application_service.h
+++ b/src/include/gnunet_transport_application_service.h
@@ -116,13 +116,6 @@ GNUNET_TRANSPORT_application_validate (
   enum GNUNET_NetworkType nt,
   const char *addr);
 
-int
-GNUNET_TRANSPORT_get_trait_application_handle (const struct
-                                               GNUNET_TESTING_Command *cmd,
-                                               struct
-                                               
GNUNET_TRANSPORT_ApplicationHandle
-                                               **ah);
-
 /** @} */ /* end of group */
 
 #endif
diff --git a/src/testing/Makefile.am b/src/testing/Makefile.am
index 038f0cb08..3e9d15986 100644
--- a/src/testing/Makefile.am
+++ b/src/testing/Makefile.am
@@ -45,9 +45,13 @@ libgnunettesting_la_SOURCES = \
   testing_api_cmd_send_peer_ready.c \
   testing_api_cmd_block_until_all_peers_started.c \
   testing_api_cmd_netjail_start.c \
+  testing_api_cmd_netjail_start_v2.c \
   testing_api_cmd_netjail_start_testsystem.c \
+  testing_api_cmd_netjail_start_testsystem_v2.c \
   testing_api_cmd_netjail_stop_testsystem.c \
+  testing_api_cmd_netjail_stop_testsystem_v2.c \
   testing_api_cmd_netjail_stop.c \
+  testing_api_cmd_netjail_stop_v2.c \
   testing.c testing.h \
   testing_api_cmd_system_create.c \
   testing_api_cmd_system_destroy.c \
@@ -87,6 +91,7 @@ list_keys_LDADD = \
 
 
 check_PROGRAMS = \
+ test_testing_topology \
  test_testing_api_cmd_netjail \
  test_testing_hello_world \
  test_testing_portreservation \
@@ -98,6 +103,7 @@ check_PROGRAMS = \
 if ENABLE_TEST_RUN
 AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export 
PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;unset XDG_DATA_HOME;unset 
XDG_CONFIG_HOME;
 TESTS = \
+ test_testing_topology \
  test_testing_api_cmd_netjail \
  test_testing_hello_world \
  test_testing_portreservation \
@@ -106,6 +112,12 @@ TESTS = \
  test_testing_servicestartup
 endif
 
+test_testing_topology_SOURCES = \
+ test_testing_topology.c
+test_testing_topology_LDADD = \
+ libgnunettesting.la \
+ $(top_builddir)/src/util/libgnunetutil.la
+
 test_testing_api_cmd_netjail_SOURCES = \
  test_testing_api_cmd_netjail.c
 test_testing_api_cmd_netjail_LDADD = \
diff --git a/src/testing/gnunet-cmds-helper.c b/src/testing/gnunet-cmds-helper.c
index 21ea33888..8f9e77709 100644
--- a/src/testing/gnunet-cmds-helper.c
+++ b/src/testing/gnunet-cmds-helper.c
@@ -163,13 +163,16 @@ struct WriteContext
   size_t pos;
 };
 
-struct Plugin *plugin;
-
 /**
  * The process handle to the testbed service
 
 static struct GNUNET_OS_Process *cmd_binary_process;*/
 
+/**
+ * Plugin to dynamically load a test case.
+ */
+struct Plugin *plugin;
+
 /**
  * Handle to the testing system
  */
@@ -329,6 +332,7 @@ write_message (struct GNUNET_MessageHeader *message, size_t 
msg_length)
 static int
 tokenizer_cb (void *cls, const struct GNUNET_MessageHeader *message)
 {
+
   struct NodeIdentifier *ni = cls;
   const struct GNUNET_CMDS_HelperInit *msg;
   struct GNUNET_CMDS_HelperReply *reply;
@@ -369,14 +373,14 @@ tokenizer_cb (void *cls, const struct 
GNUNET_MessageHeader *message)
     plugin->n = ni->n;
     plugin->m = ni->m;
 
-    router_ip = GNUNET_malloc (strlen (ROUTER_BASE_IP) + strlen (plugin->m)
+    router_ip = GNUNET_malloc (strlen (ROUTER_BASE_IP) + strlen (plugin->n)
                                + 1);
     strcpy (router_ip, ROUTER_BASE_IP);
-    strcat (router_ip, plugin->m);
+    strcat (router_ip, plugin->n);
 
-    node_ip = GNUNET_malloc (strlen (NODE_BASE_IP) + strlen (plugin->n) + 1);
+    node_ip = GNUNET_malloc (strlen (NODE_BASE_IP) + strlen (plugin->m) + 1);
     strcat (node_ip, NODE_BASE_IP);
-    strcat (node_ip, plugin->n);
+    strcat (node_ip, plugin->m);
 
     plugin->api->start_testcase (&write_message, router_ip, node_ip, plugin->m,
                                  plugin->n, plugin->local_m);
@@ -533,8 +537,8 @@ main (int argc, char **argv)
   ni = GNUNET_new (struct NodeIdentifier);
   ni->global_n = argv[1];
   ni->local_m = argv[2];
-  ni->n = argv[3];
-  ni->m = argv[4];
+  ni->m = argv[3];
+  ni->n = argv[4];
 
   status = GNUNET_OK;
   if (NULL ==
diff --git a/src/testing/netjail_core_v2.sh b/src/testing/netjail_core_v2.sh
new file mode 100755
index 000000000..ef0a54a5e
--- /dev/null
+++ b/src/testing/netjail_core_v2.sh
@@ -0,0 +1,260 @@
+#!/bin/sh
+# 
+
+
+PREFIX=${PPID:?must run from a parent process}
+
+# running with `sudo` is required to be
+# able running the actual commands as the
+# original user.
+
+export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
+
+export RESULT=
+export NAMESPACE_NUM=0
+export INTERFACE_NUM=0
+
+netjail_next_namespace() {
+       local NUM=$NAMESPACE_NUM
+       NAMESPACE_NUM=$(($NAMESPACE_NUM + 1))
+       RESULT=$NUM
+}
+
+netjail_next_interface() {
+       local NUM=$INTERFACE_NUM
+       INTERFACE_NUM=$(($INTERFACE_NUM + 1))
+       RESULT=$NUM
+}
+
+netjail_opt() {
+       local OPT=$1
+       shift 1
+
+       INDEX=1
+
+       while [ $# -gt 0 ]; do
+               if [ "$1" = "$OPT" ]; then
+                       RESULT=$INDEX
+                       return
+               fi
+
+               INDEX=$(($INDEX + 1))
+               shift 1
+       done
+
+       RESULT=0
+}
+
+netjail_opts() {
+       local OPT=$1
+       local DEF=$2
+       shift 2
+       
+       while [ $# -gt 0 ]; do
+               if [ "$1" = "$OPT" ]; then
+                       printf "$2"
+                       return
+               fi
+
+               shift 1
+       done
+       
+       RESULT="$DEF"
+}
+
+netjail_check() {
+       local NODE_COUNT=$1
+       local FD_COUNT=$(($(ls /proc/self/fd | wc -w) - 4))
+
+       # quit if `$FD_COUNT < ($LOCAL_M * $GLOBAL_N * 2)`:
+       # the script also requires `sudo -C ($FD_COUNT + 4)`
+       # so you need 'Defaults closefrom_override' in the
+       # sudoers file.
+
+       if [ $FD_COUNT -lt $(($NODE_COUNT * 2)) ]; then
+               echo "File descriptors do not match requirements!" >&2
+               exit 1
+       fi
+}
+
+netjail_check_bin() {
+       local PROGRAM=$1
+       local MATCH=$(ls $(echo $PATH | tr ":" "\n") | grep "^$PROGRAM\$" | tr 
"\n" " " | awk '{ print $1 }')
+
+       # quit if the required binary $PROGRAM can not be
+       # found in the used $PATH.
+
+       if [ "$MATCH" != "$PROGRAM" ]; then
+               echo "Required binary not found: $PROGRAM" >&2
+               exit 1
+       fi
+}
+
+netjail_bridge() {
+       netjail_next_interface
+       local NUM=$RESULT
+       local BRIDGE=$(printf "%06x-%08x" $PREFIX $NUM)
+
+       ip link add $BRIDGE type bridge
+       ip link set dev $BRIDGE up
+       
+       RESULT=$BRIDGE
+}
+
+netjail_bridge_name() {
+       netjail_next_interface
+       local NUM=$RESULT
+       local BRIDGE=$(printf "%06x-%08x" $PREFIX $NUM)
+       
+       RESULT=$BRIDGE
+}
+
+netjail_bridge_clear() {
+       local BRIDGE=$1
+
+       ip link delete $BRIDGE
+}
+
+netjail_node() {
+       netjail_next_namespace
+       local NUM=$RESULT
+       local NODE=$(printf "%06x-%08x" $PREFIX $NUM)
+
+       ip netns add $NODE
+       
+       RESULT=$NODE
+}
+
+netjail_node_name() {
+       netjail_next_namespace
+       local NUM=$RESULT
+       local NODE=$(printf "%06x-%08x" $PREFIX $NUM)
+       
+       RESULT=$NODE
+}
+
+netjail_node_clear() {
+       local NODE=$1
+
+       ip netns delete $NODE
+}
+
+netjail_node_link_bridge() {
+       local NODE=$1
+       local BRIDGE=$2
+       local ADDRESS=$3
+       local MASK=$4
+       
+       netjail_next_interface
+       local NUM_IF=$RESULT
+       netjail_next_interface
+       local NUM_BR=$RESULT
+       
+       local LINK_IF=$(printf "%06x-%08x" $PREFIX $NUM_IF)
+       local LINK_BR=$(printf "%06x-%08x" $PREFIX $NUM_BR)
+
+       ip link add $LINK_IF type veth peer name $LINK_BR
+       ip link set $LINK_IF netns $NODE
+       ip link set $LINK_BR master $BRIDGE
+
+       ip -n $NODE addr add "$ADDRESS/$MASK" dev $LINK_IF
+       ip -n $NODE link set $LINK_IF up
+       ip -n $NODE link set up dev lo
+
+       ip link set $LINK_BR up
+       
+       RESULT=$LINK_BR
+}
+
+netjail_node_link_bridge_name() {
+       
+       netjail_next_interface
+       netjail_next_interface
+       local NUM_BR=$RESULT
+       
+       local LINK_BR=$(printf "%06x-%08x" $PREFIX $NUM_BR)
+       
+       RESULT=$LINK_BR
+}
+
+netjail_node_unlink_bridge() {
+       local LINK_BR=$1
+
+       ip link delete $LINK_BR
+}
+
+netjail_node_add_nat() {
+       local NODE=$1
+       local ADDRESS=$2
+       local MASK=$3
+
+       ip netns exec $NODE iptables -t nat -A POSTROUTING -s "$ADDRESS/$MASK" 
-j MASQUERADE
+}
+
+netjail_node_add_default() {
+       local NODE=$1
+       local ADDRESS=$2
+
+       ip -n $NODE route add default via $ADDRESS
+}
+
+netjail_node_exec() {
+    JAILOR=${SUDO_USER:?must run in sudo}
+       local NODE=$1
+       local FD_IN=$2
+       local FD_OUT=$3
+       shift 3
+
+       ip netns exec $NODE sudo -u $JAILOR -- $@ 1>& $FD_OUT 0<& $FD_IN
+}
+
+netjail_node_exec_without_fds() {
+    JAILOR=${SUDO_USER:?must run in sudo}
+       NODE=$1
+       shift 1
+
+       ip netns exec $NODE sudo -u $JAILOR -- $@
+}
+
+netjail_node_exec_without_fds_and_sudo() {
+       NODE=$1
+       shift 1
+
+       ip netns exec $NODE $@
+}
+
+netjail_kill() {
+       local PID=$1
+       local MATCH=$(ps --pid $PID | awk "{ if ( \$1 == $PID ) { print \$1 } 
}" | wc -l)
+
+       if [ $MATCH -gt 0 ]; then
+               kill -n 19 $PID
+
+               for CHILD in $(ps -o pid,ppid -ax | awk "{ if ( \$2 == $PID ) { 
print \$1 } }"); do
+                       netjail_kill $CHILD
+               done
+
+               kill $PID
+       fi
+}
+
+netjail_killall() {
+       if [ $# -gt 0 ]; then
+               local PIDS=$1
+
+               for PID in $PIDS; do
+                       netjail_kill $PID
+               done
+       fi
+}
+
+netjail_waitall() {
+       if [ $# -gt 0 ]; then
+               local PIDS=$1
+
+               for PID in $PIDS; do
+                       wait $PID
+               done
+       fi
+}
+
diff --git a/src/testing/netjail_exec_v2.sh b/src/testing/netjail_exec_v2.sh
new file mode 100755
index 000000000..597baad20
--- /dev/null
+++ b/src/testing/netjail_exec_v2.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+. "./../testing/netjail_core_v2.sh"
+
+set -eu
+set -x
+
+export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
+
+M=$1
+N=$2
+
+NODE=$6
+
+netjail_node_exec_without_fds_and_sudo $NODE $3 $4 $5 $1 $2 
diff --git a/src/testing/netjail_start_v2.sh b/src/testing/netjail_start_v2.sh
new file mode 100755
index 000000000..cf1fe113a
--- /dev/null
+++ b/src/testing/netjail_start_v2.sh
@@ -0,0 +1,61 @@
+#!/bin/bash
+. "./../testing/netjail_core_v2.sh"
+. "./../testing/topo.sh"
+
+set -eu
+set -x
+
+export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
+
+filename=$1
+PREFIX=$2
+
+read_topology $filename
+
+shift 2
+
+LOCAL_GROUP="192.168.15"
+GLOBAL_GROUP="92.68.150"
+KNOWN_GROUP="92.68.151"
+
+
+echo "Start [local: $LOCAL_GROUP.0/24, global: $GLOBAL_GROUP.0/16]"
+
+netjail_bridge
+NETWORK_NET=$RESULT
+
+for X in $(seq $KNOWN); do
+       netjail_node
+       KNOWN_NODES[$X]=$RESULT
+       netjail_node_link_bridge ${KNOWN_NODES[$X]} $NETWORK_NET 
"$KNOWN_GROUP.$X" 16
+       KNOWN_LINKS[$X]=$RESULT
+done
+
+declare -A NODES
+declare -A NODE_LINKS
+
+for N in $(seq $GLOBAL_N); do
+       netjail_node
+       ROUTERS[$N]=$RESULT
+       netjail_node_link_bridge ${ROUTERS[$N]} $NETWORK_NET "$GLOBAL_GROUP.$N" 
16
+       NETWORK_LINKS[$N]=$RESULT
+       netjail_bridge
+       ROUTER_NETS[$N]=$RESULT
+       
+       for M in $(seq $LOCAL_M); do
+               netjail_node
+               NODES[$N,$M]=$RESULT
+               netjail_node_link_bridge ${NODES[$N,$M]} ${ROUTER_NETS[$N]} 
"$LOCAL_GROUP.$M" 24
+               NODE_LINKS[$N,$M]=$RESULT
+       done
+
+       ROUTER_ADDR="$LOCAL_GROUP.$(($LOCAL_M+1))"
+       netjail_node_link_bridge ${ROUTERS[$N]} ${ROUTER_NETS[$N]} $ROUTER_ADDR 
24
+       ROUTER_LINKS[$N]=$RESULT
+       
+       netjail_node_add_nat ${ROUTERS[$N]} $ROUTER_ADDR 24
+       
+       for M in $(seq $LOCAL_M); do
+               netjail_node_add_default ${NODES[$N,$M]} $ROUTER_ADDR
+       done
+done
diff --git a/src/testing/netjail_stop_v2.sh b/src/testing/netjail_stop_v2.sh
new file mode 100755
index 000000000..6e9fd1ccc
--- /dev/null
+++ b/src/testing/netjail_stop_v2.sh
@@ -0,0 +1,59 @@
+#!/bin/bash
+. "./../testing/netjail_core_v2.sh"
+. "./../testing/topo.sh"
+
+set -eu
+set -x
+
+export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
+
+filename=$1
+PREFIX=$2
+
+read_topology $filename
+
+declare -A NODES
+declare -A NODE_LINKS
+
+netjail_bridge_name
+NETWORK_NET=$RESULT
+
+for X in $(seq $KNOWN); do
+    netjail_node_name
+       KNOWN_NODES[$X]=$RESULT
+    netjail_node_link_bridge_name
+    KNOWN_LINKS[$X]=$RESULT
+    netjail_node_unlink_bridge ${KNOWN_LINKS[$X]}
+       netjail_node_clear ${KNOWN_NODES[$X]}
+done
+
+for N in $(seq $GLOBAL_N); do
+    netjail_node_name
+       ROUTERS[$N]=$RESULT
+    netjail_node_link_bridge_name
+    NETWORK_LINKS[$N]=$RESULT
+    netjail_bridge_name
+    ROUTER_NETS[$N]=$RESULT
+    netjail_node_link_bridge_name
+    ROUTER_LINKS[$N]=$RESULT
+
+    netjail_node_unlink_bridge ${ROUTER_LINKS[$N]}
+    
+       for M in $(seq $LOCAL_M); do
+        netjail_node_name
+               NODES[$N,$M]=$RESULT
+        netjail_node_link_bridge_name
+        NODE_LINKS[$N,$M]=$RESULT
+               netjail_node_unlink_bridge ${NODE_LINKS[$N,$M]}
+               netjail_node_clear ${NODES[$N,$M]}
+       done
+
+       
+       netjail_bridge_clear ${ROUTER_NETS[$N]}
+       netjail_node_unlink_bridge ${NETWORK_LINKS[$N]}
+       netjail_node_clear ${ROUTERS[$N]}
+done
+
+netjail_bridge_clear $NETWORK_NET
+
+echo "Done"
diff --git a/src/testing/test_testing_api_cmd_netjail.c 
b/src/testing/test_testing_api_cmd_netjail.c
index 543642109..aeddfb7c9 100644
--- a/src/testing/test_testing_api_cmd_netjail.c
+++ b/src/testing/test_testing_api_cmd_netjail.c
@@ -28,6 +28,13 @@
 #include "gnunet_util_lib.h"
 
 
+/**
+  * Return value of the test.
+  *
+  */
+static unsigned int rv = 0;
+
+
 /**
  * Main function to run the test cases.
  *
@@ -44,7 +51,8 @@ run (void *cls)
     GNUNET_TESTING_cmd_netjail_start_testing_system ("netjail-start-testbed-1",
                                                      "2",
                                                      "2",
-                                                     
"libgnunet_plugin_testcmd"),
+                                                     
"libgnunet_plugin_testcmd",
+                                                     &rv),
     GNUNET_TESTING_cmd_stop_testing_system ("stop-testbed",
                                             "netjail-start-testbed-1",
                                             "2",
diff --git a/src/testing/testing.c b/src/testing/testing.c
index 991c11a6c..fcde39901 100644
--- a/src/testing/testing.c
+++ b/src/testing/testing.c
@@ -33,6 +33,7 @@
 #include "gnunet_util_lib.h"
 #include "gnunet_arm_service.h"
 #include "gnunet_testing_lib.h"
+#include "gnunet_testing_ng_lib.h"
 
 #define LOG(kind, ...) GNUNET_log_from (kind, "testing-api", __VA_ARGS__)
 
@@ -1308,7 +1309,7 @@ GNUNET_TESTING_peer_configure (struct 
GNUNET_TESTING_System *system,
   peer->nports = nports;
   return peer;
 
-err_ret:
+  err_ret:
   GNUNET_free (ss_instances);
   GNUNET_free (ports);
   GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%s", emsg_);
@@ -1773,4 +1774,382 @@ GNUNET_TESTING_get_testname_from_underscore (const char 
*argv0)
 }
 
 
+static unsigned int
+get_first_value (char *line)
+{
+  char *copy;
+  size_t slen;
+  char *token;
+  unsigned int ret;
+  char *rest = NULL;
+
+  slen = strlen (line) + 1;
+  copy = malloc (slen);
+  memcpy (copy, line, slen);
+  token = strtok_r (copy, ":", &rest);
+  token = strtok_r (NULL, ":", &rest);
+  sscanf (token, "%u", &ret);
+  free (copy);
+  return ret;
+}
+
+
+static char *
+get_key (char *line)
+{
+  char *copy;
+  size_t slen;
+  char *token;
+  char *ret;
+  char *rest = NULL;
+
+  slen = strlen (line) + 1;
+  copy = malloc (slen);
+  memcpy (copy, line, slen);
+  token = strtok_r (copy, ":", &rest);
+  ret = malloc (2);
+  memcpy (ret, token, 2);
+  free (copy);
+  return ret;
+}
+
+
+static char *
+get_first_string_value (char *line)
+{
+  char *copy;
+  size_t slen, slen_token;
+  char *token;
+  char *ret;
+  char *rest = NULL;
+
+  slen = strlen (line) + 1;
+  copy = malloc (slen);
+  memcpy (copy, line, slen);
+  token = strtok_r (copy, ":", &rest);
+  token = strtok_r (NULL, ":", &rest);
+  LOG (GNUNET_ERROR_TYPE_DEBUG,
+       "first token %s\n",
+       token);
+  slen_token = strlen (token);
+  ret = malloc (slen_token + 1);
+  memcpy (ret, token, slen_token + 1);
+  free (copy);
+  return ret;
+}
+
+
+static unsigned int
+get_second_value (char *line)
+{
+  char *copy;
+  size_t slen;
+  char *token;
+  unsigned int ret;
+  char *rest = NULL;
+
+  slen = strlen (line) + 1;
+  copy = malloc (slen);
+  memcpy (copy, line, slen);
+  token = strtok_r (copy, ":", &rest);
+  token = strtok_r (NULL, ":", &rest);
+  token = strtok_r (NULL, ":", &rest);
+  sscanf (token, "%u", &ret);
+  free (copy);
+  return ret;
+}
+
+
+static char *
+get_value (char *key, char *line)
+{
+  char *copy;
+  size_t slen, slen_token;
+  char *token;
+  char *token2;
+  char *temp;
+  char *rest = NULL;
+  char *ret;
+
+  slen = strlen (line) + 1;
+  copy = malloc (slen);
+  memcpy (copy, line, slen);
+  temp = strstr (copy, key);
+  if (NULL == temp)
+    return NULL;
+  token = strtok_r (temp, ":", &rest);
+  token = strtok_r (NULL, ":", &rest);
+  token2 = strtok_r (token, "}", &rest);
+  slen_token = strlen (token2);
+  ret = malloc (slen_token + 1);
+  memcpy (ret, token2, slen_token + 1);
+  free (copy);
+  return ret;
+}
+
+
+/**
+ * Getting the topology from file.
+ *
+ * @param filename The name of the topology file.
+ * @return The GNUNET_TESTING_NetjailTopology
+ */
+struct GNUNET_TESTING_NetjailTopology *
+GNUNET_TESTING_get_topo_from_file (const char *filename)
+{
+  uint64_t fs;
+  char *data;
+  char *token;
+  char *key;
+  unsigned int out;
+  char *rest = NULL;
+  char *value;
+  int ret;
+  struct GNUNET_TESTING_NetjailTopology *topo = GNUNET_new (struct
+                                                            
GNUNET_TESTING_NetjailTopology);
+  struct GNUNET_TESTING_NetjailNode *node;
+  struct GNUNET_TESTING_NetjailRouter *router;
+  struct GNUNET_TESTING_NetjailNamespace *namespace;
+  struct GNUNET_ShortHashCode *hkey;
+  struct GNUNET_HashCode hc;
+  topo->map_namespaces =
+    GNUNET_CONTAINER_multishortmap_create (1,GNUNET_NO);
+  topo->map_globals =
+    GNUNET_CONTAINER_multishortmap_create (1,GNUNET_NO);
+
+  if (GNUNET_YES != GNUNET_DISK_file_test (filename))
+  {
+    LOG (GNUNET_ERROR_TYPE_ERROR,
+         _ ("Topology file %s not found\n"),
+         filename);
+    return NULL;
+  }
+  if (GNUNET_OK !=
+      GNUNET_DISK_file_size (filename, &fs, GNUNET_YES, GNUNET_YES))
+  {
+    LOG (GNUNET_ERROR_TYPE_ERROR,
+         _ ("Topology file %s has no data\n"),
+         filename);
+    return NULL;
+  }
+  data = GNUNET_malloc (fs);
+  if (fs != GNUNET_DISK_fn_read (filename, data, fs))
+  {
+    LOG (GNUNET_ERROR_TYPE_ERROR,
+         _ ("Topology file %s cannot be read\n"),
+         filename);
+    GNUNET_free (data);
+    return NULL;
+  }
+
+  LOG (GNUNET_ERROR_TYPE_DEBUG,
+       "data: %s\n",
+       data);
+
+  token = strtok_r (data, "\n", &rest);
+
+  while (NULL != token)
+  {
+    key = get_key (token);
+    LOG (GNUNET_ERROR_TYPE_DEBUG,
+         "In the loop with token: %s beginning with %s\n",
+         token,
+         key);
+    if (0 == strcmp (key, "M"))
+    {
+      LOG (GNUNET_ERROR_TYPE_DEBUG,
+           "Get first Value for M.\n");
+      out = get_first_value (token);
+      LOG (GNUNET_ERROR_TYPE_DEBUG,
+           "M: %u\n",
+           out);
+      topo->nodes_m = out;
+    }
+    else if (0 == strcmp (key, "N"))
+    {
+      LOG (GNUNET_ERROR_TYPE_DEBUG,
+           "Get first Value for N.\n");
+      out = get_first_value (token);
+      LOG (GNUNET_ERROR_TYPE_DEBUG,
+           "N: %u\n",
+           out);
+      topo->namespaces_n = out;
+    }
+    else if (0 == strcmp (key, "X"))
+    {
+      LOG (GNUNET_ERROR_TYPE_DEBUG,
+           "Get first Value for X.\n");
+      out = get_first_value (token);
+      LOG (GNUNET_ERROR_TYPE_DEBUG,
+           "X: %u\n",
+           out);
+      topo->nodes_x = out;
+    }
+    else if (0 == strcmp (key, "T"))
+    {
+      LOG (GNUNET_ERROR_TYPE_DEBUG,
+           "Get first string value for T.\n");
+      value = get_first_string_value (token);
+      LOG (GNUNET_ERROR_TYPE_DEBUG,
+           "value: %s\n",
+           value);
+      topo->plugin = value;
+    }
+    else if (0 == strcmp (key, "K"))
+    {
+      hkey = GNUNET_new (struct GNUNET_ShortHashCode);
+      node = GNUNET_new (struct GNUNET_TESTING_NetjailNode);
+
+      LOG (GNUNET_ERROR_TYPE_DEBUG,
+           "Get first Value for K.\n");
+      out = get_first_value (token);
+      LOG (GNUNET_ERROR_TYPE_DEBUG,
+           "K: %u\n",
+           out);
+      node->node_n = out;
+      GNUNET_CRYPTO_hash (&out, sizeof(out), &hc);
+      memcpy (hkey,
+              &hc,
+              sizeof (*hkey));
+      node->is_global = GNUNET_YES;
+      LOG (GNUNET_ERROR_TYPE_DEBUG,
+           "Get value for key value on K.\n");
+      value = get_value ("plugin", token);
+      LOG (GNUNET_ERROR_TYPE_DEBUG,
+           "value: %s\n",
+           value);
+      if (0 == GNUNET_CONTAINER_multishortmap_contains (topo->map_globals,
+                                                        hkey))
+        GNUNET_break (0);
+      else
+        GNUNET_CONTAINER_multishortmap_put (topo->map_globals,
+                                            hkey,
+                                            node,
+                                            
GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE);
+    }
+    else if (0 == strcmp (key, "R"))
+    {
+      hkey = GNUNET_new (struct GNUNET_ShortHashCode);
+      router = GNUNET_new (struct GNUNET_TESTING_NetjailRouter);
+      node = GNUNET_new (struct GNUNET_TESTING_NetjailNode);
+
+      LOG (GNUNET_ERROR_TYPE_DEBUG,
+           "Get first Value for R.\n");
+      out = get_first_value (token);
+      LOG (GNUNET_ERROR_TYPE_DEBUG,
+           "R: %u\n",
+           out);
+      node->node_n = out;
+      GNUNET_CRYPTO_hash (&out, sizeof(out), &hc);
+      memcpy (hkey,
+              &hc,
+              sizeof (*hkey));
+      LOG (GNUNET_ERROR_TYPE_DEBUG,
+           "Get value for key tcp_port on R.\n");
+      value = get_value ("tcp_port", token);
+      LOG (GNUNET_ERROR_TYPE_DEBUG,
+           "tcp_port: %s\n",
+           value);
+      ret = sscanf (value, "%u", &(router->tcp_port));
+
+      GNUNET_break (0 == ret || 1 < router->tcp_port);
+
+      LOG (GNUNET_ERROR_TYPE_DEBUG,
+           "Get value for key udp_port on R.\n");
+      value = get_value ("udp_port", token);
+      ret = sscanf (value, "%u", &(router->udp_port));
+      GNUNET_break (0 == ret || 1 < router->udp_port);
+      LOG (GNUNET_ERROR_TYPE_DEBUG,
+           "udp_port: %s\n",
+           value);
+
+      if (0 == GNUNET_CONTAINER_multishortmap_contains (topo->map_namespaces,
+                                                        hkey))
+      {
+        namespace = GNUNET_CONTAINER_multishortmap_get (topo->map_namespaces,
+                                                        hkey);
+      }
+      else
+      {
+        namespace = GNUNET_new (struct GNUNET_TESTING_NetjailNamespace);
+        namespace->namespace_n = out;
+        GNUNET_CONTAINER_multishortmap_put (topo->map_namespaces,
+                                            hkey,
+                                            namespace,
+                                            
GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE);
+      }
+      namespace->router = router;
+
+    }
+    else if (0 == strcmp (key, "P"))
+    {
+      hkey = GNUNET_new (struct GNUNET_ShortHashCode);
+      node = GNUNET_new (struct GNUNET_TESTING_NetjailNode);
+
+      LOG (GNUNET_ERROR_TYPE_DEBUG,
+           "Get first Value for P.\n");
+      out = get_first_value (token);
+      LOG (GNUNET_ERROR_TYPE_DEBUG,
+           "P: %u\n",
+           out);
+      GNUNET_CRYPTO_hash (&out, sizeof(out), &hc);
+      memcpy (hkey,
+              &hc,
+              sizeof (*hkey));
+
+      LOG (GNUNET_ERROR_TYPE_DEBUG,
+           "Get value for key plugin on P.\n");
+      value = get_value ("plugin", token);
+      LOG (GNUNET_ERROR_TYPE_DEBUG,
+           "plugin: %s\n",
+           value);
+      if (0 == GNUNET_CONTAINER_multishortmap_contains (topo->map_namespaces,
+                                                        hkey))
+      {
+        namespace = GNUNET_CONTAINER_multishortmap_get (topo->map_namespaces,
+                                                        hkey);
+      }
+      else
+      {
+        namespace = GNUNET_new (struct GNUNET_TESTING_NetjailNamespace);
+        namespace->namespace_n = out;
+        GNUNET_CONTAINER_multishortmap_put (topo->map_namespaces,
+                                            hkey,
+                                            namespace,
+                                            
GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE);
+      }
+      LOG (GNUNET_ERROR_TYPE_DEBUG,
+           "Get second Value for P.\n");
+      out = get_second_value (token);
+      LOG (GNUNET_ERROR_TYPE_DEBUG,
+           "P: %u\n",
+           out);
+      GNUNET_CRYPTO_hash (&out, sizeof(out), &hc);
+      memcpy (hkey,
+              &hc,
+              sizeof (*hkey));
+      if (0 == GNUNET_CONTAINER_multishortmap_contains (namespace->nodes,
+                                                        hkey))
+      {
+        GNUNET_break (0);
+      }
+      else
+      {
+        node = GNUNET_new (struct GNUNET_TESTING_NetjailNode);
+        GNUNET_CONTAINER_multishortmap_put (namespace->nodes,
+                                            hkey,
+                                            node,
+                                            
GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE);
+        node->plugin = value;
+        node->node_n = out;
+        node->namespace_n = namespace->namespace_n;
+      }
+    }
+    token = strtok_r (NULL, "\n", &rest);
+  }
+
+  return topo;
+}
+
+
 /* end of testing.c */
diff --git a/src/testing/testing_api_cmd_netjail_start_testsystem.c 
b/src/testing/testing_api_cmd_netjail_start_testsystem.c
index 0fe0541b0..531621eb5 100644
--- a/src/testing/testing_api_cmd_netjail_start_testsystem.c
+++ b/src/testing/testing_api_cmd_netjail_start_testsystem.c
@@ -277,26 +277,6 @@ GNUNET_TESTING_get_trait_helper_handles (const struct
 }
 
 
-/**
- * Offer messages received via testing cmd helper from trait
- *
- * @param cmd command to extract the message from.
- * @param pt pointer to message.
- * @return #GNUNET_OK on success.
- */
-int
-GNUNET_TESTING_get_trait_helper_messages (const struct
-                                          GNUNET_TESTING_Command *cmd,
-                                          struct HelperMessage ***
-                                          hp_messages_head)
-{
-  return cmd->traits (cmd->cls,
-                      (const void **) hp_messages_head,
-                      "hp_msgs_head",
-                      (unsigned int) 1);
-}
-
-
 /**
  * Continuation function from GNUNET_HELPER_send()
  *
diff --git a/src/testing/testing_api_cmd_netjail_start_testsystem.c 
b/src/testing/testing_api_cmd_netjail_start_testsystem_v2.c
similarity index 69%
copy from src/testing/testing_api_cmd_netjail_start_testsystem.c
copy to src/testing/testing_api_cmd_netjail_start_testsystem_v2.c
index 0fe0541b0..64ce549a4 100644
--- a/src/testing/testing_api_cmd_netjail_start_testsystem.c
+++ b/src/testing/testing_api_cmd_netjail_start_testsystem_v2.c
@@ -27,7 +27,7 @@
 #include "gnunet_testing_ng_lib.h"
 #include "testing_cmds.h"
 
-#define NETJAIL_EXEC_SCRIPT "./../testing/netjail_exec.sh"
+#define NETJAIL_EXEC_SCRIPT "./../testing/netjail_exec_v2.sh"
 
 /**
  * Struct to store messages send/received by the helper into a DLL
@@ -61,6 +61,11 @@ struct HelperMessage
  */
 struct NetJailState
 {
+  /**
+   * The complete topology infomation.
+   */
+  struct GNUNET_TESTING_NetjailTopology *topology;
+
   /**
    * Pointer to the return value of the test.
    *
@@ -91,16 +96,22 @@ struct NetJailState
   unsigned int n_helper;
 
   /**
-   * Number of nodes in a network namespace. //TODO make this a unsigned int
+   * Number of nodes in a natted subnet.
+   *
+   */
+  unsigned int local_m;
+
+  /**
+   * Number of natted subnets.
    *
    */
-  char *local_m;
+  unsigned int global_n;
 
   /**
-   * Number of network namespaces. //TODO make this a unsigned int
+   * Number of global known nodes.
    *
    */
-  char *global_n;
+  unsigned int known;
 
   /**
    * The send handle for the helper
@@ -266,9 +277,10 @@ netjail_exec_traits (void *cls,
  * @return #GNUNET_OK on success.
  */
 int
-GNUNET_TESTING_get_trait_helper_handles (const struct
-                                         GNUNET_TESTING_Command *cmd,
-                                         struct GNUNET_HELPER_Handle ***helper)
+GNUNET_TESTING_get_trait_helper_handles_v2 (const struct
+                                            GNUNET_TESTING_Command *cmd,
+                                            struct GNUNET_HELPER_Handle ***
+                                            helper)
 {
   return cmd->traits (cmd->cls,
                       (const void **) helper,
@@ -277,26 +289,6 @@ GNUNET_TESTING_get_trait_helper_handles (const struct
 }
 
 
-/**
- * Offer messages received via testing cmd helper from trait
- *
- * @param cmd command to extract the message from.
- * @param pt pointer to message.
- * @return #GNUNET_OK on success.
- */
-int
-GNUNET_TESTING_get_trait_helper_messages (const struct
-                                          GNUNET_TESTING_Command *cmd,
-                                          struct HelperMessage ***
-                                          hp_messages_head)
-{
-  return cmd->traits (cmd->cls,
-                      (const void **) hp_messages_head,
-                      "hp_msgs_head",
-                      (unsigned int) 1);
-}
-
-
 /**
  * Continuation function from GNUNET_HELPER_send()
  *
@@ -386,9 +378,7 @@ exp_cb (void *cls)
  *
  */
 static struct GNUNET_CMDS_HelperInit *
-create_helper_init_msg_ (char *m_char,
-                         char *n_char,
-                         const char *plugin_name)
+create_helper_init_msg_ (const char *plugin_name)
 {
   struct GNUNET_CMDS_HelperInit *msg;
   uint16_t plugin_name_len;
@@ -415,22 +405,49 @@ create_helper_init_msg_ (char *m_char,
 static void
 start_helper (struct NetJailState *ns, struct
               GNUNET_CONFIGURATION_Handle *config,
-              char *m_char,
-              char *n_char)
+              unsigned int m,
+              unsigned int n)
 {
   struct GNUNET_HELPER_Handle *helper;
   struct GNUNET_CMDS_HelperInit *msg;
   struct TestingSystemCount *tbc;
+  char *m_char, *n_char, *global_n_char, *local_m_char, *known_char, *node_id,
+       *plugin;
+  pid_t pid;
+  unsigned int script_num;
+  struct GNUNET_ShortHashCode *hkey;
+  struct GNUNET_HashCode hc;
+  struct GNUNET_TESTING_NetjailTopology *topology = ns->topology;
+  struct GNUNET_TESTING_NetjailNode *node;
+  struct GNUNET_TESTING_NetjailNamespace *namespace;
+
+
+  if (0 == m)
+    script_num = n - 1;
+  else
+    script_num = n - 1 + (n - 1) * ns->local_m + m + ns->known;
+  pid = getpid ();
+
+  GNUNET_asprintf (&m_char, "%u", m);
+  GNUNET_asprintf (&n_char, "%u", n);
+  GNUNET_asprintf (&local_m_char, "%u", ns->local_m);
+  GNUNET_asprintf (&global_n_char, "%u",ns->global_n);
+  GNUNET_asprintf (&known_char, "%u",ns->known);
+  GNUNET_asprintf (&node_id, "%06x-%08x\n",
+                   pid,
+                   script_num);
+
+
   char *const script_argv[] = {NETJAIL_EXEC_SCRIPT,
                                m_char,
                                n_char,
                                GNUNET_OS_get_libexec_binary_path (
                                  HELPER_CMDS_BINARY),
-                               ns->global_n,
-                               ns->local_m,
+                               global_n_char,
+                               local_m_char,
+                               node_id,
                                NULL};
-  unsigned int m = atoi (m_char);
-  unsigned int n = atoi (n_char);
+
   unsigned int helper_check = GNUNET_OS_check_helper_binary (
     NETJAIL_EXEC_SCRIPT,
     GNUNET_YES,
@@ -438,7 +455,10 @@ start_helper (struct NetJailState *ns, struct
 
   tbc = GNUNET_new (struct TestingSystemCount);
   tbc->ns = ns;
-  tbc->count = (n - 1) * atoi (ns->local_m) + m;
+  if (0 == m)
+    tbc->count = n;
+  else
+    tbc->count = (n - 1) * ns->local_m + m + ns->known;
 
   GNUNET_CONTAINER_DLL_insert (ns->tbcs_head, ns->tbcs_tail,
                                tbc);
@@ -469,9 +489,55 @@ start_helper (struct NetJailState *ns, struct
 
   helper = ns->helper[tbc->count - 1];
 
-  msg = create_helper_init_msg_ (m_char,
-                                 n_char,
-                                 ns->plugin_name);
+  hkey = GNUNET_new (struct GNUNET_ShortHashCode);
+
+  plugin = ns->plugin_name;
+
+  if (0 == m)
+  {
+
+    GNUNET_CRYPTO_hash (&n, sizeof(n), &hc);
+    memcpy (hkey,
+            &hc,
+            sizeof (*hkey));
+    if (1 == GNUNET_CONTAINER_multishortmap_contains (topology->map_globals,
+                                                      hkey))
+    {
+      node = GNUNET_CONTAINER_multishortmap_get (topology->map_globals,
+                                                 hkey);
+      plugin = node->plugin;
+    }
+
+  }
+  else
+  {
+    GNUNET_CRYPTO_hash (&m, sizeof(m), &hc);
+    memcpy (hkey,
+            &hc,
+            sizeof (*hkey));
+    if (1 == GNUNET_CONTAINER_multishortmap_contains (topology->map_namespaces,
+                                                      hkey))
+    {
+      namespace = GNUNET_CONTAINER_multishortmap_get (topology->map_namespaces,
+                                                      hkey);
+      GNUNET_CRYPTO_hash (&n, sizeof(n), &hc);
+      memcpy (hkey,
+              &hc,
+              sizeof (*hkey));
+      if (1 == GNUNET_CONTAINER_multishortmap_contains (namespace->nodes,
+                                                        hkey))
+      {
+        node = GNUNET_CONTAINER_multishortmap_get (namespace->nodes,
+                                                   hkey);
+        plugin = node->plugin;
+      }
+    }
+
+
+  }
+
+  msg = create_helper_init_msg_ (plugin);
+
   GNUNET_array_append (ns->msg, ns->n_msg, &msg->header);
 
   GNUNET_array_append (ns->shandle, ns->n_shandle, GNUNET_HELPER_send (
@@ -503,26 +569,66 @@ netjail_exec_run (void *cls,
                   const struct GNUNET_TESTING_Command *cmd,
                   struct GNUNET_TESTING_Interpreter *is)
 {
-  char str_m[12];
-  char str_n[12];
   struct NetJailState *ns = cls;
   struct GNUNET_CONFIGURATION_Handle *config =
     GNUNET_CONFIGURATION_create ();
 
-  for (int i = 1; i <= atoi (ns->global_n); i++)
+  for (int i = 1; i <= ns->known; i++)
+  {
+    start_helper (ns, config,
+                  i,
+                  0);
+  }
+
+  for (int i = 1; i <= ns->global_n; i++)
   {
-    for (int j = 1; j <= atoi (ns->local_m); j++)
+    for (int j = 1; j <= ns->local_m; j++)
     {
-      sprintf (str_n, "%d", i);
-      sprintf (str_m, "%d", j);
       start_helper (ns, config,
-                    str_m,
-                    str_n);
+                    j,
+                    i);
     }
   }
 }
 
 
+static void
+send_all_peers_started (unsigned int i, unsigned int j, struct NetJailState 
*ns)
+{
+  unsigned int total_number = ns->local_m * ns->global_n + ns->known;
+  struct GNUNET_CMDS_ALL_PEERS_STARTED *reply;
+  size_t msg_length;
+  struct GNUNET_HELPER_Handle *helper;
+  struct TestingSystemCount *tbc;
+
+  tbc = GNUNET_new (struct TestingSystemCount);
+  tbc->ns = ns;
+  // TODO This needs to be more generic. As we send more messages back and 
forth, we can not grow the arrays again and again, because this is to error 
prone.
+  if (0 == i)
+    tbc->count = j + total_number;
+  else
+    tbc->count = (i - 1) * ns->local_m + j + total_number + ns->known;
+
+  helper = ns->helper[tbc->count - 1 - total_number];
+  msg_length = sizeof(struct GNUNET_CMDS_ALL_PEERS_STARTED);
+  reply = GNUNET_new (struct GNUNET_CMDS_ALL_PEERS_STARTED);
+  reply->header.type = htons (
+    GNUNET_MESSAGE_TYPE_CMDS_HELPER_ALL_PEERS_STARTED);
+  reply->header.size = htons ((uint16_t) msg_length);
+
+  GNUNET_array_append (ns->msg, ns->n_msg, &reply->header);
+
+  struct GNUNET_HELPER_SendHandle *sh = GNUNET_HELPER_send (
+    helper,
+    &reply->header,
+    GNUNET_NO,
+    &clear_msg,
+    tbc);
+
+  GNUNET_array_append (ns->shandle, ns->n_shandle, sh);
+}
+
+
 /**
  * This function checks on three different information.
  *
@@ -539,11 +645,8 @@ netjail_start_finish (void *cls,
 {
   unsigned int ret = GNUNET_NO;
   struct NetJailState *ns = cls;
-  unsigned int total_number = atoi (ns->local_m) * atoi (ns->global_n);
-  struct GNUNET_CMDS_ALL_PEERS_STARTED *reply;
-  size_t msg_length;
-  struct GNUNET_HELPER_Handle *helper;
-  struct TestingSystemCount *tbc;
+  unsigned int total_number = ns->local_m * ns->global_n + ns->known;
+
 
   if (ns->number_of_local_test_finished == total_number)
   {
@@ -558,32 +661,16 @@ netjail_start_finish (void *cls,
 
   if (ns->number_of_peers_started == total_number)
   {
-    for (int i = 1; i <= atoi (ns->global_n); i++)
+    for (int i = 1; i <= ns->known; i++)
     {
-      for (int j = 1; j <= atoi (ns->local_m); j++)
+      send_all_peers_started (0,i, ns);
+    }
+
+    for (int i = 1; i <= ns->global_n; i++)
+    {
+      for (int j = 1; j <= ns->local_m; j++)
       {
-        tbc = GNUNET_new (struct TestingSystemCount);
-        tbc->ns = ns;
-        // TODO This needs to be more generic. As we send more messages back 
and forth, we can not grow the arrays again and again, because this is to error 
prone.
-        tbc->count = (i - 1) * atoi (ns->local_m) + j + total_number;
-
-        helper = ns->helper[tbc->count - 1 - total_number];
-        msg_length = sizeof(struct GNUNET_CMDS_ALL_PEERS_STARTED);
-        reply = GNUNET_new (struct GNUNET_CMDS_ALL_PEERS_STARTED);
-        reply->header.type = htons (
-          GNUNET_MESSAGE_TYPE_CMDS_HELPER_ALL_PEERS_STARTED);
-        reply->header.size = htons ((uint16_t) msg_length);
-
-        GNUNET_array_append (ns->msg, ns->n_msg, &reply->header);
-
-        struct GNUNET_HELPER_SendHandle *sh = GNUNET_HELPER_send (
-          helper,
-          &reply->header,
-          GNUNET_NO,
-          &clear_msg,
-          tbc);
-
-        GNUNET_array_append (ns->shandle, ns->n_shandle, sh);
+        send_all_peers_started (i,j, ns);
       }
     }
     ns->number_of_peers_started = 0;
@@ -596,26 +683,27 @@ netjail_start_finish (void *cls,
  * Create command.
  *
  * @param label Name for the command.
- * @param local_m Number of nodes in a network namespace. //TODO make this a 
unsigned int
- * @param global_n Number of network namespaces. //TODO make this a unsigned 
int
- * @param plugin_name Name of the test case plugin the helper will load.
+ * @param topology_config Configuration file for the test topology.
  * @param rv Pointer to the return value of the test.
  * @return command.
  */
 struct GNUNET_TESTING_Command
-GNUNET_TESTING_cmd_netjail_start_testing_system (const char *label,
-                                                 char *local_m,
-                                                 char *global_n,
-                                                 char *plugin_name,
-                                                 unsigned int *rv)
+GNUNET_TESTING_cmd_netjail_start_testing_system_v2 (const char *label,
+                                                    const char 
*topology_config,
+                                                    unsigned int *rv)
 {
   struct NetJailState *ns;
 
+  struct GNUNET_TESTING_NetjailTopology *topology =
+    GNUNET_TESTING_get_topo_from_file (topology_config);
+
   ns = GNUNET_new (struct NetJailState);
-  ns->local_m = local_m;
-  ns->global_n = global_n;
-  ns->plugin_name = plugin_name;
   ns->rv = rv;
+  ns->local_m = topology->nodes_m;
+  ns->global_n = topology->namespaces_n;
+  ns->known = topology->nodes_x;
+  ns->plugin_name = topology->plugin;
+  ns->topology = topology;
 
   struct GNUNET_TESTING_Command cmd = {
     .cls = ns,
diff --git a/src/testing/testing_api_cmd_netjail_start_v2.c 
b/src/testing/testing_api_cmd_netjail_start_v2.c
new file mode 100644
index 000000000..36fbb0e10
--- /dev/null
+++ b/src/testing/testing_api_cmd_netjail_start_v2.c
@@ -0,0 +1,229 @@
+/*
+      This file is part of GNUnet
+      Copyright (C) 2021 GNUnet e.V.
+
+      GNUnet is free software: you can redistribute it and/or modify it
+      under the terms of the GNU Affero General Public License as published
+      by the Free Software Foundation, either version 3 of the License,
+      or (at your option) any later version.
+
+      GNUnet is distributed in the hope that it will be useful, but
+      WITHOUT ANY WARRANTY; without even the implied warranty of
+      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+      Affero General Public License for more details.
+
+      You should have received a copy of the GNU Affero General Public License
+      along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+     SPDX-License-Identifier: AGPL3.0-or-later
+ */
+
+/**
+ * @file testing/testing_api_cmd_hello_world.c
+ * @brief Command to start the netjail script.
+ * @author t3sserakt
+ */
+#include "platform.h"
+#include "gnunet_util_lib.h"
+#include "gnunet_testing_ng_lib.h"
+
+#define NETJAIL_START_SCRIPT "./../testing/netjail_start_v2.sh"
+
+/**
+ * Struct to hold information for callbacks.
+ *
+ */
+struct NetJailState
+{
+  // Child Wait handle
+  struct GNUNET_ChildWaitHandle *cwh;
+
+  /**
+   * Configuration file for the test topology.
+   */
+  char *topology_config;
+
+  /**
+   * The process id of the start script.
+   */
+  struct GNUNET_OS_Process *start_proc;
+
+  // Flag indication if the script finished.
+  unsigned int finished;
+};
+
+
+/**
+ * The cleanup function of this cmd frees resources the cmd allocated.
+ *
+ */
+static void
+netjail_start_cleanup (void *cls,
+                       const struct GNUNET_TESTING_Command *cmd)
+{
+  struct NetJailState *ns = cls;
+
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+              "netjail_start_cleanup!\n");
+
+  if (NULL != ns->cwh)
+  {
+    GNUNET_wait_child_cancel (ns->cwh);
+    ns->cwh = NULL;
+  }
+  if (NULL != ns->start_proc)
+  {
+    GNUNET_assert (0 ==
+                   GNUNET_OS_process_kill (ns->start_proc,
+                                           SIGKILL));
+    GNUNET_assert (GNUNET_OK ==
+                   GNUNET_OS_process_wait (ns->start_proc));
+    GNUNET_OS_process_destroy (ns->start_proc);
+    ns->start_proc = NULL;
+  }
+  GNUNET_free (ns);
+}
+
+
+/**
+ * Trait function of this cmd does nothing.
+ *
+ */
+static int
+netjail_start_traits (void *cls,
+                      const void **ret,
+                      const char *trait,
+                      unsigned int index)
+{
+  return GNUNET_OK;
+}
+
+
+/**
+ * Callback which will be called if the setup script finished.
+ *
+ */
+static void
+child_completed_callback (void *cls,
+                          enum GNUNET_OS_ProcessStatusType type,
+                          long unsigned int exit_code)
+{
+  struct NetJailState *ns = cls;
+
+  if (0 == exit_code)
+  {
+    ns->finished = GNUNET_YES;
+  }
+  else
+  {
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                "Child completed with an error!\n");
+    ns->finished = GNUNET_SYSERR;
+  }
+  GNUNET_OS_process_destroy (ns->start_proc);
+  ns->start_proc = NULL;
+}
+
+
+
+/**
+* The run method starts the script which setup the network namespaces.
+*
+* @param cls closure.
+* @param cmd CMD being run.
+* @param is interpreter state.
+*/
+static void
+netjail_start_run (void *cls,
+                   const struct GNUNET_TESTING_Command *cmd,
+                   struct GNUNET_TESTING_Interpreter *is)
+{
+  struct NetJailState *ns = cls;
+  char *pid;
+  GNUNET_asprintf (&pid,
+                   "%u",
+                   getpid ());
+  char *const script_argv[] = {NETJAIL_START_SCRIPT,
+                               ns->topology_config,
+                               pid,
+                               NULL};
+  unsigned int helper_check = GNUNET_OS_check_helper_binary (
+    NETJAIL_START_SCRIPT,
+    GNUNET_YES,
+    NULL);
+
+  if (GNUNET_NO == helper_check)
+  {
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                "No SUID for %s!\n",
+                NETJAIL_START_SCRIPT);
+    GNUNET_TESTING_interpreter_fail ();
+  }
+  else if (GNUNET_NO == helper_check)
+  {
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                "%s not found!\n",
+                NETJAIL_START_SCRIPT);
+    GNUNET_TESTING_interpreter_fail ();
+  }
+
+  ns->start_proc = GNUNET_OS_start_process_vap (GNUNET_OS_INHERIT_STD_ERR,
+                                                NULL,
+                                                NULL,
+                                                NULL,
+                                                NETJAIL_START_SCRIPT,
+                                                script_argv);
+
+  ns->cwh = GNUNET_wait_child (ns->start_proc,
+                               &child_completed_callback,
+                               ns);
+  GNUNET_break (NULL != ns->cwh);
+}
+
+
+/**
+ * This function checks the flag NetJailState#finished, if this cmd finished.
+ *
+ */
+static int
+netjail_start_finish (void *cls,
+                      GNUNET_SCHEDULER_TaskCallback cont,
+                      void *cont_cls)
+{
+  struct NetJailState *ns = cls;
+
+  if (ns->finished)
+  {
+    cont (cont_cls);
+  }
+  return ns->finished;
+}
+
+/**
+ * Create command.
+ *
+ * @param label name for command.
+ * @param topology_config Configuration file for the test topology.
+ * @return command.
+ */
+struct GNUNET_TESTING_Command
+GNUNET_TESTING_cmd_netjail_start_v2 (const char *label,
+                                     char *topology_config)
+{
+  struct NetJailState *ns;
+
+  ns = GNUNET_new (struct NetJailState);
+  ns->finished = GNUNET_NO;
+  ns->topology_config = topology_config;
+
+  struct GNUNET_TESTING_Command cmd = {
+    .cls = ns,
+    .label = label,
+    .run = &netjail_start_run,
+    .finish = &netjail_start_finish,
+    .cleanup = &netjail_start_cleanup,
+    .traits = &netjail_start_traits
+  };
+
+  return cmd;
+}
diff --git a/src/testing/testing_api_cmd_netjail_stop_testsystem_v2.c 
b/src/testing/testing_api_cmd_netjail_stop_testsystem_v2.c
new file mode 100644
index 000000000..8eccc5764
--- /dev/null
+++ b/src/testing/testing_api_cmd_netjail_stop_testsystem_v2.c
@@ -0,0 +1,143 @@
+/*
+      This file is part of GNUnet
+      Copyright (C) 2021 GNUnet e.V.
+
+      GNUnet is free software: you can redistribute it and/or modify it
+      under the terms of the GNU Affero General Public License as published
+      by the Free Software Foundation, either version 3 of the License,
+      or (at your option) any later version.
+
+      GNUnet is distributed in the hope that it will be useful, but
+      WITHOUT ANY WARRANTY; without even the implied warranty of
+      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+      Affero General Public License for more details.
+
+      You should have received a copy of the GNU Affero General Public License
+      along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+     SPDX-License-Identifier: AGPL3.0-or-later
+ */
+
+/**
+ * @file testing/testing_api_cmd_hello_world.c
+ * @brief Command to start the netjail peers.
+ * @author t3sserakt
+ */
+#include "platform.h"
+#include "gnunet_testing_ng_lib.h"
+#include "testing_cmds.h"
+
+
+/**
+ * Struct to store information handed over to callbacks.
+ *
+ */
+struct StopHelperState
+{
+
+  const char *helper_start_label;
+
+  /**
+   * The process handle
+   */
+  struct GNUNET_HELPER_Handle **helper;
+
+  unsigned int local_m;
+
+  unsigned int global_n;
+};
+
+
+/**
+* Code to clean up resource this cmd used.
+*
+* @param cls closure
+* @param cmd current CMD being cleaned up.
+*/
+static void
+stop_testing_system_cleanup (void *cls,
+                             const struct GNUNET_TESTING_Command *cmd)
+{
+
+}
+
+
+/**
+ * Trait function of this cmd does nothing.
+ *
+ */
+static int
+stop_testing_system_traits (void *cls,
+                            const void **ret,
+                            const char *trait,
+                            unsigned int index)
+{
+  return GNUNET_OK;
+}
+
+
+/**
+* This function stops the helper process for each node.
+*
+* @param cls closure.
+* @param cmd CMD being run.
+* @param is interpreter state.
+*/
+static void
+stop_testing_system_run (void *cls,
+                         const struct GNUNET_TESTING_Command *cmd,
+                         struct GNUNET_TESTING_Interpreter *is)
+{
+  struct StopHelperState *shs = cls;
+  struct GNUNET_HELPER_Handle **helper;
+  const struct GNUNET_TESTING_Command *start_helper_cmd;
+
+  start_helper_cmd = GNUNET_TESTING_interpreter_lookup_command (
+    shs->helper_start_label);
+  GNUNET_TESTING_get_trait_helper_handles (start_helper_cmd,
+                                           &helper);
+
+  for (int i = 1; i <= shs->global_n; i++)
+  {
+    for (int j = 1; j <= shs->local_m; j++)
+    {
+      GNUNET_HELPER_stop (helper[(i - 1) * shs->local_m + j - 1],
+                          GNUNET_YES);
+    }
+  }
+}
+
+
+/**
+ * Create command.
+ *
+ * @param label name for command.
+ * @param helper_start_label label of the cmd to start the test system.
+ * @param topology_config Configuration file for the test topology.
+ * @return command.
+ */
+struct GNUNET_TESTING_Command
+GNUNET_TESTING_cmd_stop_testing_system_v2 (const char *label,
+                                           const char *helper_start_label,
+                                           const char *topology_config)
+{
+  struct StopHelperState *shs;
+
+  struct GNUNET_TESTING_NetjailTopology *topology =
+    GNUNET_TESTING_get_topo_from_file (topology_config);
+
+  shs = GNUNET_new (struct StopHelperState);
+  shs->helper_start_label = helper_start_label;
+  shs->local_m = topology->nodes_m;
+  shs->global_n = topology->namespaces_n;
+
+  struct GNUNET_TESTING_Command cmd = {
+    .cls = shs,
+    .label = label,
+    .run = &stop_testing_system_run,
+    .cleanup = &stop_testing_system_cleanup,
+    .traits = &stop_testing_system_traits
+  };
+
+  return cmd;
+}
diff --git a/src/testing/testing_api_cmd_netjail_stop_v2.c 
b/src/testing/testing_api_cmd_netjail_stop_v2.c
new file mode 100644
index 000000000..1d13407d7
--- /dev/null
+++ b/src/testing/testing_api_cmd_netjail_stop_v2.c
@@ -0,0 +1,225 @@
+/*
+      This file is part of GNUnet
+      Copyright (C) 2021 GNUnet e.V.
+
+      GNUnet is free software: you can redistribute it and/or modify it
+      under the terms of the GNU Affero General Public License as published
+      by the Free Software Foundation, either version 3 of the License,
+      or (at your option) any later version.
+
+      GNUnet is distributed in the hope that it will be useful, but
+      WITHOUT ANY WARRANTY; without even the implied warranty of
+      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+      Affero General Public License for more details.
+
+      You should have received a copy of the GNU Affero General Public License
+      along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+     SPDX-License-Identifier: AGPL3.0-or-later
+ */
+
+/**
+ * @file testing/testing_api_cmd_hello_world.c
+ * @brief Command to stop the netjail script.
+ * @author t3sserakt
+ */
+#include "platform.h"
+#include "gnunet_util_lib.h"
+#include "gnunet_testing_ng_lib.h"
+
+
+#define NETJAIL_STOP_SCRIPT "./../testing/netjail_stop_v2.sh"
+
+// Child Wait handle
+struct GNUNET_ChildWaitHandle *cwh;
+
+/**
+ * Struct to hold information for callbacks.
+ *
+ */
+struct NetJailState
+{
+  /**
+   * Configuration file for the test topology.
+   */
+  char *topology_config;
+
+  /**
+   * The process id of the start script.
+   */
+  struct GNUNET_OS_Process *stop_proc;
+
+  // Flag indication if the script finished.
+  unsigned int finished;
+};
+
+
+/**
+ * The cleanup function of this cmd frees resources the cmd allocated.
+ *
+ */
+static void
+netjail_stop_cleanup (void *cls,
+                      const struct GNUNET_TESTING_Command *cmd)
+{
+  struct NetJailState *ns = cls;
+
+  if (NULL != cwh)
+  {
+    GNUNET_wait_child_cancel (cwh);
+    cwh = NULL;
+  }
+  if (NULL != ns->stop_proc)
+  {
+    GNUNET_assert (0 ==
+                   GNUNET_OS_process_kill (ns->stop_proc,
+                                           SIGKILL));
+    GNUNET_assert (GNUNET_OK ==
+                   GNUNET_OS_process_wait (ns->stop_proc));
+    GNUNET_OS_process_destroy (ns->stop_proc);
+    ns->stop_proc = NULL;
+  }
+}
+
+
+/**
+ * Trait function of this cmd does nothing.
+ *
+ */
+static int
+netjail_stop_traits (void *cls,
+                     const void **ret,
+                     const char *trait,
+                     unsigned int index)
+{
+  return GNUNET_OK;
+}
+
+
+/**
+ * Callback which will be called if the setup script finished.
+ *
+ */
+static void
+child_completed_callback (void *cls,
+                          enum GNUNET_OS_ProcessStatusType type,
+                          long unsigned int exit_code)
+{
+  struct NetJailState *ns = cls;
+
+  cwh = NULL;
+  if (0 == exit_code)
+  {
+    ns->finished = GNUNET_YES;
+  }
+  else
+  {
+    ns->finished = GNUNET_SYSERR;
+  }
+  GNUNET_OS_process_destroy (ns->stop_proc);
+  ns->stop_proc = NULL;
+}
+
+
+/**
+* The run method starts the script which deletes the network namespaces.
+*
+* @param cls closure.
+* @param cmd CMD being run.
+* @param is interpreter state.
+*/
+static void
+netjail_stop_run (void *cls,
+                  const struct GNUNET_TESTING_Command *cmd,
+                  struct GNUNET_TESTING_Interpreter *is)
+{
+  struct NetJailState *ns = cls;
+  char *pid;
+  GNUNET_asprintf (&pid,
+                   "%u",
+                   getpid ());
+  char *const script_argv[] = {NETJAIL_STOP_SCRIPT,
+                               ns->topology_config,
+                               pid,
+                               NULL};
+  unsigned int helper_check = GNUNET_OS_check_helper_binary (
+    NETJAIL_STOP_SCRIPT,
+    GNUNET_YES,
+    NULL);
+
+  if (GNUNET_NO == helper_check)
+  {
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                "No SUID for %s!\n",
+                NETJAIL_STOP_SCRIPT);
+    GNUNET_TESTING_interpreter_fail ();
+  }
+  else if (GNUNET_NO == helper_check)
+  {
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                "%s not found!\n",
+                NETJAIL_STOP_SCRIPT);
+    GNUNET_TESTING_interpreter_fail ();
+  }
+
+  ns->stop_proc = GNUNET_OS_start_process_vap (GNUNET_OS_INHERIT_STD_ERR,
+                                               NULL,
+                                               NULL,
+                                               NULL,
+                                               NETJAIL_STOP_SCRIPT,
+                                               script_argv);
+
+  cwh = GNUNET_wait_child (ns->stop_proc,
+                           &child_completed_callback,
+                           ns);
+  GNUNET_break (NULL != cwh);
+
+}
+
+
+/**
+ * This function checks the flag NetJailState#finished, if this cmd finished.
+ *
+ */
+static int
+netjail_stop_finish (void *cls,
+                     GNUNET_SCHEDULER_TaskCallback cont,
+                     void *cont_cls)
+{
+  struct NetJailState *ns = cls;
+
+  if (ns->finished)
+  {
+    cont (cont_cls);
+  }
+  return ns->finished;
+}
+
+
+/**
+ * Create command.
+ *
+ * @param label name for command.
+ * @param topology_config Configuration file for the test topology.
+ * @return command.
+ */
+struct GNUNET_TESTING_Command
+GNUNET_TESTING_cmd_netjail_stop_v2 (const char *label,
+                                    char *topology_config)
+{
+  struct NetJailState *ns;
+
+  ns = GNUNET_new (struct NetJailState);
+  ns->topology_config = topology_config;
+
+  struct GNUNET_TESTING_Command cmd = {
+    .cls = ns,
+    .label = label,
+    .run = &netjail_stop_run,
+    .finish = &netjail_stop_finish,
+    .cleanup = &netjail_stop_cleanup,
+    .traits = &netjail_stop_traits
+  };
+
+  return cmd;
+}
diff --git a/src/testing/topo.sh b/src/testing/topo.sh
new file mode 100755
index 000000000..090c3053f
--- /dev/null
+++ b/src/testing/topo.sh
@@ -0,0 +1,95 @@
+#!/bin/bash
+
+declare -A K_PLUGIN
+declare -A R_TCP
+declare -A R_UDP
+declare -A P_PLUGIN
+
+extract_attributes()
+{
+    line_key=$1
+    line=$2
+    
+    if [ "$line_key" = "P" ]
+    then
+       n=$(echo $line|cut -d \| -f 1|awk -F: '{print $2}')
+       echo $n
+       m=$(echo $line|cut -d \| -f 1|awk -F: '{print $3}')
+       echo $m
+    else
+       number=$(echo $line|cut -d \| -f 1| cut -c 2-|cut -d : -f 2 )
+       echo $number
+    fi
+       
+    
+    nf=$(echo $line|awk -F: '{print NF}')
+    for ((i=2;i<=$nf;i++))
+    do
+       entry=$(echo $line |awk -v i=$i -F\| '{print $i}')
+       key=$(echo $entry|cut -d { -f 2|cut -d } -f 1|cut -d : -f 1)
+       value=$(echo $entry|cut -d { -f 2|cut -d } -f 1|cut -d : -f 2)
+       if [ "$key" = "tcp_port" ]
+       then
+           echo tcp port: $value
+           R_TCP[$number]=$value
+       elif [ "$key" = "udp_port" ]
+       then
+           echo udp port: $value
+           R_UDP[$number]=$value
+       elif [ "$key" = "plugin" ]
+       then
+           echo plugin: $value
+           echo $line_key
+           if [ "$line_key" = "P" ]
+           then
+               P_PLUGIN[$n,$m]=$value
+               echo $n $m ${P_PLUGIN[$n,$m]}
+           elif [ "$line_key" = "K" ]
+           then
+               K_PLUGIN[$number]=$value
+           fi
+       fi
+    done
+}
+
+read_topology(){
+    
+local filename=$1
+while read line; do
+# reading each line
+    echo $line
+    key=$(cut -c -1 <<< $line)
+    if [ "$key" = "M" ]
+    then
+       LOCAL_M=$(cut -d : -f 2 <<< $line)
+       echo $LOCAL_M
+    elif [ "$key" = "N" ]
+    then
+       GLOBAL_N=$(cut -d : -f 2 <<< $line)
+       echo $GLOBAL_N
+    elif [ "$key" = "X" ]
+    then
+       KNOWN=$(cut -d : -f 2 <<< $line)
+       echo $KNOWN
+    elif [ "$key" = "T" ]
+    then
+       PLUGIN=$(cut -d : -f 2 <<< $line)
+       echo $PLUGIN
+    elif [ "$key" = "K" ]
+    then
+       echo know node
+       extract_attributes $key $line
+    elif [ "$key" = "R" ]
+    then
+       echo router
+       extract_attributes $key $line
+    elif [ "$key" = "P" ]
+    then
+       echo node
+       extract_attributes $key $line
+    fi
+done < $filename
+}
+
+
+
diff --git a/src/transport/Makefile.am b/src/transport/Makefile.am
index 4ea3b58c4..8bd35b5a3 100644
--- a/src/transport/Makefile.am
+++ b/src/transport/Makefile.am
@@ -161,11 +161,13 @@ libgnunettransporttesting_la_LDFLAGS = \
 
 libgnunettransporttesting2_la_SOURCES = \
   transport_api_cmd_connecting_peers.c \
+  transport_api_cmd_connecting_peers_v2.c \
   transport_api_cmd_start_peer.c \
+  transport_api_cmd_start_peer_v2.c \
   transport_api_cmd_stop_peer.c \
   transport_api_cmd_send_simple.c \
+  transport_api_cmd_send_simple_v2.c \
   transport-testing2.c transport-testing2.h \
-  transport-testing-ng.h \
   transport-testing-cmds.h \
   transport-testing-filenames2.c \
   transport-testing-loggers2.c \
@@ -391,7 +393,8 @@ plugin_LTLIBRARIES = \
   $(HTTPS_SERVER_PLUGIN_LA) \
   $(WLAN_PLUGIN_LA) \
   $(BT_PLUGIN_LA) \
-  libgnunet_test_transport_plugin_cmd_simple_send.la
+  libgnunet_test_transport_plugin_cmd_simple_send.la \
+  libgnunet_test_transport_plugin_cmd_simple_send_v2.la
 
 libgnunet_test_transport_plugin_cmd_simple_send_la_SOURCES = \
  test_transport_plugin_cmd_simple_send.c
@@ -410,6 +413,23 @@ libgnunet_test_transport_plugin_cmd_simple_send_la_LIBADD 
= \
 libgnunet_test_transport_plugin_cmd_simple_send_la_LDFLAGS = \
   $(GN_PLUGIN_LDFLAGS)
 
+libgnunet_test_transport_plugin_cmd_simple_send_v2_la_SOURCES = \
+ test_transport_plugin_cmd_simple_send_v2.c
+libgnunet_test_transport_plugin_cmd_simple_send_v2_la_LIBADD = \
+  libgnunettransporttesting2.la \
+  libgnunettransportapplication.la \
+  libgnunettransport.la \
+  $(top_builddir)/src/testing/libgnunettesting.la \
+  $(top_builddir)/src/peerstore/libgnunetpeerstore.la \
+  $(top_builddir)/src/statistics/libgnunetstatistics.la \
+  $(top_builddir)/src/hello/libgnunethello.la \
+  $(top_builddir)/src/ats/libgnunetats.la \
+  $(top_builddir)/src/arm/libgnunetarm.la \
+  $(top_builddir)/src/util/libgnunetutil.la \
+  $(LTLIBINTL)
+libgnunet_test_transport_plugin_cmd_simple_send_v2_la_LDFLAGS = \
+  $(GN_PLUGIN_LDFLAGS)
+
 if HAVE_EXPERIMENTAL
 plugin_LTLIBRARIES += \
   libgnunet_plugin_transport_udp.la
@@ -557,6 +577,7 @@ libgnunet_plugin_transport_https_server_la_CFLAGS = \
 if HAVE_TESTING
 check_PROGRAMS = \
  test_transport_simple_send \
+ test_transport_simple_send_v2 \
  test_transport_address_switch_tcp \
  test_transport_testing_startstop \
  test_transport_testing_restart \
@@ -706,6 +727,7 @@ endif
 if HAVE_EXPERIMENTAL
 TESTS += \
   test_transport_simple_send \
+  test_transport_simple_send_v2 \
   test_transport_address_switch_udp \
   test_plugin_udp \
   test_transport_api_udp \
@@ -724,7 +746,8 @@ endif
 endif
 
 check_SCRIPTS= \
-  test_transport_simple_send.sh
+  test_transport_simple_send.sh \
+  test_transport_simple_send_v2.sh
 
 test_transport_simple_send_SOURCES = \
  test_transport_simple_send.c
@@ -736,6 +759,16 @@ test_transport_simple_send_LDADD = \
  libgnunettransport.la \
  libgnunettransporttesting.la
 
+test_transport_simple_send_v2_SOURCES = \
+ test_transport_simple_send_v2.c
+test_transport_simple_send_v2_LDADD = \
+ $(top_builddir)/src/testing/libgnunettesting.la \
+ $(top_builddir)/src/util/libgnunetutil.la \
+ $(top_builddir)/src/testbed/libgnunettestbed.la \
+ $(top_builddir)/src/hello/libgnunethello.la \
+ libgnunettransport.la \
+ libgnunettransporttesting.la
+
 test_transport_testing_startstop_SOURCES = \
  test_transport_testing_startstop.c
 test_transport_testing_startstop_LDADD = \
diff --git a/src/transport/test_transport_plugin_cmd_simple_send.c 
b/src/transport/test_transport_plugin_cmd_simple_send.c
index 4b5018b60..1dc44c945 100644
--- a/src/transport/test_transport_plugin_cmd_simple_send.c
+++ b/src/transport/test_transport_plugin_cmd_simple_send.c
@@ -144,7 +144,7 @@ start_testcase (TESTING_CMD_HELPER_write_cb write_message, 
char *router_ip,
 
   GNUNET_asprintf (&cfgname,
                    "test_transport_api2_tcp_node%s.conf",
-                   n);
+                   "1");
 
   LOG (GNUNET_ERROR_TYPE_ERROR,
        "plugin cfgname: %s\n",
@@ -154,6 +154,11 @@ start_testcase (TESTING_CMD_HELPER_write_cb write_message, 
char *router_ip,
        "node ip: %s\n",
        node_ip);
 
+  LOG (GNUNET_ERROR_TYPE_ERROR,
+       "m: %s n: %s\n",
+       m,
+       n);
+
   GNUNET_asprintf (&testdir,
                    "%s%s%s",
                    BASE_DIR,
@@ -180,6 +185,7 @@ start_testcase (TESTING_CMD_HELPER_write_cb write_message, 
char *router_ip,
                                      m,
                                      n,
                                      local_m,
+                                     node_ip,
                                      handlers,
                                      cfgname),
     GNUNET_TESTING_cmd_send_peer_ready ("send-peer-ready",
@@ -187,7 +193,10 @@ start_testcase (TESTING_CMD_HELPER_write_cb write_message, 
char *router_ip,
     GNUNET_TESTING_cmd_block_until_all_peers_started ("block",
                                                       &are_all_peers_started),
     GNUNET_TRANSPORT_cmd_connect_peers ("connect-peers",
-                                        "start-peer"),
+                                        "start-peer",
+                                        "system-create",
+                                        (atoi (n) - 1) * atoi (local_m) + atoi 
(
+                                          m)),
     GNUNET_TRANSPORT_cmd_send_simple ("send-simple",
                                       m,
                                       n,
diff --git a/src/transport/test_transport_plugin_cmd_simple_send.c 
b/src/transport/test_transport_plugin_cmd_simple_send_v2.c
similarity index 83%
copy from src/transport/test_transport_plugin_cmd_simple_send.c
copy to src/transport/test_transport_plugin_cmd_simple_send_v2.c
index 4b5018b60..ce1245296 100644
--- a/src/transport/test_transport_plugin_cmd_simple_send.c
+++ b/src/transport/test_transport_plugin_cmd_simple_send_v2.c
@@ -37,6 +37,8 @@
 
 #define BASE_DIR "testdir"
 
+#define TOPOLOGY_CONFIG "test_transport_simple_send_topo.conf"
+
 /**
  * The name for a specific test environment directory.
  *
@@ -142,9 +144,23 @@ start_testcase (TESTING_CMD_HELPER_write_cb write_message, 
char *router_ip,
                 char *local_m)
 {
 
+  unsigned int n_int, m_int, local_m_int, num;
+
+  struct GNUNET_TESTING_NetjailTopology *topology =
+    GNUNET_TESTING_get_topo_from_file (TOPOLOGY_CONFIG);
+
+  sscanf (m, "%u", &m_int);
+  sscanf (n, "%u", &n_int);
+  sscanf (local_m, "%u", &local_m_int);
+
+
+  if (0 == m_int)
+    num = n_int;
+  else
+    num = (n_int - 1) * local_m_int + m_int + topology->nodes_x;
+
   GNUNET_asprintf (&cfgname,
-                   "test_transport_api2_tcp_node%s.conf",
-                   n);
+                   "test_transport_api2_tcp_node1.conf");
 
   LOG (GNUNET_ERROR_TYPE_ERROR,
        "plugin cfgname: %s\n",
@@ -175,25 +191,23 @@ start_testcase (TESTING_CMD_HELPER_write_cb 
write_message, char *router_ip,
   struct GNUNET_TESTING_Command commands[] = {
     GNUNET_TESTING_cmd_system_create ("system-create",
                                       testdir),
-    GNUNET_TRANSPORT_cmd_start_peer ("start-peer",
-                                     "system-create",
-                                     m,
-                                     n,
-                                     local_m,
-                                     handlers,
-                                     cfgname),
+    GNUNET_TRANSPORT_cmd_start_peer_v2 ("start-peer",
+                                        "system-create",
+                                        num,
+                                        node_ip,
+                                        handlers,
+                                        cfgname),
     GNUNET_TESTING_cmd_send_peer_ready ("send-peer-ready",
                                         write_message),
     GNUNET_TESTING_cmd_block_until_all_peers_started ("block",
                                                       &are_all_peers_started),
-    GNUNET_TRANSPORT_cmd_connect_peers ("connect-peers",
-                                        "start-peer"),
-    GNUNET_TRANSPORT_cmd_send_simple ("send-simple",
-                                      m,
-                                      n,
-                                      (atoi (n) - 1) * atoi (local_m) + atoi (
-                                        m),
-                                      "start-peer"),
+    GNUNET_TRANSPORT_cmd_connect_peers_v2 ("connect-peers",
+                                           "start-peer",
+                                           "system-create",
+                                           num),
+    GNUNET_TRANSPORT_cmd_send_simple_v2 ("send-simple",
+                                         "start-peer",
+                                         num),
     GNUNET_TRANSPORT_cmd_stop_peer ("stop-peer",
                                     "start-peer"),
     GNUNET_TESTING_cmd_system_destroy ("system-destroy",
diff --git a/src/transport/test_transport_plugin_cmd_simple_send.c 
b/src/transport/test_transport_plugin_cmd_udp_backchannel_recv.c
similarity index 83%
copy from src/transport/test_transport_plugin_cmd_simple_send.c
copy to src/transport/test_transport_plugin_cmd_udp_backchannel_recv.c
index 4b5018b60..ce1245296 100644
--- a/src/transport/test_transport_plugin_cmd_simple_send.c
+++ b/src/transport/test_transport_plugin_cmd_udp_backchannel_recv.c
@@ -37,6 +37,8 @@
 
 #define BASE_DIR "testdir"
 
+#define TOPOLOGY_CONFIG "test_transport_simple_send_topo.conf"
+
 /**
  * The name for a specific test environment directory.
  *
@@ -142,9 +144,23 @@ start_testcase (TESTING_CMD_HELPER_write_cb write_message, 
char *router_ip,
                 char *local_m)
 {
 
+  unsigned int n_int, m_int, local_m_int, num;
+
+  struct GNUNET_TESTING_NetjailTopology *topology =
+    GNUNET_TESTING_get_topo_from_file (TOPOLOGY_CONFIG);
+
+  sscanf (m, "%u", &m_int);
+  sscanf (n, "%u", &n_int);
+  sscanf (local_m, "%u", &local_m_int);
+
+
+  if (0 == m_int)
+    num = n_int;
+  else
+    num = (n_int - 1) * local_m_int + m_int + topology->nodes_x;
+
   GNUNET_asprintf (&cfgname,
-                   "test_transport_api2_tcp_node%s.conf",
-                   n);
+                   "test_transport_api2_tcp_node1.conf");
 
   LOG (GNUNET_ERROR_TYPE_ERROR,
        "plugin cfgname: %s\n",
@@ -175,25 +191,23 @@ start_testcase (TESTING_CMD_HELPER_write_cb 
write_message, char *router_ip,
   struct GNUNET_TESTING_Command commands[] = {
     GNUNET_TESTING_cmd_system_create ("system-create",
                                       testdir),
-    GNUNET_TRANSPORT_cmd_start_peer ("start-peer",
-                                     "system-create",
-                                     m,
-                                     n,
-                                     local_m,
-                                     handlers,
-                                     cfgname),
+    GNUNET_TRANSPORT_cmd_start_peer_v2 ("start-peer",
+                                        "system-create",
+                                        num,
+                                        node_ip,
+                                        handlers,
+                                        cfgname),
     GNUNET_TESTING_cmd_send_peer_ready ("send-peer-ready",
                                         write_message),
     GNUNET_TESTING_cmd_block_until_all_peers_started ("block",
                                                       &are_all_peers_started),
-    GNUNET_TRANSPORT_cmd_connect_peers ("connect-peers",
-                                        "start-peer"),
-    GNUNET_TRANSPORT_cmd_send_simple ("send-simple",
-                                      m,
-                                      n,
-                                      (atoi (n) - 1) * atoi (local_m) + atoi (
-                                        m),
-                                      "start-peer"),
+    GNUNET_TRANSPORT_cmd_connect_peers_v2 ("connect-peers",
+                                           "start-peer",
+                                           "system-create",
+                                           num),
+    GNUNET_TRANSPORT_cmd_send_simple_v2 ("send-simple",
+                                         "start-peer",
+                                         num),
     GNUNET_TRANSPORT_cmd_stop_peer ("stop-peer",
                                     "start-peer"),
     GNUNET_TESTING_cmd_system_destroy ("system-destroy",
diff --git a/src/transport/test_transport_plugin_cmd_simple_send.c 
b/src/transport/test_transport_plugin_cmd_udp_backchannel_send.c
similarity index 83%
copy from src/transport/test_transport_plugin_cmd_simple_send.c
copy to src/transport/test_transport_plugin_cmd_udp_backchannel_send.c
index 4b5018b60..ce1245296 100644
--- a/src/transport/test_transport_plugin_cmd_simple_send.c
+++ b/src/transport/test_transport_plugin_cmd_udp_backchannel_send.c
@@ -37,6 +37,8 @@
 
 #define BASE_DIR "testdir"
 
+#define TOPOLOGY_CONFIG "test_transport_simple_send_topo.conf"
+
 /**
  * The name for a specific test environment directory.
  *
@@ -142,9 +144,23 @@ start_testcase (TESTING_CMD_HELPER_write_cb write_message, 
char *router_ip,
                 char *local_m)
 {
 
+  unsigned int n_int, m_int, local_m_int, num;
+
+  struct GNUNET_TESTING_NetjailTopology *topology =
+    GNUNET_TESTING_get_topo_from_file (TOPOLOGY_CONFIG);
+
+  sscanf (m, "%u", &m_int);
+  sscanf (n, "%u", &n_int);
+  sscanf (local_m, "%u", &local_m_int);
+
+
+  if (0 == m_int)
+    num = n_int;
+  else
+    num = (n_int - 1) * local_m_int + m_int + topology->nodes_x;
+
   GNUNET_asprintf (&cfgname,
-                   "test_transport_api2_tcp_node%s.conf",
-                   n);
+                   "test_transport_api2_tcp_node1.conf");
 
   LOG (GNUNET_ERROR_TYPE_ERROR,
        "plugin cfgname: %s\n",
@@ -175,25 +191,23 @@ start_testcase (TESTING_CMD_HELPER_write_cb 
write_message, char *router_ip,
   struct GNUNET_TESTING_Command commands[] = {
     GNUNET_TESTING_cmd_system_create ("system-create",
                                       testdir),
-    GNUNET_TRANSPORT_cmd_start_peer ("start-peer",
-                                     "system-create",
-                                     m,
-                                     n,
-                                     local_m,
-                                     handlers,
-                                     cfgname),
+    GNUNET_TRANSPORT_cmd_start_peer_v2 ("start-peer",
+                                        "system-create",
+                                        num,
+                                        node_ip,
+                                        handlers,
+                                        cfgname),
     GNUNET_TESTING_cmd_send_peer_ready ("send-peer-ready",
                                         write_message),
     GNUNET_TESTING_cmd_block_until_all_peers_started ("block",
                                                       &are_all_peers_started),
-    GNUNET_TRANSPORT_cmd_connect_peers ("connect-peers",
-                                        "start-peer"),
-    GNUNET_TRANSPORT_cmd_send_simple ("send-simple",
-                                      m,
-                                      n,
-                                      (atoi (n) - 1) * atoi (local_m) + atoi (
-                                        m),
-                                      "start-peer"),
+    GNUNET_TRANSPORT_cmd_connect_peers_v2 ("connect-peers",
+                                           "start-peer",
+                                           "system-create",
+                                           num),
+    GNUNET_TRANSPORT_cmd_send_simple_v2 ("send-simple",
+                                         "start-peer",
+                                         num),
     GNUNET_TRANSPORT_cmd_stop_peer ("stop-peer",
                                     "start-peer"),
     GNUNET_TESTING_cmd_system_destroy ("system-destroy",
diff --git a/src/testing/test_testing_api_cmd_netjail.c 
b/src/transport/test_transport_port_forward.c
similarity index 55%
copy from src/testing/test_testing_api_cmd_netjail.c
copy to src/transport/test_transport_port_forward.c
index 543642109..b0f0b113e 100644
--- a/src/testing/test_testing_api_cmd_netjail.c
+++ b/src/transport/test_transport_port_forward.c
@@ -19,14 +19,24 @@
  */
 
 /**
- * @file testing/test_testbed_api_cmd_netjail.c
- * @brief Test case executing a script in a network name space.
+ * @file transport/test_transport_port_forward.c
+ * @brief Test case executing a script which sends a test UDP message from a 
nated peer
+ *        to a gloabl known peer. There is a tcp port forwarding in place 
towards the
+ *        natted peer to test the backchannel functionality of the TNG service.
  * @author t3sserakt
  */
 #include "platform.h"
 #include "gnunet_testing_ng_lib.h"
 #include "gnunet_util_lib.h"
 
+#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 120)
+
+/**
+  * Return value of the test.
+  *
+  */
+static unsigned int rv = 0;
+
 
 /**
  * Main function to run the test cases.
@@ -37,27 +47,25 @@
 static void
 run (void *cls)
 {
+  const char *topology_config = "test_topology_port_forward.conf";
+
   struct GNUNET_TESTING_Command commands[] = {
-    GNUNET_TESTING_cmd_netjail_start ("netjail-start-1",
-                                      "2",
-                                      "2"),
-    GNUNET_TESTING_cmd_netjail_start_testing_system ("netjail-start-testbed-1",
-                                                     "2",
-                                                     "2",
-                                                     
"libgnunet_plugin_testcmd"),
-    GNUNET_TESTING_cmd_stop_testing_system ("stop-testbed",
-                                            "netjail-start-testbed-1",
-                                            "2",
-                                            "2"),
-    GNUNET_TESTING_cmd_netjail_stop ("netjail-stop-1",
-                                     "2",
-                                     "2"),
+    GNUNET_TESTING_cmd_netjail_start_v2 ("netjail-start",
+                                         topology_config),
+    GNUNET_TESTING_cmd_netjail_start_testing_system_v2 
("netjail-start-testbed",
+                                                        topology_config,
+                                                        &rv),
+    GNUNET_TESTING_cmd_stop_testing_system_v2 ("stop-testbed",
+                                               "netjail-start-testbed",
+                                               topology_config),
+    GNUNET_TESTING_cmd_netjail_stop_v2 ("netjail-stop",
+                                        topology_config),
     GNUNET_TESTING_cmd_end ()
   };
 
   GNUNET_TESTING_run (NULL,
                       commands,
-                      GNUNET_TIME_UNIT_FOREVER_REL);
+                      TIMEOUT);
 }
 
 
@@ -65,8 +73,6 @@ int
 main (int argc,
       char *const *argv)
 {
-  int rv = 0;
-
   GNUNET_log_setup ("test-netjail",
                     "DEBUG",
                     NULL);
diff --git a/src/testing/test_testing_api_cmd_netjail.c 
b/src/transport/test_transport_simple_send.c
similarity index 72%
copy from src/testing/test_testing_api_cmd_netjail.c
copy to src/transport/test_transport_simple_send.c
index 543642109..924990d0a 100644
--- a/src/testing/test_testing_api_cmd_netjail.c
+++ b/src/transport/test_transport_simple_send.c
@@ -19,14 +19,22 @@
  */
 
 /**
- * @file testing/test_testbed_api_cmd_netjail.c
- * @brief Test case executing a script in a network name space.
+ * @file transport/test_transport_api_cmd_simple_send.c
+ * @brief Test case executing a script which sends a test message between two 
peers.
  * @author t3sserakt
  */
 #include "platform.h"
 #include "gnunet_testing_ng_lib.h"
 #include "gnunet_util_lib.h"
 
+#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 120)
+
+/**
+  * Return value of the test.
+  *
+  */
+static unsigned int rv = 0;
+
 
 /**
  * Main function to run the test cases.
@@ -38,26 +46,27 @@ static void
 run (void *cls)
 {
   struct GNUNET_TESTING_Command commands[] = {
-    GNUNET_TESTING_cmd_netjail_start ("netjail-start-1",
+    GNUNET_TESTING_cmd_netjail_start ("netjail-start",
                                       "2",
-                                      "2"),
-    GNUNET_TESTING_cmd_netjail_start_testing_system ("netjail-start-testbed-1",
+                                      "1"),
+    GNUNET_TESTING_cmd_netjail_start_testing_system ("netjail-start-testbed",
                                                      "2",
-                                                     "2",
-                                                     
"libgnunet_plugin_testcmd"),
+                                                     "1",
+                                                     
"libgnunet_test_transport_plugin_cmd_simple_send",
+                                                     &rv),
     GNUNET_TESTING_cmd_stop_testing_system ("stop-testbed",
-                                            "netjail-start-testbed-1",
+                                            "netjail-start-testbed",
                                             "2",
-                                            "2"),
-    GNUNET_TESTING_cmd_netjail_stop ("netjail-stop-1",
+                                            "1"),
+    GNUNET_TESTING_cmd_netjail_stop ("netjail-stop",
                                      "2",
-                                     "2"),
+                                     "1"),
     GNUNET_TESTING_cmd_end ()
   };
 
   GNUNET_TESTING_run (NULL,
                       commands,
-                      GNUNET_TIME_UNIT_FOREVER_REL);
+                      TIMEOUT);
 }
 
 
@@ -65,8 +74,6 @@ int
 main (int argc,
       char *const *argv)
 {
-  int rv = 0;
-
   GNUNET_log_setup ("test-netjail",
                     "DEBUG",
                     NULL);
diff --git a/src/testing/test_testing_api_cmd_netjail.c 
b/src/transport/test_transport_simple_send_v2.c
similarity index 58%
copy from src/testing/test_testing_api_cmd_netjail.c
copy to src/transport/test_transport_simple_send_v2.c
index 543642109..aeac1bfb6 100644
--- a/src/testing/test_testing_api_cmd_netjail.c
+++ b/src/transport/test_transport_simple_send_v2.c
@@ -19,14 +19,24 @@
  */
 
 /**
- * @file testing/test_testbed_api_cmd_netjail.c
- * @brief Test case executing a script in a network name space.
+ * @file transport/test_transport_api_cmd_simple_send.c
+ * @brief Test case executing a script which sends a test message between two 
peers.
  * @author t3sserakt
  */
 #include "platform.h"
 #include "gnunet_testing_ng_lib.h"
 #include "gnunet_util_lib.h"
 
+#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 120)
+
+#define TOPOLOGY_CONFIG "test_transport_simple_send_topo.conf"
+
+/**
+  * Return value of the test.
+  *
+  */
+static unsigned int rv = 0;
+
 
 /**
  * Main function to run the test cases.
@@ -38,26 +48,22 @@ static void
 run (void *cls)
 {
   struct GNUNET_TESTING_Command commands[] = {
-    GNUNET_TESTING_cmd_netjail_start ("netjail-start-1",
-                                      "2",
-                                      "2"),
-    GNUNET_TESTING_cmd_netjail_start_testing_system ("netjail-start-testbed-1",
-                                                     "2",
-                                                     "2",
-                                                     
"libgnunet_plugin_testcmd"),
-    GNUNET_TESTING_cmd_stop_testing_system ("stop-testbed",
-                                            "netjail-start-testbed-1",
-                                            "2",
-                                            "2"),
-    GNUNET_TESTING_cmd_netjail_stop ("netjail-stop-1",
-                                     "2",
-                                     "2"),
+    GNUNET_TESTING_cmd_netjail_start_v2 ("netjail-start",
+                                         TOPOLOGY_CONFIG),
+    GNUNET_TESTING_cmd_netjail_start_testing_system_v2 
("netjail-start-testbed",
+                                                        TOPOLOGY_CONFIG,
+                                                        &rv),
+    GNUNET_TESTING_cmd_stop_testing_system_v2 ("stop-testbed",
+                                               "netjail-start-testbed",
+                                               TOPOLOGY_CONFIG),
+    GNUNET_TESTING_cmd_netjail_stop_v2 ("netjail-stop",
+                                        TOPOLOGY_CONFIG),
     GNUNET_TESTING_cmd_end ()
   };
 
   GNUNET_TESTING_run (NULL,
                       commands,
-                      GNUNET_TIME_UNIT_FOREVER_REL);
+                      TIMEOUT);
 }
 
 
@@ -65,8 +71,6 @@ int
 main (int argc,
       char *const *argv)
 {
-  int rv = 0;
-
   GNUNET_log_setup ("test-netjail",
                     "DEBUG",
                     NULL);
diff --git a/src/transport/test_transport_simple_send_v2.sh 
b/src/transport/test_transport_simple_send_v2.sh
new file mode 100755
index 000000000..8462d1849
--- /dev/null
+++ b/src/transport/test_transport_simple_send_v2.sh
@@ -0,0 +1,2 @@
+#!/bin/bash
+exec unshare -r -nmU bash -c "mount -t tmpfs --make-rshared tmpfs /run/netns; 
./test_transport_simple_send_v2"
diff --git a/src/transport/transport-testing-cmds.h 
b/src/transport/transport-testing-cmds.h
index 1461a3d4d..f9ebafade 100644
--- a/src/transport/transport-testing-cmds.h
+++ b/src/transport/transport-testing-cmds.h
@@ -28,12 +28,195 @@
 #define TRANSPORT_TESTING_CMDS_H
 #include "gnunet_testing_lib.h"
 
+
+struct StartPeerState_v2
+{
+  /**
+   * The ip of a node.
+   */
+  char *node_ip;
+
+  /**
+   * Receive callback
+   */
+  struct GNUNET_MQ_MessageHandler *handlers;
+
+  const char *cfgname;
+
+  /**
+   * Peer's configuration
+   */
+  struct GNUNET_CONFIGURATION_Handle *cfg;
+
+  struct GNUNET_TESTING_Peer *peer;
+
+  /**
+   * Peer identity
+   */
+  struct GNUNET_PeerIdentity id;
+
+  /**
+   * Peer's transport service handle
+   */
+  struct GNUNET_TRANSPORT_CoreHandle *th;
+
+  /**
+   * Application handle
+   */
+  struct GNUNET_TRANSPORT_ApplicationHandle *ah;
+
+  /**
+   * Peer's PEERSTORE Handle
+   */
+  struct GNUNET_PEERSTORE_Handle *ph;
+
+  /**
+   * Hello get task
+   */
+  struct GNUNET_SCHEDULER_Task *rh_task;
+
+  /**
+   * Peer's transport get hello handle to retrieve peer's HELLO message
+   */
+  struct GNUNET_PEERSTORE_IterateContext *pic;
+
+  /**
+   * Hello
+   */
+  char *hello;
+
+  /**
+   * Hello size
+   */
+  size_t hello_size;
+
+  char *m;
+
+  char *n;
+
+  char *local_m;
+
+  unsigned int finished;
+
+  const char *system_label;
+
+  /**
+   * An unique number to identify the peer
+   */
+  unsigned int no;
+
+  struct GNUNET_CONTAINER_MultiShortmap *connected_peers_map;
+
+  struct GNUNET_TESTING_System *tl_system;
+
+};
+
+
+struct StartPeerState
+{
+  /**
+   * The ip of a node.
+   */
+  char *node_ip;
+
+  /**
+   * Receive callback
+   */
+  struct GNUNET_MQ_MessageHandler *handlers;
+
+  const char *cfgname;
+
+  /**
+   * Peer's configuration
+   */
+  struct GNUNET_CONFIGURATION_Handle *cfg;
+
+  struct GNUNET_TESTING_Peer *peer;
+
+  /**
+   * Peer identity
+   */
+  struct GNUNET_PeerIdentity id;
+
+  /**
+   * Peer's transport service handle
+   */
+  struct GNUNET_TRANSPORT_CoreHandle *th;
+
+  /**
+   * Application handle
+   */
+  struct GNUNET_TRANSPORT_ApplicationHandle *ah;
+
+  /**
+   * Peer's PEERSTORE Handle
+   */
+  struct GNUNET_PEERSTORE_Handle *ph;
+
+  /**
+   * Hello get task
+   */
+  struct GNUNET_SCHEDULER_Task *rh_task;
+
+  /**
+   * Peer's transport get hello handle to retrieve peer's HELLO message
+   */
+  struct GNUNET_PEERSTORE_IterateContext *pic;
+
+  /**
+   * Hello
+   */
+  char *hello;
+
+  /**
+   * Hello size
+   */
+  size_t hello_size;
+
+  char *m;
+
+  char *n;
+
+  char *local_m;
+
+  unsigned int finished;
+
+  const char *system_label;
+
+  /**
+   * An unique number to identify the peer
+   */
+  unsigned int no;
+
+  struct GNUNET_CONTAINER_MultiShortmap *connected_peers_map;
+
+  struct GNUNET_TESTING_System *tl_system;
+
+};
+
+
+int
+GNUNET_TRANSPORT_get_trait_state (const struct
+                                  GNUNET_TESTING_Command
+                                  *cmd,
+                                  struct StartPeerState **sps);
+
+
+struct GNUNET_TESTING_Command
+GNUNET_TRANSPORT_cmd_start_peer_v2 (const char *label,
+                                    const char *system_label,
+                                    uint32_t no,
+                                    char *node_ip,
+                                    struct GNUNET_MQ_MessageHandler *handlers,
+                                    const char *cfgname);
+
 struct GNUNET_TESTING_Command
 GNUNET_TRANSPORT_cmd_start_peer (const char *label,
                                  const char *system_label,
                                  char *m,
                                  char *n,
                                  char *local_m,
+                                 char *node_ip,
                                  struct GNUNET_MQ_MessageHandler *handlers,
                                  const char *cfgname);
 
@@ -43,7 +226,15 @@ GNUNET_TRANSPORT_cmd_stop_peer (const char *label,
 
 struct GNUNET_TESTING_Command
 GNUNET_TRANSPORT_cmd_connect_peers (const char *label,
-                                    const char *start_peer_label);
+                                    const char *start_peer_label,
+                                    const char *create_label,
+                                    uint32_t num);
+
+struct GNUNET_TESTING_Command
+GNUNET_TRANSPORT_cmd_connect_peers_v2 (const char *label,
+                                       const char *start_peer_label,
+                                       const char *create_label,
+                                       uint32_t num);
 
 struct GNUNET_TESTING_Command
 GNUNET_TRANSPORT_cmd_send_simple (const char *label,
@@ -52,6 +243,21 @@ GNUNET_TRANSPORT_cmd_send_simple (const char *label,
                                   uint32_t num,
                                   const char *start_peer_label);
 
+/**
+ * Create command.
+ *
+ * @param label name for command.
+ * @param m The number of the local node of the actual network namespace.
+ * @param n The number of the actual namespace.
+ * @param num Number globally identifying the node.
+ * @param start_peer_label Label of the cmd to start a peer.
+ * @return command.
+ */
+struct GNUNET_TESTING_Command
+GNUNET_TRANSPORT_cmd_send_simple_v2 (const char *label,
+                                     const char *start_peer_label,
+                                     uint32_t num);
+
 int
 GNUNET_TRANSPORT_get_trait_peer_id (const struct
                                     GNUNET_TESTING_Command *cmd,
@@ -65,6 +271,16 @@ GNUNET_TRANSPORT_get_trait_connected_peers_map (const struct
                                                 GNUNET_CONTAINER_MultiShortmap 
*
                                                 *
                                                 connected_peers_map);
+
+int
+GNUNET_TRANSPORT_get_trait_connected_peers_map_v2 (const struct
+                                                   GNUNET_TESTING_Command
+                                                   *cmd,
+                                                   struct
+                                                   
GNUNET_CONTAINER_MultiShortmap
+                                                   *
+                                                   *
+                                                   connected_peers_map);
 int
 GNUNET_TRANSPORT_get_trait_hello_size (const struct
                                        GNUNET_TESTING_Command
@@ -77,5 +293,20 @@ GNUNET_TRANSPORT_get_trait_hello (const struct
                                   *cmd,
                                   char **hello);
 
+
+int
+GNUNET_TRANSPORT_get_trait_application_handle (const struct
+                                               GNUNET_TESTING_Command *cmd,
+                                               struct
+                                               
GNUNET_TRANSPORT_ApplicationHandle
+                                               **ah);
+
+int
+GNUNET_TRANSPORT_get_trait_application_handle_v2 (const struct
+                                                  GNUNET_TESTING_Command *cmd,
+                                                  struct
+                                                  
GNUNET_TRANSPORT_ApplicationHandle
+                                                  **ah);
+
 #endif
 /* end of transport_testing.h */
diff --git a/src/transport/transport-testing-ng.h 
b/src/transport/transport-testing-ng.h
deleted file mode 100644
index cd4e1f3fe..000000000
--- a/src/transport/transport-testing-ng.h
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
-      This file is part of GNUnet
-      Copyright (C) 2021 GNUnet e.V.
-
-      GNUnet is free software: you can redistribute it and/or modify it
-      under the terms of the GNU Affero General Public License as published
-      by the Free Software Foundation, either version 3 of the License,
-      or (at your option) any later version.
-
-      GNUnet is distributed in the hope that it will be useful, but
-      WITHOUT ANY WARRANTY; without even the implied warranty of
-      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-      Affero General Public License for more details.
-
-      You should have received a copy of the GNU Affero General Public License
-      along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-     SPDX-License-Identifier: AGPL3.0-or-later
- */
-
-/**
- * @author t3sserakt
- */
-
-struct StartPeerState
-{
-  /**
-   * Receive callback
-   */
-  struct GNUNET_MQ_MessageHandler *handlers;
-
-  const char *cfgname;
-
-  /**
-   * Peer's configuration
-   */
-  struct GNUNET_CONFIGURATION_Handle *cfg;
-
-  struct GNUNET_TESTING_Peer *peer;
-
-  /**
-   * Peer identity
-   */
-  struct GNUNET_PeerIdentity id;
-
-  /**
-   * Peer's transport service handle
-   */
-  struct GNUNET_TRANSPORT_CoreHandle *th;
-
-  /**
-   * Application handle
-   */
-  struct GNUNET_TRANSPORT_ApplicationHandle *ah;
-
-  /**
-   * Peer's PEERSTORE Handle
-   */
-  struct GNUNET_PEERSTORE_Handle *ph;
-
-  /**
-   * Hello get task
-   */
-  struct GNUNET_SCHEDULER_Task *rh_task;
-
-  /**
-   * Peer's transport get hello handle to retrieve peer's HELLO message
-   */
-  struct GNUNET_PEERSTORE_IterateContext *pic;
-
-  /**
-   * Hello
-   */
-  char *hello;
-
-  /**
-   * Hello size
-   */
-  size_t hello_size;
-
-  char *m;
-
-  char *n;
-
-  char *local_m;
-
-  unsigned int finished;
-
-  const char *system_label;
-
-  /**
-   * An unique number to identify the peer
-   */
-  unsigned int no;
-
-  struct GNUNET_CONTAINER_MultiShortmap *connected_peers_map;
-
-  struct GNUNET_TESTING_System *tl_system;
-
-};
-
-
-int
-GNUNET_TRANSPORT_get_trait_state (const struct
-                                  GNUNET_TESTING_Command
-                                  *cmd,
-                                  struct StartPeerState **sps);
diff --git a/src/transport/transport_api_cmd_connecting_peers.c 
b/src/transport/transport_api_cmd_connecting_peers.c
index 34b3d5925..09ca9e54c 100644
--- a/src/transport/transport_api_cmd_connecting_peers.c
+++ b/src/transport/transport_api_cmd_connecting_peers.c
@@ -42,6 +42,15 @@
  */
 struct ConnectPeersState
 {
+  // Label of the cmd which started the test system.
+  const char *create_label;
+
+  /**
+   * Number globally identifying the node.
+   *
+   */
+  uint32_t num;
+
   /**
    * Label of the cmd to start a peer.
    *
@@ -66,6 +75,13 @@ connect_peers_run (void *cls,
                    struct GNUNET_TESTING_Interpreter *is)
 {
   struct ConnectPeersState *cps = cls;
+  const struct GNUNET_TESTING_Command *system_cmd;
+  struct GNUNET_TESTING_System *tl_system;
+  struct GNUNET_CRYPTO_EddsaPrivateKey *priv_key = GNUNET_new (struct
+                                                               
GNUNET_CRYPTO_EddsaPrivateKey);
+  struct GNUNET_CRYPTO_EddsaPublicKey *pub_key = GNUNET_new (struct
+                                                             
GNUNET_CRYPTO_EddsaPublicKey);
+  ;
   const struct GNUNET_TESTING_Command *peer1_cmd;
   // const struct GNUNET_TESTING_Command *peer2_cmd;
   struct GNUNET_TRANSPORT_ApplicationHandle *ah;
@@ -77,6 +93,8 @@ connect_peers_run (void *cls,
   enum GNUNET_NetworkType nt = 0;
   char *peer_id;
   struct GNUNET_PeerIdentity *id;
+  struct GNUNET_PeerIdentity *other = GNUNET_new (struct GNUNET_PeerIdentity);
+  uint32_t num;
 
   peer1_cmd = GNUNET_TESTING_interpreter_lookup_command 
(cps->start_peer_label);
   GNUNET_TRANSPORT_get_trait_application_handle (peer1_cmd,
@@ -88,9 +106,22 @@ connect_peers_run (void *cls,
   GNUNET_TRANSPORT_get_trait_peer_id (peer1_cmd,
                                       &id);
 
-  if (strstr (hello, "60002") != NULL)
+  system_cmd = GNUNET_TESTING_interpreter_lookup_command (cps->create_label);
+  GNUNET_TESTING_get_trait_test_system (system_cmd,
+                                        &tl_system);
+
+  if (2 == cps->num)
+    num = 1;
+  else
+    num = 2;
+
+
+
+
+  // if (strstr (hello, "60002") != NULL)
+  if (2 == num)
   {
-    addr = "tcp-192.168.15.2:60003";
+    addr = "tcp-192.168.15.2:60002";
     peer_id = "F2F3X9G1YNCTXKK7A4J6M4ZM4BBSKC9DEXZVHCWQ475M0C7PNWCG";
   }
   else
@@ -99,10 +130,25 @@ connect_peers_run (void *cls,
     peer_id = "4TTC9WBSVP9RJT6DVEZ7E0TDW7TQXC11NR1EMR2F8ARS87WZ2730";
   }
 
+  priv_key = GNUNET_TESTING_hostkey_get (tl_system,
+                                         num,
+                                         other);
+
+  GNUNET_CRYPTO_eddsa_key_get_public (priv_key,
+                                      pub_key);
+
   GNUNET_CRYPTO_eddsa_public_key_from_string (peer_id,
                                               strlen (peer_id),
                                               &peer->public_key);
 
+  peer->public_key = *pub_key;
+
+  LOG (GNUNET_ERROR_TYPE_ERROR,
+       "\nnum: %u\n peer_id: %s\n pub_key %s\n",
+       num,
+       peer_id,
+       GNUNET_CRYPTO_eddsa_public_key_to_string (pub_key));
+
   cps->id = peer;
 
   // TODO This does not work, because the other peer is running in another 
local loop. We need to message between different local loops. For now we will 
create the hello manually with the known information about the other local 
peers.
@@ -210,12 +256,16 @@ connect_peers_cleanup (void *cls,
  */
 struct GNUNET_TESTING_Command
 GNUNET_TRANSPORT_cmd_connect_peers (const char *label,
-                                    const char *start_peer_label)
+                                    const char *start_peer_label,
+                                    const char *create_label,
+                                    uint32_t num)
 {
   struct ConnectPeersState *cps;
 
   cps = GNUNET_new (struct ConnectPeersState);
   cps->start_peer_label = start_peer_label;
+  cps->num = num;
+  cps->create_label = create_label;
 
 
   struct GNUNET_TESTING_Command cmd = {
diff --git a/src/transport/transport_api_cmd_connecting_peers.c 
b/src/transport/transport_api_cmd_connecting_peers_v2.c
similarity index 68%
copy from src/transport/transport_api_cmd_connecting_peers.c
copy to src/transport/transport_api_cmd_connecting_peers_v2.c
index 34b3d5925..0d286b714 100644
--- a/src/transport/transport_api_cmd_connecting_peers.c
+++ b/src/transport/transport_api_cmd_connecting_peers_v2.c
@@ -36,12 +36,23 @@
  */
 #define LOG(kind, ...) GNUNET_log (kind, __VA_ARGS__)
 
+#define CONNECT_ADDRESS_TEMPLATE "tcp-192.168.15.%u:60002"
+
 /**
  * Struct to store information needed in callbacks.
  *
  */
 struct ConnectPeersState
 {
+  // Label of the cmd which started the test system.
+  const char *create_label;
+
+  /**
+   * Number globally identifying the node.
+   *
+   */
+  uint32_t num;
+
   /**
    * Label of the cmd to start a peer.
    *
@@ -66,63 +77,59 @@ connect_peers_run (void *cls,
                    struct GNUNET_TESTING_Interpreter *is)
 {
   struct ConnectPeersState *cps = cls;
+  const struct GNUNET_TESTING_Command *system_cmd;
+  struct GNUNET_TESTING_System *tl_system;
+  struct GNUNET_CRYPTO_EddsaPrivateKey *priv_key = GNUNET_new (struct
+                                                               
GNUNET_CRYPTO_EddsaPrivateKey);
+  struct GNUNET_CRYPTO_EddsaPublicKey *pub_key = GNUNET_new (struct
+                                                             
GNUNET_CRYPTO_EddsaPublicKey);
   const struct GNUNET_TESTING_Command *peer1_cmd;
-  // const struct GNUNET_TESTING_Command *peer2_cmd;
   struct GNUNET_TRANSPORT_ApplicationHandle *ah;
   struct GNUNET_PeerIdentity *peer = GNUNET_new (struct GNUNET_PeerIdentity);
   char *addr;
-  // struct GNUNET_TIME_Absolute t;
-  char *hello;
-  // size_t *hello_size;
   enum GNUNET_NetworkType nt = 0;
-  char *peer_id;
-  struct GNUNET_PeerIdentity *id;
+  struct GNUNET_PeerIdentity *other = GNUNET_new (struct GNUNET_PeerIdentity);
+  uint32_t num;
 
   peer1_cmd = GNUNET_TESTING_interpreter_lookup_command 
(cps->start_peer_label);
-  GNUNET_TRANSPORT_get_trait_application_handle (peer1_cmd,
-                                                 &ah);
-
-  GNUNET_TRANSPORT_get_trait_hello (peer1_cmd,
-                                    &hello);
+  GNUNET_TRANSPORT_get_trait_application_handle_v2 (peer1_cmd,
+                                                    &ah);
 
-  GNUNET_TRANSPORT_get_trait_peer_id (peer1_cmd,
-                                      &id);
+  system_cmd = GNUNET_TESTING_interpreter_lookup_command (cps->create_label);
+  GNUNET_TESTING_get_trait_test_system (system_cmd,
+                                        &tl_system);
 
-  if (strstr (hello, "60002") != NULL)
+  if (1 == cps->num)
   {
-    addr = "tcp-192.168.15.2:60003";
-    peer_id = "F2F3X9G1YNCTXKK7A4J6M4ZM4BBSKC9DEXZVHCWQ475M0C7PNWCG";
+    num = 2;
+    // addr = "tcp-192.168.15.2:60002";
   }
   else
   {
-    addr = "tcp-192.168.15.1:60002";
-    peer_id = "4TTC9WBSVP9RJT6DVEZ7E0TDW7TQXC11NR1EMR2F8ARS87WZ2730";
+    num = 1;
+    // addr = "tcp-192.168.15.1:60002";
   }
 
-  GNUNET_CRYPTO_eddsa_public_key_from_string (peer_id,
-                                              strlen (peer_id),
-                                              &peer->public_key);
+  GNUNET_asprintf (&addr,
+                   CONNECT_ADDRESS_TEMPLATE,
+                   num);
 
-  cps->id = peer;
+  priv_key = GNUNET_TESTING_hostkey_get (tl_system,
+                                         num,
+                                         other);
 
-  // TODO This does not work, because the other peer is running in another 
local loop. We need to message between different local loops. For now we will 
create the hello manually with the known information about the other local 
peers.
-  // ---------------------------------------------
-  /*peer2_cmd = GNUNET_TESTING_interpreter_lookup_command (cps->peer2_label);
-  GNUNET_TRANSPORT_get_trait_peer_id (peer2_cmd,
-                                    &id);
-  GNUNET_TRANSPORT_get_trait_hello (peer2_cmd,
-                                  &hello);
-  GNUNET_TRANSPORT_get_trait_hello_size (peer2_cmd,
-                                       &hello_size);
+  GNUNET_CRYPTO_eddsa_key_get_public (priv_key,
+                                      pub_key);
 
-  addr = GNUNET_HELLO_extract_address (hello,
-                                       *hello_size,
-                                       id,
-                                       &nt,
-                                       &t);*/
 
-  // ----------------------------------------------
+  peer->public_key = *pub_key;
 
+  LOG (GNUNET_ERROR_TYPE_ERROR,
+       "num: %u pub_key %s\n",
+       num,
+       GNUNET_CRYPTO_eddsa_public_key_to_string (pub_key));
+
+  cps->id = peer;
 
   GNUNET_TRANSPORT_application_validate (ah,
                                          peer,
@@ -149,8 +156,8 @@ connect_peers_finish (void *cls,
   int node_number;
 
   peer1_cmd = GNUNET_TESTING_interpreter_lookup_command 
(cps->start_peer_label);
-  GNUNET_TRANSPORT_get_trait_connected_peers_map (peer1_cmd,
-                                                  &connected_peers_map);
+  GNUNET_TRANSPORT_get_trait_connected_peers_map_v2 (peer1_cmd,
+                                                     &connected_peers_map);
 
   node_number = 1;
   GNUNET_CRYPTO_hash (&node_number, sizeof(node_number), &hc);
@@ -209,13 +216,17 @@ connect_peers_cleanup (void *cls,
  * @return command.
  */
 struct GNUNET_TESTING_Command
-GNUNET_TRANSPORT_cmd_connect_peers (const char *label,
-                                    const char *start_peer_label)
+GNUNET_TRANSPORT_cmd_connect_peers_v2 (const char *label,
+                                       const char *start_peer_label,
+                                       const char *create_label,
+                                       uint32_t num)
 {
   struct ConnectPeersState *cps;
 
   cps = GNUNET_new (struct ConnectPeersState);
   cps->start_peer_label = start_peer_label;
+  cps->num = num;
+  cps->create_label = create_label;
 
 
   struct GNUNET_TESTING_Command cmd = {
diff --git a/src/transport/transport_api_cmd_send_simple_v2.c 
b/src/transport/transport_api_cmd_send_simple_v2.c
new file mode 100644
index 000000000..d43c0b425
--- /dev/null
+++ b/src/transport/transport_api_cmd_send_simple_v2.c
@@ -0,0 +1,156 @@
+/*
+      This file is part of GNUnet
+      Copyright (C) 2021 GNUnet e.V.
+
+      GNUnet is free software: you can redistribute it and/or modify it
+      under the terms of the GNU Affero General Public License as published
+      by the Free Software Foundation, either version 3 of the License,
+      or (at your option) any later version.
+
+      GNUnet is distributed in the hope that it will be useful, but
+      WITHOUT ANY WARRANTY; without even the implied warranty of
+      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+      Affero General Public License for more details.
+
+      You should have received a copy of the GNU Affero General Public License
+      along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+     SPDX-License-Identifier: AGPL3.0-or-later
+ */
+
+/**
+ * @file testing_api_cmd_start_peer.c
+ * @brief cmd to start a peer.
+ * @author t3sserakt
+ */
+#include "platform.h"
+#include "gnunet_util_lib.h"
+#include "gnunet_testing_ng_lib.h"
+#include "transport-testing2.h"
+#include "transport-testing-cmds.h"
+
+/**
+ * Struct to hold information for callbacks.
+ *
+ */
+struct SendSimpleState
+{
+  /**
+   * Number globally identifying the node.
+   *
+   */
+  uint32_t num;
+
+  /**
+   * Label of the cmd to start a peer.
+   *
+   */
+  const char *start_peer_label;
+};
+
+
+/**
+ * Trait function of this cmd does nothing.
+ *
+ */
+static int
+send_simple_traits (void *cls,
+                    const void **ret,
+                    const char *trait,
+                    unsigned int index)
+{
+  return GNUNET_OK;
+}
+
+
+/**
+ * The cleanup function of this cmd frees resources the cmd allocated.
+ *
+ */
+static void
+send_simple_cleanup (void *cls,
+                     const struct GNUNET_TESTING_Command *cmd)
+{
+  struct SendSimpleState *sss = cls;
+
+  GNUNET_free (sss);
+}
+
+
+/**
+ * The run method of this cmd will send a simple message to the connected peer.
+ *
+ */
+static void
+send_simple_run (void *cls,
+                 const struct GNUNET_TESTING_Command *cmd,
+                 struct GNUNET_TESTING_Interpreter *is)
+{
+  struct SendSimpleState *sss = cls;
+  struct GNUNET_MQ_Envelope *env;
+  struct GNUNET_TRANSPORT_TESTING_TestMessage *test;
+  struct GNUNET_MQ_Handle *mq;
+  struct GNUNET_CONTAINER_MultiShortmap *connected_peers_map;
+  const struct GNUNET_TESTING_Command *peer1_cmd;
+  struct GNUNET_ShortHashCode *key = GNUNET_new (struct GNUNET_ShortHashCode);
+  struct GNUNET_HashCode hc;
+  int node_number;
+
+  peer1_cmd = GNUNET_TESTING_interpreter_lookup_command 
(sss->start_peer_label);
+  GNUNET_TRANSPORT_get_trait_connected_peers_map (peer1_cmd,
+                                                  &connected_peers_map);
+
+  node_number = 1;
+  GNUNET_CRYPTO_hash (&node_number, sizeof(node_number), &hc);
+  memcpy (key,
+          &hc,
+          sizeof (*key));
+
+  mq = GNUNET_CONTAINER_multishortmap_get (connected_peers_map,
+                                           key);
+
+  env = GNUNET_MQ_msg_extra (test,
+                             2600 - sizeof(*test),
+                             GNUNET_TRANSPORT_TESTING_SIMPLE_MTYPE);
+  test->num = htonl (sss->num);
+  memset (&test[1],
+          sss->num,
+          2600 - sizeof(*test));
+  GNUNET_MQ_send (mq,
+                  env);
+  GNUNET_free (key);
+
+}
+
+
+/**
+ * Create command.
+ *
+ * @param label name for command.
+ * @param m The number of the local node of the actual network namespace.
+ * @param n The number of the actual namespace.
+ * @param num Number globally identifying the node.
+ * @param start_peer_label Label of the cmd to start a peer.
+ * @return command.
+ */
+struct GNUNET_TESTING_Command
+GNUNET_TRANSPORT_cmd_send_simple_v2 (const char *label,
+                                     const char *start_peer_label,
+                                     uint32_t num)
+{
+  struct SendSimpleState *sss;
+
+  sss = GNUNET_new (struct SendSimpleState);
+  sss->num = num;
+  sss->start_peer_label = start_peer_label;
+
+  struct GNUNET_TESTING_Command cmd = {
+    .cls = sss,
+    .label = label,
+    .run = &send_simple_run,
+    .cleanup = &send_simple_cleanup,
+    .traits = &send_simple_traits
+  };
+
+  return cmd;
+}
diff --git a/src/transport/transport_api_cmd_start_peer.c 
b/src/transport/transport_api_cmd_start_peer.c
index 729d981c0..f4e92944b 100644
--- a/src/transport/transport_api_cmd_start_peer.c
+++ b/src/transport/transport_api_cmd_start_peer.c
@@ -29,7 +29,7 @@
 #include "gnunet_peerstore_service.h"
 #include "gnunet_transport_core_service.h"
 #include "gnunet_transport_application_service.h"
-#include "transport-testing-ng.h"
+#include "transport-testing-cmds.h"
 
 /**
  * Generic logging shortcut
@@ -185,6 +185,10 @@ start_peer_run (void *cls,
   struct GNUNET_PeerIdentity dummy;
   const struct GNUNET_TESTING_Command *system_cmd;
   struct GNUNET_TESTING_System *tl_system;
+  char *home;
+  char *transport_unix_path;
+  char *communicator_unix_path;
+  char *bindto;
 
   if (GNUNET_NO == GNUNET_DISK_file_test (sps->cfgname))
   {
@@ -200,6 +204,34 @@ start_peer_run (void *cls,
   GNUNET_assert (GNUNET_OK ==
                  GNUNET_CONFIGURATION_load (sps->cfg, sps->cfgname));
 
+  GNUNET_asprintf (&home,
+                   "$GNUNET_TMP/test-transport/api-tcp-p%u",
+                   sps->no);
+
+  GNUNET_asprintf (&transport_unix_path,
+                   "$GNUNET_RUNTIME_DIR/tng-p%u.sock",
+                   sps->no);
+
+  GNUNET_asprintf (&communicator_unix_path,
+                   "$GNUNET_RUNTIME_DIR/tcp-comm-p%u.sock",
+                   sps->no);
+
+  GNUNET_asprintf (&bindto,
+                   "%s:60002",
+                   sps->node_ip);
+
+
+  GNUNET_CONFIGURATION_set_value_string (sps->cfg, "PATHS", "GNUNET_TEST_HOME",
+                                         home);
+  GNUNET_CONFIGURATION_set_value_string (sps->cfg, "transport", "UNIXPATH",
+                                         transport_unix_path);
+  GNUNET_CONFIGURATION_set_value_string (sps->cfg, "communicator-tcp",
+                                         "BINDTO",
+                                         bindto);
+  GNUNET_CONFIGURATION_set_value_string (sps->cfg, "communicator-tcp",
+                                         "UNIXPATH",
+                                         communicator_unix_path);
+
   system_cmd = GNUNET_TESTING_interpreter_lookup_command (sps->system_label);
   GNUNET_TESTING_get_trait_test_system (system_cmd,
                                         &tl_system);
@@ -536,6 +568,7 @@ GNUNET_TRANSPORT_cmd_start_peer (const char *label,
                                  char *m,
                                  char *n,
                                  char *local_m,
+                                 char *node_ip,
                                  struct GNUNET_MQ_MessageHandler *handlers,
                                  const char *cfgname)
 {
@@ -552,6 +585,7 @@ GNUNET_TRANSPORT_cmd_start_peer (const char *label,
   sps->system_label = system_label;
   sps->connected_peers_map = connected_peers_map;
   sps->cfgname = cfgname;
+  sps->node_ip = node_ip;
 
   if (NULL != handlers)
   {
diff --git a/src/transport/transport_api_cmd_start_peer.c 
b/src/transport/transport_api_cmd_start_peer_v2.c
similarity index 77%
copy from src/transport/transport_api_cmd_start_peer.c
copy to src/transport/transport_api_cmd_start_peer_v2.c
index 729d981c0..0e39bd915 100644
--- a/src/transport/transport_api_cmd_start_peer.c
+++ b/src/transport/transport_api_cmd_start_peer_v2.c
@@ -29,7 +29,7 @@
 #include "gnunet_peerstore_service.h"
 #include "gnunet_transport_core_service.h"
 #include "gnunet_transport_application_service.h"
-#include "transport-testing-ng.h"
+#include "transport-testing-cmds.h"
 
 /**
  * Generic logging shortcut
@@ -50,7 +50,7 @@ hello_iter_cb (void *cb_cls,
                const struct GNUNET_PEERSTORE_Record *record,
                const char *emsg)
 {
-  struct StartPeerState *sps = cb_cls;
+  struct StartPeerState_v2 *sps = cb_cls;
   if (NULL == record)
   {
     sps->pic = NULL;
@@ -77,7 +77,7 @@ hello_iter_cb (void *cb_cls,
 static void
 retrieve_hello (void *cls)
 {
-  struct StartPeerState *sps = cls;
+  struct StartPeerState_v2 *sps = cls;
   sps->rh_task = NULL;
   sps->pic = GNUNET_PEERSTORE_iterate (sps->ph,
                                        "transport",
@@ -90,7 +90,7 @@ retrieve_hello (void *cls)
 
 
 /**
- * This function checks StartPeerState#finished, which is set when the hello 
was retrieved.
+ * This function checks StartPeerState_v2#finished, which is set when the 
hello was retrieved.
  *
  */
 static int
@@ -98,7 +98,7 @@ start_peer_finish (void *cls,
                    GNUNET_SCHEDULER_TaskCallback cont,
                    void *cont_cls)
 {
-  struct StartPeerState *sps = cls;
+  struct StartPeerState_v2 *sps = cls;
 
   if (GNUNET_YES == sps->finished)
   {
@@ -118,7 +118,7 @@ notify_disconnect (void *cls,
                    const struct GNUNET_PeerIdentity *peer,
                    void *handler_cls)
 {
-  struct StartPeerState *sps = cls;
+  struct StartPeerState_v2 *sps = cls;
 
   LOG (GNUNET_ERROR_TYPE_DEBUG,
        "Peer %s disconnected from peer %u (`%s')\n",
@@ -138,7 +138,7 @@ notify_connect (void *cls,
                 const struct GNUNET_PeerIdentity *peer,
                 struct GNUNET_MQ_Handle *mq)
 {
-  struct StartPeerState *sps = cls;
+  struct StartPeerState_v2 *sps = cls;
   struct GNUNET_ShortHashCode *key = GNUNET_new (struct GNUNET_ShortHashCode);
   struct GNUNET_HashCode hc;
   int node_number;
@@ -180,11 +180,15 @@ start_peer_run (void *cls,
                 const struct GNUNET_TESTING_Command *cmd,
                 struct GNUNET_TESTING_Interpreter *is)
 {
-  struct StartPeerState *sps = cls;
+  struct StartPeerState_v2 *sps = cls;
   char *emsg = NULL;
   struct GNUNET_PeerIdentity dummy;
   const struct GNUNET_TESTING_Command *system_cmd;
   struct GNUNET_TESTING_System *tl_system;
+  char *home;
+  char *transport_unix_path;
+  char *communicator_unix_path;
+  char *bindto;
 
   if (GNUNET_NO == GNUNET_DISK_file_test (sps->cfgname))
   {
@@ -200,6 +204,34 @@ start_peer_run (void *cls,
   GNUNET_assert (GNUNET_OK ==
                  GNUNET_CONFIGURATION_load (sps->cfg, sps->cfgname));
 
+  GNUNET_asprintf (&home,
+                   "$GNUNET_TMP/test-transport/api-tcp-p%u",
+                   sps->no);
+
+  GNUNET_asprintf (&transport_unix_path,
+                   "$GNUNET_RUNTIME_DIR/tng-p%u.sock",
+                   sps->no);
+
+  GNUNET_asprintf (&communicator_unix_path,
+                   "$GNUNET_RUNTIME_DIR/tcp-comm-p%u.sock",
+                   sps->no);
+
+  GNUNET_asprintf (&bindto,
+                   "%s:60002",
+                   sps->node_ip);
+
+
+  GNUNET_CONFIGURATION_set_value_string (sps->cfg, "PATHS", "GNUNET_TEST_HOME",
+                                         home);
+  GNUNET_CONFIGURATION_set_value_string (sps->cfg, "transport", "UNIXPATH",
+                                         transport_unix_path);
+  GNUNET_CONFIGURATION_set_value_string (sps->cfg, "communicator-tcp",
+                                         "BINDTO",
+                                         bindto);
+  GNUNET_CONFIGURATION_set_value_string (sps->cfg, "communicator-tcp",
+                                         "UNIXPATH",
+                                         communicator_unix_path);
+
   system_cmd = GNUNET_TESTING_interpreter_lookup_command (sps->system_label);
   GNUNET_TESTING_get_trait_test_system (system_cmd,
                                         &tl_system);
@@ -319,7 +351,7 @@ static void
 start_peer_cleanup (void *cls,
                     const struct GNUNET_TESTING_Command *cmd)
 {
-  struct StartPeerState *sps = cls;
+  struct StartPeerState_v2 *sps = cls;
 
   if (NULL != sps->handlers)
   {
@@ -347,7 +379,7 @@ start_peer_traits (void *cls,
                    const char *trait,
                    unsigned int index)
 {
-  struct StartPeerState *sps = cls;
+  struct StartPeerState_v2 *sps = cls;
   struct GNUNET_TRANSPORT_ApplicationHandle *ah = sps->ah;
   struct GNUNET_PeerIdentity *id = &sps->id;
   struct GNUNET_CONTAINER_MultiShortmap *connected_peers_map =
@@ -398,17 +430,17 @@ start_peer_traits (void *cls,
 
 
 /**
- * Function to get the trait with the struct StartPeerState.
+ * Function to get the trait with the struct StartPeerState_v2.
  *
- * @param[out] sps struct StartPeerState.
+ * @param[out] sps struct StartPeerState_v2.
  * @return #GNUNET_OK if no error occurred, #GNUNET_SYSERR otherwise.
  *
  */
 int
-GNUNET_TRANSPORT_get_trait_state (const struct
-                                  GNUNET_TESTING_Command
-                                  *cmd,
-                                  struct StartPeerState **sps)
+GNUNET_TRANSPORT_get_trait_state_v2 (const struct
+                                     GNUNET_TESTING_Command
+                                     *cmd,
+                                     struct StartPeerState_v2 **sps)
 {
   return cmd->traits (cmd->cls,
                       (const void **) sps,
@@ -425,10 +457,10 @@ GNUNET_TRANSPORT_get_trait_state (const struct
  *
  */
 int
-GNUNET_TRANSPORT_get_trait_hello_size (const struct
-                                       GNUNET_TESTING_Command
-                                       *cmd,
-                                       size_t **hello_size)
+GNUNET_TRANSPORT_get_trait_hello_size_v2 (const struct
+                                          GNUNET_TESTING_Command
+                                          *cmd,
+                                          size_t **hello_size)
 {
   return cmd->traits (cmd->cls,
                       (const void **) hello_size,
@@ -445,10 +477,10 @@ GNUNET_TRANSPORT_get_trait_hello_size (const struct
  *
  */
 int
-GNUNET_TRANSPORT_get_trait_hello (const struct
-                                  GNUNET_TESTING_Command
-                                  *cmd,
-                                  char **hello)
+GNUNET_TRANSPORT_get_trait_hello_v2 (const struct
+                                     GNUNET_TESTING_Command
+                                     *cmd,
+                                     char **hello)
 {
   return cmd->traits (cmd->cls,
                       (const void **) hello,
@@ -465,13 +497,14 @@ GNUNET_TRANSPORT_get_trait_hello (const struct
  *
  */
 int
-GNUNET_TRANSPORT_get_trait_connected_peers_map (const struct
-                                                GNUNET_TESTING_Command
-                                                *cmd,
-                                                struct
-                                                GNUNET_CONTAINER_MultiShortmap 
*
-                                                *
-                                                connected_peers_map)
+GNUNET_TRANSPORT_get_trait_connected_peers_map_v2 (const struct
+                                                   GNUNET_TESTING_Command
+                                                   *cmd,
+                                                   struct
+                                                   
GNUNET_CONTAINER_MultiShortmap
+                                                   *
+                                                   *
+                                                   connected_peers_map)
 {
   return cmd->traits (cmd->cls,
                       (const void **) connected_peers_map,
@@ -487,11 +520,11 @@ GNUNET_TRANSPORT_get_trait_connected_peers_map (const 
struct
  * @return #GNUNET_OK if no error occurred, #GNUNET_SYSERR otherwise.
  */
 int
-GNUNET_TRANSPORT_get_trait_application_handle (const struct
-                                               GNUNET_TESTING_Command *cmd,
-                                               struct
-                                               
GNUNET_TRANSPORT_ApplicationHandle
-                                               **ah)
+GNUNET_TRANSPORT_get_trait_application_handle_v2 (const struct
+                                                  GNUNET_TESTING_Command *cmd,
+                                                  struct
+                                                  
GNUNET_TRANSPORT_ApplicationHandle
+                                                  **ah)
 {
   return cmd->traits (cmd->cls,
                       (const void **) ah,
@@ -507,9 +540,9 @@ GNUNET_TRANSPORT_get_trait_application_handle (const struct
  * @return #GNUNET_OK if no error occurred, #GNUNET_SYSERR otherwise.
  */
 int
-GNUNET_TRANSPORT_get_trait_peer_id (const struct
-                                    GNUNET_TESTING_Command *cmd,
-                                    struct GNUNET_PeerIdentity **id)
+GNUNET_TRANSPORT_get_trait_peer_id_v2 (const struct
+                                       GNUNET_TESTING_Command *cmd,
+                                       struct GNUNET_PeerIdentity **id)
 {
   return cmd->traits (cmd->cls,
                       (const void **) id,
@@ -531,27 +564,24 @@ GNUNET_TRANSPORT_get_trait_peer_id (const struct
  * @return command.
  */
 struct GNUNET_TESTING_Command
-GNUNET_TRANSPORT_cmd_start_peer (const char *label,
-                                 const char *system_label,
-                                 char *m,
-                                 char *n,
-                                 char *local_m,
-                                 struct GNUNET_MQ_MessageHandler *handlers,
-                                 const char *cfgname)
+GNUNET_TRANSPORT_cmd_start_peer_v2 (const char *label,
+                                    const char *system_label,
+                                    uint32_t no,
+                                    char *node_ip,
+                                    struct GNUNET_MQ_MessageHandler *handlers,
+                                    const char *cfgname)
 {
-  struct StartPeerState *sps;
+  struct StartPeerState_v2 *sps;
   struct GNUNET_CONTAINER_MultiShortmap *connected_peers_map =
     GNUNET_CONTAINER_multishortmap_create (1,GNUNET_NO);
   unsigned int i;
 
-  sps = GNUNET_new (struct StartPeerState);
-  sps->m = m;
-  sps->n = n;
-  sps->local_m = local_m;
-  sps->no = (atoi (n) - 1) * atoi (sps->local_m) + atoi (m);
+  sps = GNUNET_new (struct StartPeerState_v2);
+  sps->no = no;
   sps->system_label = system_label;
   sps->connected_peers_map = connected_peers_map;
   sps->cfgname = cfgname;
+  sps->node_ip = node_ip;
 
   if (NULL != handlers)
   {
diff --git a/src/transport/transport_api_cmd_stop_peer.c 
b/src/transport/transport_api_cmd_stop_peer.c
index 7a0050a63..4d7228378 100644
--- a/src/transport/transport_api_cmd_stop_peer.c
+++ b/src/transport/transport_api_cmd_stop_peer.c
@@ -29,7 +29,7 @@
 #include "gnunet_peerstore_service.h"
 #include "gnunet_transport_core_service.h"
 #include "gnunet_transport_application_service.h"
-#include "transport-testing-ng.h"
+#include "transport-testing-cmds.h"
 
 /**
  * Generic logging shortcut

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]