aboutsummaryrefslogtreecommitdiff
path: root/src/testing/testing.c
diff options
context:
space:
mode:
authort3sserakt <t3ss@posteo.de>2022-01-21 15:31:44 +0100
committert3sserakt <t3ss@posteo.de>2022-01-21 15:31:44 +0100
commitfc99f54070e04c043c14f2244f85833ecf6b00c4 (patch)
treeb82d8296064960d3d068356f4fd939d8e1555d65 /src/testing/testing.c
parent856078f624e0fe37b571fd56030f987b7844e2c9 (diff)
downloadgnunet-fc99f54070e04c043c14f2244f85833ecf6b00c4.tar.gz
gnunet-fc99f54070e04c043c14f2244f85833ecf6b00c4.zip
- fixed bug with broadcast test.
- added configurable port for router in netjail_start.sh. - added key for configuring broadcast in topo.sh. - port for communicators can variable. - added variable additional_connects in GNUNET_TESTING_NetjailTopology. - additional connects can be configured in topology file. - added distance vector test with circle topology. - Reassambly for fragmentation is now stored at VirtualLink, not at Neighbour. - DV forwarding distingush between control flow and payload. - handling fragment box switch to be based on VirtualLink. - reliability box will not be handled like a fragment. - propagating next retransmission attempt variable of fragment to the root message. - check for fragmentation when adding reliability box. - several smaller bug fixes.
Diffstat (limited to 'src/testing/testing.c')
-rw-r--r--src/testing/testing.c24
1 files changed, 19 insertions, 5 deletions
diff --git a/src/testing/testing.c b/src/testing/testing.c
index fd0701d7d..6480d32f9 100644
--- a/src/testing/testing.c
+++ b/src/testing/testing.c
@@ -38,11 +38,11 @@
38 38
39#define LOG(kind, ...) GNUNET_log_from (kind, "testing-api", __VA_ARGS__) 39#define LOG(kind, ...) GNUNET_log_from (kind, "testing-api", __VA_ARGS__)
40 40
41#define CONNECT_ADDRESS_TEMPLATE "%s-192.168.15.%u:60002" 41#define CONNECT_ADDRESS_TEMPLATE "%s-192.168.15.%u"
42 42
43#define ROUTER_CONNECT_ADDRESS_TEMPLATE "%s-92.68.150.%u:60002" 43#define ROUTER_CONNECT_ADDRESS_TEMPLATE "%s-92.68.150.%u"
44 44
45#define KNOWN_CONNECT_ADDRESS_TEMPLATE "%s-92.68.151.%u:60002" 45#define KNOWN_CONNECT_ADDRESS_TEMPLATE "%s-92.68.151.%u"
46 46
47#define PREFIX_TCP "tcp" 47#define PREFIX_TCP "tcp"
48 48
@@ -2298,6 +2298,7 @@ GNUNET_TESTING_get_address (struct GNUNET_TESTING_NodeConnection *connection,
2298 struct GNUNET_TESTING_NetjailNode *node; 2298 struct GNUNET_TESTING_NetjailNode *node;
2299 char *addr; 2299 char *addr;
2300 char *template; 2300 char *template;
2301 unsigned int node_n;
2301 2302
2302 LOG (GNUNET_ERROR_TYPE_DEBUG, 2303 LOG (GNUNET_ERROR_TYPE_DEBUG,
2303 "node_n: %u\n", 2304 "node_n: %u\n",
@@ -2307,14 +2308,17 @@ GNUNET_TESTING_get_address (struct GNUNET_TESTING_NodeConnection *connection,
2307 if (connection->namespace_n == node->namespace_n) 2308 if (connection->namespace_n == node->namespace_n)
2308 { 2309 {
2309 template = CONNECT_ADDRESS_TEMPLATE; 2310 template = CONNECT_ADDRESS_TEMPLATE;
2311 node_n = connection->node_n;
2310 } 2312 }
2311 else if (0 == connection->namespace_n) 2313 else if (0 == connection->namespace_n)
2312 { 2314 {
2313 template = KNOWN_CONNECT_ADDRESS_TEMPLATE; 2315 template = KNOWN_CONNECT_ADDRESS_TEMPLATE;
2316 node_n = connection->node_n;
2314 } 2317 }
2315 else if (1 == connection->node_n) 2318 else if (1 == connection->node_n)
2316 { 2319 {
2317 template = ROUTER_CONNECT_ADDRESS_TEMPLATE; 2320 template = ROUTER_CONNECT_ADDRESS_TEMPLATE;
2321 node_n = connection->namespace_n;
2318 } 2322 }
2319 else 2323 else
2320 { 2324 {
@@ -2327,14 +2331,14 @@ GNUNET_TESTING_get_address (struct GNUNET_TESTING_NodeConnection *connection,
2327 GNUNET_asprintf (&addr, 2331 GNUNET_asprintf (&addr,
2328 template, 2332 template,
2329 prefix, 2333 prefix,
2330 connection->node_n); 2334 node_n);
2331 } 2335 }
2332 else if (0 == strcmp (PREFIX_UDP, prefix)) 2336 else if (0 == strcmp (PREFIX_UDP, prefix))
2333 { 2337 {
2334 GNUNET_asprintf (&addr, 2338 GNUNET_asprintf (&addr,
2335 template, 2339 template,
2336 prefix, 2340 prefix,
2337 connection->node_n); 2341 node_n);
2338 } 2342 }
2339 else 2343 else
2340 { 2344 {
@@ -2439,6 +2443,16 @@ GNUNET_TESTING_get_topo_from_string (char *data)
2439 out); 2443 out);
2440 topo->nodes_x = out; 2444 topo->nodes_x = out;
2441 } 2445 }
2446 else if (0 == strcmp (key, "AC"))
2447 {
2448 LOG (GNUNET_ERROR_TYPE_DEBUG,
2449 "Get first Value for AC.\n");
2450 out = get_first_value (token);
2451 LOG (GNUNET_ERROR_TYPE_DEBUG,
2452 "AC: %u\n",
2453 out);
2454 topo->additional_connects = out;
2455 }
2442 else if (0 == strcmp (key, "T")) 2456 else if (0 == strcmp (key, "T"))
2443 { 2457 {
2444 LOG (GNUNET_ERROR_TYPE_DEBUG, 2458 LOG (GNUNET_ERROR_TYPE_DEBUG,