diff options
Diffstat (limited to 'src/include/gnunet_testing_netjail_lib.h')
-rw-r--r-- | src/include/gnunet_testing_netjail_lib.h | 58 |
1 files changed, 11 insertions, 47 deletions
diff --git a/src/include/gnunet_testing_netjail_lib.h b/src/include/gnunet_testing_netjail_lib.h index 334f43c88..7ec6b294b 100644 --- a/src/include/gnunet_testing_netjail_lib.h +++ b/src/include/gnunet_testing_netjail_lib.h | |||
@@ -351,12 +351,6 @@ GNUNET_TESTING_cmd_system_create (const char *label, | |||
351 | const char *testdir); | 351 | const char *testdir); |
352 | 352 | ||
353 | 353 | ||
354 | int | ||
355 | GNUNET_TESTING_get_trait_test_system (const struct | ||
356 | GNUNET_TESTING_Command *cmd, | ||
357 | struct GNUNET_TESTING_System **test_system); | ||
358 | |||
359 | |||
360 | /** | 354 | /** |
361 | * Create command. | 355 | * Create command. |
362 | * | 356 | * |
@@ -427,30 +421,8 @@ struct GNUNET_MessageHeader * | |||
427 | GNUNET_TESTING_send_local_test_finished_msg (enum GNUNET_GenericReturnValue rv); | 421 | GNUNET_TESTING_send_local_test_finished_msg (enum GNUNET_GenericReturnValue rv); |
428 | 422 | ||
429 | 423 | ||
430 | /** | ||
431 | * Function to get the trait with the async context. | ||
432 | * | ||
433 | * @param[out] ac GNUNET_TESTING_AsyncContext. | ||
434 | * @return #GNUNET_OK if no error occurred, #GNUNET_SYSERR otherwise. | ||
435 | */ | ||
436 | int | ||
437 | GNUNET_TESTING_get_trait_async_context ( | ||
438 | const struct GNUNET_TESTING_Command *cmd, | ||
439 | struct GNUNET_TESTING_AsyncContext **ac); | ||
440 | 424 | ||
441 | 425 | ||
442 | /** | ||
443 | * Offer handles to testing cmd helper from trait | ||
444 | * | ||
445 | * @param cmd command to extract the message from. | ||
446 | * @param pt pointer to message. | ||
447 | * @return #GNUNET_OK on success. | ||
448 | */ | ||
449 | enum GNUNET_GenericReturnValue | ||
450 | GNUNET_TESTING_get_trait_helper_handles ( | ||
451 | const struct GNUNET_TESTING_Command *cmd, | ||
452 | struct GNUNET_HELPER_Handle ***helper); | ||
453 | |||
454 | 426 | ||
455 | struct GNUNET_TESTING_Command | 427 | struct GNUNET_TESTING_Command |
456 | GNUNET_TESTING_cmd_block_until_all_peers_started ( | 428 | GNUNET_TESTING_cmd_block_until_all_peers_started ( |
@@ -501,28 +473,20 @@ GNUNET_TESTING_cmd_local_test_prepared (const char *label, | |||
501 | TESTING_CMD_HELPER_write_cb | 473 | TESTING_CMD_HELPER_write_cb |
502 | write_message); | 474 | write_message); |
503 | 475 | ||
504 | /** | 476 | |
505 | * Function to get the trait with the struct LocalPreparedState. | 477 | /* ***** Netjail trait support ***** */ |
506 | * | ||
507 | * @param[out] lfs struct LocalPreparedState. | ||
508 | * @return #GNUNET_OK if no error occurred, #GNUNET_SYSERR otherwise. | ||
509 | * | ||
510 | */ | ||
511 | enum GNUNET_GenericReturnValue | ||
512 | GNUNET_TESTING_get_trait_local_prepared_state ( | ||
513 | const struct GNUNET_TESTING_Command *cmd, | ||
514 | struct LocalPreparedState **lfs); | ||
515 | 478 | ||
516 | 479 | ||
517 | /** | 480 | /** |
518 | * Function to get the trait with the internal command state BlockState. | 481 | * Call #op on all simple traits. |
519 | * | ||
520 | * * @param[out] ac struct BlockState. | ||
521 | * @return #GNUNET_OK if no error occurred, #GNUNET_SYSERR otherwise. | ||
522 | */ | 482 | */ |
523 | int | 483 | #define GNUNET_TESTING_SIMPLE_NETJAIL_TRAITS(op) \ |
524 | GNUNET_TESTING_get_trait_block_state ( | 484 | op (test_system, const struct GNUNET_TESTING_System) \ |
525 | const struct GNUNET_TESTING_Command *cmd, | 485 | op (async_context, const struct GNUNET_TESTING_AsyncContext) \ |
526 | struct BlockState **bs); | 486 | op (helper_handles, const void *) \ |
487 | op (local_prepared_state, const struct LocalPreparedState) \ | ||
488 | op (block_state, const struct BlockState) | ||
489 | |||
490 | GNUNET_TESTING_SIMPLE_NETJAIL_TRAITS (GNUNET_TESTING_MAKE_DECL_SIMPLE_TRAIT) | ||
527 | 491 | ||
528 | #endif | 492 | #endif |