diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-05-27 10:43:18 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-05-27 10:43:18 +0000 |
commit | 315a5cc108293e1ac8f8aaa8fda5c9a7bbd71531 (patch) | |
tree | eea7d171b621f287c13280f6be5f4ee9070ce569 /src/include/gnunet_testing_lib.h | |
parent | bbad719b371981f8eee4e9a22c74767140894a46 (diff) | |
download | gnunet-315a5cc108293e1ac8f8aaa8fda5c9a7bbd71531.tar.gz gnunet-315a5cc108293e1ac8f8aaa8fda5c9a7bbd71531.zip |
api for controlled churn
Diffstat (limited to 'src/include/gnunet_testing_lib.h')
-rw-r--r-- | src/include/gnunet_testing_lib.h | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/src/include/gnunet_testing_lib.h b/src/include/gnunet_testing_lib.h index d3ede33e8..9fd43c8ff 100644 --- a/src/include/gnunet_testing_lib.h +++ b/src/include/gnunet_testing_lib.h | |||
@@ -546,10 +546,11 @@ GNUNET_TESTING_daemons_restart (struct GNUNET_TESTING_PeerGroup *pg, | |||
546 | * | 546 | * |
547 | * @param pg handle to the peer group | 547 | * @param pg handle to the peer group |
548 | * @param timeout how long to wait for shutdown | 548 | * @param timeout how long to wait for shutdown |
549 | * | ||
550 | */ | 549 | */ |
551 | void | 550 | void |
552 | GNUNET_TESTING_daemons_stop (struct GNUNET_TESTING_PeerGroup *pg, struct GNUNET_TIME_Relative timeout); | 551 | GNUNET_TESTING_daemons_stop (struct GNUNET_TESTING_PeerGroup *pg, |
552 | struct GNUNET_TIME_Relative timeout); | ||
553 | |||
553 | 554 | ||
554 | /** | 555 | /** |
555 | * Simulate churn by stopping some peers (and possibly | 556 | * Simulate churn by stopping some peers (and possibly |
@@ -715,6 +716,25 @@ GNUNET_TESTING_connect_topology (struct GNUNET_TESTING_PeerGroup *pg, | |||
715 | double option_modifier); | 716 | double option_modifier); |
716 | 717 | ||
717 | /** | 718 | /** |
719 | * Start or stop an individual peer from the given group. | ||
720 | * | ||
721 | * @param pg handle to the peer group | ||
722 | * @param offset which peer to start or stop | ||
723 | * @param desired_status GNUNET_YES to have it running, GNUNET_NO to stop it | ||
724 | * @param timeout how long to wait for shutdown | ||
725 | * @param cb function to call at the end | ||
726 | * @param cb_cls closure for cb | ||
727 | */ | ||
728 | void | ||
729 | GNUNET_TESTING_daemons_vary (struct GNUNET_TESTING_PeerGroup *pg, | ||
730 | unsigned int offset, | ||
731 | int desired_status, | ||
732 | struct GNUNET_TIME_Relative timeout, | ||
733 | GNUNET_TESTING_NotifyCompletion cb, | ||
734 | void *cb_cls); | ||
735 | |||
736 | |||
737 | /** | ||
718 | * Start "count" GNUnet daemons with a particular topology. | 738 | * Start "count" GNUnet daemons with a particular topology. |
719 | * | 739 | * |
720 | * @param sched scheduler to use | 740 | * @param sched scheduler to use |