GNUnet 0.22.2
testing_api_cmd_netjail_start_cmds_helper.c
Go to the documentation of this file.
1/*
2 This file is part of GNUnet
3 Copyright (C) 2021 GNUnet e.V.
4
5 GNUnet is free software: you can redistribute it and/or modify it
6 under the terms of the GNU Affero General Public License as published
7 by the Free Software Foundation, either version 3 of the License,
8 or (at your option) any later version.
9
10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Affero General Public License for more details.
14
15 You should have received a copy of the GNU Affero General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17
18 SPDX-License-Identifier: AGPL3.0-or-later
19 */
25#include "platform.h"
26#include "gnunet_util_lib.h"
27#include "gnunet_testing_lib.h"
28#include "testing_api_barrier.h"
29#include "testing_api_loop.h"
30#include "testing_cmds.h"
32
33
37#define LOG(kind, ...) GNUNET_log (kind, __VA_ARGS__)
38
39
45
46
50struct NetJailState
51{
57
62
66 const char *topology_cmd_label;
67
72
77
82
87
92
96 const char *topology_data;
97
101 unsigned int n_helpers;
102
106 unsigned int n_finished;
107
111 bool failed;
112};
113
115{
120
125
130};
131
137{
138
143
148
153
158
159
160};
161
162
166unsigned int node_number;
167
168
177static void
178clear_msg (void *cls,
180{
181 struct TestingSystemCount *tbc = cls;
182 struct NetJailState *ns = tbc->ns;
183
184 GNUNET_assert (NULL != tbc->shandle);
185 tbc->shandle = NULL;
187 ns->tbc_tail,
188 tbc);
189 GNUNET_free (tbc);
190 if ( (! ns->failed) &&
191 (GNUNET_OK != result) )
192 {
193 ns->failed = true;
195 "Failed sending message to helper!\n");
197 }
198}
199
200
201static void
203 void *cls,
205{
206 struct HelperState *hs = cls;
207 struct NetJailState *ns = hs->ns;
208 struct GNUNET_TESTING_Barrier *barrier;
209
210 barrier = GNUNET_TESTING_get_barrier2_ (ns->is,
211 &rm->barrier_key);
212 if (NULL == barrier)
213 {
214 if (! ns->failed)
215 {
216 ns->failed = true;
218 "We did not found the barrier that was supposedly reached.!\n");
220 }
221 return;
222 }
223 if (barrier->inherited)
224 {
225 /* pass on to parent */
227 &rm->header);
228 }
229 else
230 {
231 barrier->reached++;
232 if (barrier->reached == barrier->expected_reaches)
233 {
235 .header.size
236 = htons (sizeof (cbs)),
237 .header.type
239 .barrier_key
240 = rm->barrier_key
241 };
242
243 GNUNET_assert (! barrier->satisfied);
244 barrier->satisfied = true;
245 /* unblock children */
247 &cbs.header);
248 /* unblock self */
249 for (unsigned int i = 0; i<barrier->cnt_waiting; i++)
251 GNUNET_array_grow (barrier->waiting,
252 barrier->cnt_waiting,
253 0);
254 }
255 }
256}
257
258
259static void
261 void *cls,
263{
264 struct HelperState *hs = cls;
265 struct NetJailState *ns = hs->ns;
266
268 hs->finished = GNUNET_YES;
269 ns->n_finished++;
270 if ( (! ns->failed) &&
271 (GNUNET_OK != ntohl (lf->rv)) )
272 {
273 ns->failed = true;
275 "Helper finished with error!\n");
277 return;
278 }
279 if (ns->n_finished == ns->n_helpers)
280 {
281 GNUNET_SCHEDULER_cancel (ns->timeout_task);
282 ns->timeout_task = NULL;
284 }
285}
286
287
299helper_mst (void *cls,
300 const struct GNUNET_MessageHeader *message)
301{
302 struct HelperState *hs = cls;
303 struct NetJailState *ns = hs->ns;
306 helper_barrier_reached,
309 hs),
311 helper_local_finished,
314 hs),
316 };
318
320 message);
321 if (GNUNET_OK != ret)
322 {
323 GNUNET_break (0);
324 if (! ns->failed)
325 {
326 ns->failed = true;
328 "We got an unknown message from the helper process!\n");
330 }
331 }
332 return ret;
333}
334
335
339static void
340exp_cb (void *cls)
341{
342 struct HelperState *hs = cls;
343 struct NetJailState *ns = hs->ns;
344
346 "Called exp_cb.\n");
347 // TODO find in ns->helpers[] and remove???
348 hs->helper = NULL;
349 hs->finished = GNUNET_YES;
350 if (NULL != ns->timeout_task)
351 {
352 GNUNET_SCHEDULER_cancel (ns->timeout_task);
353 ns->timeout_task = NULL;
354 }
355 if (! ns->failed)
357}
358
359
361add_barrier (void *cls,
362 const struct GNUNET_ShortHashCode *key,
363 void *value)
364{
365 struct GNUNET_ShortHashCode **bar_posp = cls;
366 struct GNUNET_ShortHashCode *bar_pos = *bar_posp;
367
368 *bar_pos = *key;
369 *bar_posp = bar_pos + 1;
370 return GNUNET_OK;
371}
372
373
377static bool
379 struct GNUNET_HELPER_Handle *helper)
380{
382 struct TestingSystemCount *tbc;
383 struct GNUNET_ShortHashCode *bar;
384 struct GNUNET_ShortHashCode *bar_pos;
385 unsigned int num_barriers = GNUNET_TESTING_barrier_count_ (ns->is);
386 size_t topo_length;
387 size_t msg_len;
388
389 topo_length = strlen (ns->topology_data) + 1;
390 GNUNET_assert (topo_length < SIZE_MAX - sizeof (*msg));
391 GNUNET_assert (SIZE_MAX / sizeof (struct GNUNET_ShortHashCode) >
392 num_barriers);
393 GNUNET_assert (sizeof (*msg) + topo_length <
395 - num_barriers * sizeof (struct GNUNET_ShortHashCode));
396 msg_len = sizeof (*msg) + topo_length
397 + num_barriers * sizeof (struct GNUNET_ShortHashCode);
398 if (msg_len > UINT16_MAX)
399 {
400 /* ask a wizard to enhance the protocol;
401 start with gzip topology_data? multiple
402 init messages for barriers + topo data,
403 etc.*/
404 GNUNET_break (0);
405 return false;
406 }
407 msg = GNUNET_malloc (msg_len);
408 msg->header.size = htons ((uint16_t) msg_len);
410 msg->barrier_count = htonl (num_barriers);
411 bar = (struct GNUNET_ShortHashCode *) &msg[1];
412 bar_pos = bar;
415 &bar_pos);
416 GNUNET_assert (bar_pos == &bar[num_barriers]);
417 memcpy (&bar[num_barriers],
418 ns->topology_data,
419 topo_length);
420 tbc = GNUNET_new (struct TestingSystemCount);
421 tbc->ns = ns;
423 helper,
424 &msg->header,
425 GNUNET_NO,
426 &clear_msg,
427 tbc);
429 if (NULL == tbc->shandle)
430 {
432 "Send handle is NULL!\n");
433 GNUNET_free (tbc);
434 return false;
435 }
437 ns->tbc_tail,
438 tbc);
439 return true;
440}
441
442
447static bool
449 unsigned int script_num)
450{
451 const struct GNUNET_OS_ProjectData *pd
453 char *gnunet_cmds_helper
456 char *data_dir
459 char node_id[32];
460 char *script_name;
461 struct GNUNET_HELPER_Handle *helper;
462 struct HelperState *hs = GNUNET_new (struct HelperState);
463
464 GNUNET_asprintf (&script_name,
465 "%s%s",
466 data_dir,
468 GNUNET_snprintf (node_id,
469 sizeof (node_id),
470 "if%06x-%06x\n",
471 (unsigned int) getpid (),
472 script_num);
473 {
474 char *const script_argv[] = {
475 script_name,
476 node_id,
477 gnunet_cmds_helper,
478 node_id,
479 NULL
480 };
481 hs->ns = ns;
483 pd,
484 GNUNET_YES, /* with control pipe */
485 script_argv[0],
486 script_argv,
487 &helper_mst,
488 &exp_cb,
489 hs);
490 hs->helper = helper;
491 }
492 GNUNET_free (gnunet_cmds_helper);
493 if (NULL == helper)
494 {
496 "Starting helper failed. Is NULL.\n");
497 GNUNET_break (0);
498 GNUNET_free (hs);
499 return false;
500 }
501 GNUNET_array_append (ns->helpers,
502 ns->n_helpers,
503 hs);
505 helper);
506 GNUNET_free (data_dir);
507 GNUNET_free (script_name);
508 return send_start_messages (ns,
509 helper);
510}
511
512
518static void
519do_timeout (void *cls)
520{
521 struct NetJailState *ns = cls;
522
523 ns->timeout_task = NULL;
525 "Terminating cmd due to global timeout\n");
527}
528
529
530static int
531start_peer (void *cls,
532 const struct GNUNET_ShortHashCode *key,
533 void *value)
534{
535 struct NetJailState *ns = cls;
536
537 if (! start_helper (ns, node_number))
538 {
539 return GNUNET_SYSERR;
540 }
541 node_number++;
542
544 "Peer helper %u started.\n",
546 return GNUNET_OK;
547}
548
549
550static int
551start_subnets (void *cls,
552 const struct GNUNET_ShortHashCode *key,
553 void *value)
554{
555 struct NetJailState *ns = cls;
556 struct GNUNET_TESTING_NetjailSubnet *subnet = value;
557
558 node_number++;
560 "Starting subnet %u.\n",
563 &start_peer,
564 ns))
565 return GNUNET_SYSERR;
567 "Subnet started.\n");
568 return GNUNET_OK;
569}
570
571
572static int
573start_carriers (void *cls,
574 const struct GNUNET_ShortHashCode *key,
575 void *value)
576{
577 struct NetJailState *ns = cls;
578 struct GNUNET_TESTING_NetjailCarrier *carrier = value;
579
580 node_number++;
582 "Starting carrier %u.\n",
585 &start_peer,
586 ns))
587 return GNUNET_SYSERR;
590 ns))
591 return GNUNET_SYSERR;
592
594 "Carrier started.\n");
595 return GNUNET_OK;
596}
597
598
606static void
609{
610 struct NetJailState *ns = cls;
611 struct GNUNET_TESTING_NetjailTopology *topology;
612 bool failed = false;
613 const struct GNUNET_TESTING_Command *topo_cmd;
614
615 ns->is = is;
617 ns->topology_cmd_label);
618 if (NULL == topo_cmd)
620 if (GNUNET_OK !=
621 GNUNET_TESTING_get_trait_topology_string (topo_cmd,
622 &ns->topology_data))
624 topology
625 = GNUNET_TESTING_get_topo_from_string_ (ns->topology_data);
627 "Number of nodes: %u\n",
628 topology->total);
630 backbone_peers,
631 &start_peer,
632 ns))
633 failed = true;
635 (topology->carriers,
636 &
638 ns))
639
640 failed = true;
641
643 if (failed)
644 {
645 ns->failed = true;
647 "Failed to start helpers!\n");
649 }
650 else
651 ns->timeout_task
653 &do_timeout,
654 ns);
655}
656
657
663static void
665{
666 struct NetJailState *ns = cls;
667
668 if (NULL != ns->timeout_task)
669 {
670 GNUNET_SCHEDULER_cancel (ns->timeout_task);
671 ns->timeout_task = NULL;
672 }
673 for (unsigned int i = 0; i<ns->n_helpers; i++)
674 {
675 if (GNUNET_NO == ns->helpers[i]->finished)
676 GNUNET_HELPER_stop (ns->helpers[i]->helper,
677 GNUNET_YES);
678 GNUNET_free (ns->helpers[i]);
679 }
680 GNUNET_free (ns);
681}
682
683
689 const void **ret,
690 const char *trait,
691 unsigned int index)
692{
693 struct NetJailState *ns = cls;
694 struct GNUNET_TESTING_Trait traits[] = {
696 };
697
698 (void) ns;
700 ret,
701 trait,
702 index);
703}
704
705
716 const char *label,
717 const char *topology_cmd_label,
719{
720 struct NetJailState *ns;
721
722 ns = GNUNET_new (struct NetJailState);
723 ns->topology_cmd_label = topology_cmd_label;
724 ns->timeout = timeout;
726 label,
730 &ns->ac);
731}
struct GNUNET_MQ_MessageHandlers handlers[]
Definition: 003.c:1
struct GNUNET_MessageHeader * msg
Definition: 005.c:2
static int ret
Final status code.
Definition: gnunet-arm.c:93
static struct GNUNET_TIME_Relative timeout
User defined timestamp for completing operations.
Definition: gnunet-arm.c:118
static struct GNUNET_TESTING_Interpreter * is
struct GNUNET_HashCode key
The key used in the DHT.
static struct GNUNET_NAMECACHE_Handle * ns
Handle to the namecache.
static char * value
Value of the record to add/remove.
static int result
Global testing status.
void lf(char *msg)
Definition: gnunet_gst.c:587
struct GNUNET_TESTING_Command GNUNET_TESTING_command_new_ac(void *cls, const char *label, GNUNET_TESTING_CommandRunRoutine run, GNUNET_TESTING_CommandCleanupRoutine cleanup, GNUNET_TESTING_CommandGetTraits traits, struct GNUNET_TESTING_AsyncContext *ac)
Create a new command that may be asynchronous.
void GNUNET_TESTING_async_finish(struct GNUNET_TESTING_AsyncContext *ac)
The asynchronous command of ac has finished.
#define GNUNET_TESTING_FAIL(is)
Print failing line number and trigger shutdown.
void GNUNET_TESTING_async_fail(struct GNUNET_TESTING_AsyncContext *ac)
The asynchronous command of ac has failed.
const struct GNUNET_TESTING_Command * GNUNET_TESTING_interpreter_lookup_command(struct GNUNET_TESTING_Interpreter *is, const char *label)
Lookup command by label.
struct GNUNET_TESTING_Trait GNUNET_TESTING_trait_end(void)
"end" of traits array.
enum GNUNET_GenericReturnValue GNUNET_TESTING_get_trait(const struct GNUNET_TESTING_Trait *traits, const void **ret, const char *trait, unsigned int index)
Obtain value of a trait from a command.
#define GNUNET_CONTAINER_DLL_remove(head, tail, element)
Remove an element from a DLL.
#define GNUNET_CONTAINER_DLL_insert(head, tail, element)
Insert an element at the head of a DLL.
int GNUNET_CONTAINER_multishortmap_iterate(struct GNUNET_CONTAINER_MultiShortmap *map, GNUNET_CONTAINER_ShortmapIterator it, void *it_cls)
Iterate over all entries in the map.
struct GNUNET_HELPER_SendHandle * GNUNET_HELPER_send(struct GNUNET_HELPER_Handle *h, const struct GNUNET_MessageHeader *msg, bool can_drop, GNUNET_HELPER_Continuation cont, void *cont_cls)
Send an message to the helper.
Definition: helper.c:615
struct GNUNET_HELPER_Handle * GNUNET_HELPER_start(const struct GNUNET_OS_ProjectData *pd, int with_control_pipe, const char *binary_name, char *const binary_argv[], GNUNET_MessageTokenizerCallback cb, GNUNET_HELPER_ExceptionCallback exp_cb, void *cb_cls)
Starts a helper and begins reading from it.
Definition: helper.c:460
void GNUNET_HELPER_stop(struct GNUNET_HELPER_Handle *h, int soft_kill)
Kills the helper, closes the pipe, frees the handle and calls wait() on the helper process.
Definition: helper.c:538
uint16_t type
The type of the message (GNUNET_MESSAGE_TYPE_XXXX), in big-endian format.
#define GNUNET_log(kind,...)
void * cls
Closure for mv and cb.
GNUNET_GenericReturnValue
Named constants for return values.
uint16_t size
The length of the struct (in bytes, including the length field itself), in big-endian format.
@ GNUNET_OK
@ GNUNET_YES
@ GNUNET_NO
@ GNUNET_SYSERR
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
#define GNUNET_break(cond)
Use this for internal assertion violations that are not fatal (can be handled) but should not occur.
@ GNUNET_ERROR_TYPE_ERROR
@ GNUNET_ERROR_TYPE_DEBUG
int int GNUNET_asprintf(char **buf, const char *format,...) __attribute__((format(printf
Like asprintf, just portable.
#define GNUNET_array_grow(arr, size, tsize)
Grow a well-typed (!) array.
int GNUNET_snprintf(char *buf, size_t size, const char *format,...) __attribute__((format(printf
Like snprintf, just aborts if the buffer is of insufficient size.
#define GNUNET_new(type)
Allocate a struct or union of the given type.
#define GNUNET_malloc(size)
Wrapper around malloc.
#define GNUNET_array_append(arr, len, element)
Append an element to an array (growing the array by one).
#define GNUNET_free(ptr)
Wrapper around free.
#define GNUNET_MQ_handler_end()
End-marker for the handlers array.
enum GNUNET_GenericReturnValue GNUNET_MQ_handle_message(const struct GNUNET_MQ_MessageHandler *handlers, const struct GNUNET_MessageHeader *mh)
Call the message message handler that was registered for the type of the given message in the given h...
Definition: mq.c:205
#define GNUNET_MQ_hd_fixed_size(name, code, str, ctx)
const struct GNUNET_OS_ProjectData * GNUNET_OS_project_data_gnunet(void)
Return default project data used by 'libgnunetutil' for GNUnet.
char * GNUNET_OS_installation_get_path(const struct GNUNET_OS_ProjectData *pd, enum GNUNET_OS_InstallationPathKind dirkind)
Get the path to a specific GNUnet installation directory or, with GNUNET_OS_IPK_SELF_PREFIX,...
char * GNUNET_OS_get_libexec_binary_path(const struct GNUNET_OS_ProjectData *pd, const char *progname)
Given the name of a gnunet-helper, gnunet-service or gnunet-daemon binary, try to prefix it with the ...
@ GNUNET_OS_IPK_DATADIR
Return the directory where data is installed (share/gnunet/)
#define GNUNET_MESSAGE_TYPE_CMDS_HELPER_LOCAL_FINISHED
#define GNUNET_MESSAGE_TYPE_CMDS_HELPER_BARRIER_REACHED
#define GNUNET_MESSAGE_TYPE_CMDS_HELPER_BARRIER_CROSSABLE
#define GNUNET_MESSAGE_TYPE_CMDS_HELPER_INIT
The initialization message towards gnunet-cmds-helper.
void * GNUNET_SCHEDULER_cancel(struct GNUNET_SCHEDULER_Task *task)
Cancel the task with the specified identifier.
Definition: scheduler.c:980
struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_delayed(struct GNUNET_TIME_Relative delay, GNUNET_SCHEDULER_TaskCallback task, void *task_cls)
Schedule a new task to be run with a specified delay.
Definition: scheduler.c:1277
#define SIZE_MAX
Definition: platform.h:208
The handle to a helper process.
Definition: helper.c:77
Entry in the queue of messages we need to transmit to the helper.
Definition: helper.c:35
Message handler for a specific message type.
Header for all communications.
Project-specific data used to help the OS subsystem find installation paths.
Entry in list of pending tasks.
Definition: scheduler.c:136
A 256-bit hashcode.
State each asynchronous command must have in its closure.
An entry for a barrier list.
bool inherited
Did we inherit the barrier from our parent loop?
unsigned int reached
Number of times the barrier has been reached.
unsigned int expected_reaches
Number of total commands expected to be reached by the barrier.
struct GNUNET_TESTING_AsyncContext ** waiting
Context of barrier reached commands of our local interpreter that are currently blocked on this barri...
unsigned int cnt_waiting
Length of the waiting array.
bool satisfied
Did we reach expected_reaches? Used in particular if inherited is true and we cannot compute locally.
Child to parent: I reached the given barrier, increment the counter (or pass to grandparent).
Definition: testing_cmds.h:78
struct GNUNET_ShortHashCode barrier_key
Definition: testing_cmds.h:80
struct GNUNET_MessageHeader header
Definition: testing_cmds.h:79
Parent to child: this barrier was satisfied.
Definition: testing_cmds.h:100
struct GNUNET_MessageHeader header
Definition: testing_cmds.h:101
Initialization message for gnunet-cmds-testbed to start cmd binary.
Definition: testing_cmds.h:42
A command to be run by the interpreter.
struct GNUNET_TESTING_CommandLabel label
Label for the command.
void * cls
Closure for all commands with command-specific context information.
Global state of the interpreter, used by a command to access information about other commands.
struct GNUNET_CONTAINER_MultiShortmap * subnets
Hash map containing subnets.
struct GNUNET_CONTAINER_MultiShortmap * peers
Hash map containing peers.
struct GNUNET_CONTAINER_MultiShortmap * peers
Hash map containing peers.
Toplogy of our netjail setup.
struct GNUNET_CONTAINER_MultiShortmap * carriers
Hash map containing the carriers.
unsigned int total
Total number of namespaces in the topology.
A struct GNUNET_TESTING_Trait can be used to exchange data between cmds.
unsigned int index
Index number associated with the trait.
Time for relative time used by GNUnet, in microseconds.
struct GNUNET_HELPER_Handle * helper
The helper handle for this state.
struct NetJailState * ns
The state of this command.
enum GNUNET_GenericReturnValue finished
Did we got a GNUNET_TESTING_CommandLocalFinished message?
Struct to hold information for callbacks.
struct TestingSystemCount * tbc_tail
Kept in a DLL.
const char * topology_data
Data about our topology as a string.
struct GNUNET_TESTING_Interpreter * is
Global state of the interpreter, used by a command to access information about other commands.
const char * topology_cmd_label
Configuration file for the test topology.
struct TestingSystemCount * tbc_head
Kept in a DLL.
unsigned int n_finished
Counts number of helpers that finished.
bool failed
Set to true if we already failed the command.
unsigned int n_helpers
Size of the array helpers.
struct GNUNET_TESTING_AsyncContext ac
Context for our asynchronous completion.
struct GNUNET_TIME_Relative timeout
Time after this cmd has to finish.
struct GNUNET_SCHEDULER_Task * timeout_task
Timeout task.
struct HelperState ** helpers
Array with handles of helper processes.
Struct containing the number of the netjail node and the NetJailState which will be handed to callbac...
struct GNUNET_HELPER_SendHandle * shandle
The send handle for the helper.
struct TestingSystemCount * next
Kept in a DLL.
struct TestingSystemCount * prev
Kept in a DLL.
struct NetJailState * ns
Struct to store information handed over to callbacks.
static enum GNUNET_GenericReturnValue traits(void *cls, const void **ret, const char *trait, unsigned int index)
This function prepares an array with traits.
static bool start_helper(struct NetJailState *ns, unsigned int script_num)
Function which start a single helper process.
struct GNUNET_TESTING_Command GNUNET_TESTING_cmd_netjail_start_helpers(const char *label, const char *topology_cmd_label, struct GNUNET_TIME_Relative timeout)
Create command.
static enum GNUNET_GenericReturnValue helper_mst(void *cls, const struct GNUNET_MessageHeader *message)
Functions with this signature are called whenever a complete message is received by the tokenizer.
static void exp_cb(void *cls)
Callback called if there was an exception during execution of the helper.
static void do_timeout(void *cls)
Function run when the cmd terminates (good or bad) with timeout.
static enum GNUNET_GenericReturnValue add_barrier(void *cls, const struct GNUNET_ShortHashCode *key, void *value)
static void netjail_exec_cleanup(void *cls)
Code to clean up resource this cmd used.
unsigned int node_number
The network namespace number of a node.
static void netjail_exec_run(void *cls, struct GNUNET_TESTING_Interpreter *is)
This function starts a helper process for each node.
static enum GNUNET_GenericReturnValue netjail_exec_traits(void *cls, const void **ret, const char *trait, unsigned int index)
This function prepares an array with traits.
static int start_peer(void *cls, const struct GNUNET_ShortHashCode *key, void *value)
static int start_carriers(void *cls, const struct GNUNET_ShortHashCode *key, void *value)
static int start_subnets(void *cls, const struct GNUNET_ShortHashCode *key, void *value)
static void handle_helper_barrier_reached(void *cls, const struct GNUNET_TESTING_CommandBarrierReached *rm)
static bool send_start_messages(struct NetJailState *ns, struct GNUNET_HELPER_Handle *helper)
#define LOG(kind,...)
Generic logging shortcut.
static void handle_helper_local_finished(void *cls, const struct GNUNET_TESTING_CommandLocalFinished *lf)
static void clear_msg(void *cls, enum GNUNET_GenericReturnValue result)
Continuation function from GNUNET_HELPER_send()
struct GNUNET_TESTING_Barrier * GNUNET_TESTING_get_barrier2_(struct GNUNET_TESTING_Interpreter *is, const struct GNUNET_ShortHashCode *create_key)
unsigned int GNUNET_TESTING_barrier_count_(struct GNUNET_TESTING_Interpreter *is)
void GNUNET_TESTING_barrier_iterate_(struct GNUNET_TESTING_Interpreter *is, GNUNET_CONTAINER_ShortmapIterator cb, void *cb_cls)
void GNUNET_TESTING_add_netjail_helper_(struct GNUNET_TESTING_Interpreter *is, struct GNUNET_HELPER_Handle *helper)
Adding a helper handle to the interpreter.
void GNUNET_TESTING_loop_notify_parent_(struct GNUNET_TESTING_Interpreter *is, const struct GNUNET_MessageHeader *hdr)
Send message to our parent.
void GNUNET_TESTING_loop_notify_children_(struct GNUNET_TESTING_Interpreter *is, const struct GNUNET_MessageHeader *hdr)
Send message to all netjail children (if there are any).
void GNUNET_TESTING_free_topology(struct GNUNET_TESTING_NetjailTopology *topology)
Deallocate memory of the struct GNUNET_TESTING_NetjailTopology.
struct GNUNET_TESTING_NetjailTopology * GNUNET_TESTING_get_topo_from_string_(const char *input)
Parse the topology data.
Message formats for communication between testing cmds helper and testcase plugins.
#define HELPER_CMDS_BINARY
Definition: testing_cmds.h:32
#define NETJAIL_EXEC_SCRIPT
Definition: testing_cmds.h:34