aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_testing_ng_lib.h
diff options
context:
space:
mode:
authort3sserakt <t3ss@posteo.de>2023-01-06 21:02:55 +0100
committert3sserakt <t3ss@posteo.de>2023-01-06 21:02:55 +0100
commit2c2b2911e1585dc378dbb88d4dd6aaec37b00316 (patch)
tree701cd3a2304a7e1fb74553c78d8a3d2a1cbcc6c2 /src/include/gnunet_testing_ng_lib.h
parentd9f74f1751f0c4e08ddb2ce5f81a8cf8e4dcf1a2 (diff)
downloadgnunet-2c2b2911e1585dc378dbb88d4dd6aaec37b00316.tar.gz
gnunet-2c2b2911e1585dc378dbb88d4dd6aaec37b00316.zip
- relsoved an coverity issue, worked on fixmes, code documentation and cleaned up up the barrier API
Diffstat (limited to 'src/include/gnunet_testing_ng_lib.h')
-rw-r--r--src/include/gnunet_testing_ng_lib.h54
1 files changed, 9 insertions, 45 deletions
diff --git a/src/include/gnunet_testing_ng_lib.h b/src/include/gnunet_testing_ng_lib.h
index f0e2e3250..aae918ff3 100644
--- a/src/include/gnunet_testing_ng_lib.h
+++ b/src/include/gnunet_testing_ng_lib.h
@@ -422,46 +422,6 @@ GNUNET_TESTING_main (struct GNUNET_TESTING_Command *commands,
422 422
423 423
424/** 424/**
425 * Adding a helper handle to the interpreter.
426 *
427 * @param is The interpreter.
428 * @param helper The helper handle.
429 */
430void
431GNUNET_TESTING_add_netjail_helper (struct GNUNET_TESTING_Interpreter *is,
432 const struct GNUNET_HELPER_Handle *helper);
433
434
435/**
436 * Send Message to netjail nodes that a barrier can be advanced.
437 * FIXME: Naming. No "netjail" in argument. Or is there a
438 * GNUNET_TESTING_send_message without "to_netjail"??
439 *
440 * @param is The interpreter.
441 * @param global_node_number The node to inform.
442 * @param header The message to send.
443 */
444void
445GNUNET_TESTING_send_message_to_netjail (struct GNUNET_TESTING_Interpreter *is,
446 unsigned int global_node_number,
447 struct GNUNET_MessageHeader *header);
448
449
450/**
451 * Returns the actual running command.
452 * FIXME: Is Command allocated? Is it constant? Should this be a private
453 * function? => not used outside of testing
454 *
455 * @param is Global state of the interpreter, used by a command
456 * to access information about other commands.
457 * @return The actual running command.
458 */
459struct GNUNET_TESTING_Command *
460GNUNET_TESTING_interpreter_get_current_command (
461 struct GNUNET_TESTING_Interpreter *is);
462
463
464/**
465 * Check if the command is running. 425 * Check if the command is running.
466 * FIXME: Unused function. 426 * FIXME: Unused function.
467 * 427 *
@@ -561,15 +521,14 @@ struct GNUNET_TESTING_Timer
561 521
562 522
563/** 523/**
564 * Retrieve the public key from the test system with the unique node id. 524 * Retrieve peer identity from the test system with the unique node id.
565 * FIXME: Naming. => get_peer? This returns a PeerIdentity not a PublicKey
566 * 525 *
567 * @param num The unique node id. 526 * @param num The unique node id.
568 * @param tl_system The test system. 527 * @param tl_system The test system.
569 * @return The peer identity wrapping the public key. 528 * @return The peer identity wrapping the public key.
570 */ 529 */
571struct GNUNET_PeerIdentity * 530struct GNUNET_PeerIdentity *
572GNUNET_TESTING_get_pub_key (unsigned int num, 531GNUNET_TESTING_get_peer (unsigned int num,
573 const struct GNUNET_TESTING_System *tl_system); 532 const struct GNUNET_TESTING_System *tl_system);
574 533
575 534
@@ -586,8 +545,13 @@ GNUNET_TESTING_cmd_stat (struct GNUNET_TESTING_Timer *timers);
586/* *** Generic trait logic for implementing traits ********* */ 545/* *** Generic trait logic for implementing traits ********* */
587 546
588/** 547/**
589 * FIXME: Documentation 548 * A struct GNUNET_TESTING_Trait can be used to exchange data between cmds.
590 * A trait. 549 *
550 * Therefor the cmd which like to provide data to other cmds has to implement
551 * the trait function, where an array of traits is defined with the help of the
552 * GNUNET_TESTING_make_trait_ macro. The data can be retrieved with the help of the
553 * GNUNET_TESTING_get_trait_ macro. Traits name and type must be defined to make
554 * use of the macros.
591 */ 555 */
592struct GNUNET_TESTING_Trait 556struct GNUNET_TESTING_Trait
593{ 557{