diff options
Diffstat (limited to 'src/include/gnunet_testbed_service.h')
-rw-r--r-- | src/include/gnunet_testbed_service.h | 452 |
1 files changed, 247 insertions, 205 deletions
diff --git a/src/include/gnunet_testbed_service.h b/src/include/gnunet_testbed_service.h index 5acf885dc..d45f5bc34 100644 --- a/src/include/gnunet_testbed_service.h +++ b/src/include/gnunet_testbed_service.h | |||
@@ -89,10 +89,10 @@ struct GNUNET_TESTBED_Controller; | |||
89 | * @return handle to the host, NULL on error | 89 | * @return handle to the host, NULL on error |
90 | */ | 90 | */ |
91 | struct GNUNET_TESTBED_Host * | 91 | struct GNUNET_TESTBED_Host * |
92 | GNUNET_TESTBED_host_create(const char *hostname, | 92 | GNUNET_TESTBED_host_create (const char *hostname, |
93 | const char *username, | 93 | const char *username, |
94 | const struct GNUNET_CONFIGURATION_Handle *cfg, | 94 | const struct GNUNET_CONFIGURATION_Handle *cfg, |
95 | uint16_t port); | 95 | uint16_t port); |
96 | 96 | ||
97 | 97 | ||
98 | 98 | ||
@@ -112,12 +112,12 @@ GNUNET_TESTBED_host_create(const char *hostname, | |||
112 | * @return handle to the host, NULL on error | 112 | * @return handle to the host, NULL on error |
113 | */ | 113 | */ |
114 | struct GNUNET_TESTBED_Host * | 114 | struct GNUNET_TESTBED_Host * |
115 | GNUNET_TESTBED_host_create_with_id(uint32_t id, | 115 | GNUNET_TESTBED_host_create_with_id (uint32_t id, |
116 | const char *hostname, | 116 | const char *hostname, |
117 | const char *username, | 117 | const char *username, |
118 | const struct GNUNET_CONFIGURATION_Handle | 118 | const struct GNUNET_CONFIGURATION_Handle |
119 | *cfg, | 119 | *cfg, |
120 | uint16_t port); | 120 | uint16_t port); |
121 | 121 | ||
122 | 122 | ||
123 | /** | 123 | /** |
@@ -133,10 +133,10 @@ GNUNET_TESTBED_host_create_with_id(uint32_t id, | |||
133 | * @return number of hosts returned in 'hosts', 0 on error | 133 | * @return number of hosts returned in 'hosts', 0 on error |
134 | */ | 134 | */ |
135 | unsigned int | 135 | unsigned int |
136 | GNUNET_TESTBED_hosts_load_from_file(const char *filename, | 136 | GNUNET_TESTBED_hosts_load_from_file (const char *filename, |
137 | const struct GNUNET_CONFIGURATION_Handle | 137 | const struct GNUNET_CONFIGURATION_Handle |
138 | *cfg, | 138 | *cfg, |
139 | struct GNUNET_TESTBED_Host ***hosts); | 139 | struct GNUNET_TESTBED_Host ***hosts); |
140 | 140 | ||
141 | 141 | ||
142 | /** | 142 | /** |
@@ -152,10 +152,10 @@ GNUNET_TESTBED_hosts_load_from_file(const char *filename, | |||
152 | * @return number of hosts returned in 'hosts', 0 on error | 152 | * @return number of hosts returned in 'hosts', 0 on error |
153 | */ | 153 | */ |
154 | unsigned int | 154 | unsigned int |
155 | GNUNET_TESTBED_hosts_load_from_loadleveler(const struct | 155 | GNUNET_TESTBED_hosts_load_from_loadleveler (const struct |
156 | GNUNET_CONFIGURATION_Handle *cfg, | 156 | GNUNET_CONFIGURATION_Handle *cfg, |
157 | struct GNUNET_TESTBED_Host | 157 | struct GNUNET_TESTBED_Host |
158 | ***hosts); | 158 | ***hosts); |
159 | 159 | ||
160 | /** | 160 | /** |
161 | * Destroy a host handle. Must only be called once everything | 161 | * Destroy a host handle. Must only be called once everything |
@@ -164,7 +164,7 @@ GNUNET_TESTBED_hosts_load_from_loadleveler(const struct | |||
164 | * @param host handle to destroy | 164 | * @param host handle to destroy |
165 | */ | 165 | */ |
166 | void | 166 | void |
167 | GNUNET_TESTBED_host_destroy(struct GNUNET_TESTBED_Host *host); | 167 | GNUNET_TESTBED_host_destroy (struct GNUNET_TESTBED_Host *host); |
168 | 168 | ||
169 | 169 | ||
170 | /** | 170 | /** |
@@ -201,11 +201,11 @@ typedef void | |||
201 | * GNUNET_TESTBED_is_host_habitable_cancel() | 201 | * GNUNET_TESTBED_is_host_habitable_cancel() |
202 | */ | 202 | */ |
203 | struct GNUNET_TESTBED_HostHabitableCheckHandle * | 203 | struct GNUNET_TESTBED_HostHabitableCheckHandle * |
204 | GNUNET_TESTBED_is_host_habitable(const struct GNUNET_TESTBED_Host *host, | 204 | GNUNET_TESTBED_is_host_habitable (const struct GNUNET_TESTBED_Host *host, |
205 | const struct GNUNET_CONFIGURATION_Handle | 205 | const struct GNUNET_CONFIGURATION_Handle |
206 | *config, | 206 | *config, |
207 | GNUNET_TESTBED_HostHabitableCallback cb, | 207 | GNUNET_TESTBED_HostHabitableCallback cb, |
208 | void *cb_cls); | 208 | void *cb_cls); |
209 | 209 | ||
210 | 210 | ||
211 | /** | 211 | /** |
@@ -214,9 +214,9 @@ GNUNET_TESTBED_is_host_habitable(const struct GNUNET_TESTBED_Host *host, | |||
214 | * @param handle the habitability check handle | 214 | * @param handle the habitability check handle |
215 | */ | 215 | */ |
216 | void | 216 | void |
217 | GNUNET_TESTBED_is_host_habitable_cancel(struct | 217 | GNUNET_TESTBED_is_host_habitable_cancel (struct |
218 | GNUNET_TESTBED_HostHabitableCheckHandle | 218 | GNUNET_TESTBED_HostHabitableCheckHandle |
219 | *handle); | 219 | *handle); |
220 | 220 | ||
221 | /** | 221 | /** |
222 | * Obtain the host's hostname. | 222 | * Obtain the host's hostname. |
@@ -225,14 +225,15 @@ GNUNET_TESTBED_is_host_habitable_cancel(struct | |||
225 | * @return hostname of the host | 225 | * @return hostname of the host |
226 | */ | 226 | */ |
227 | const char * | 227 | const char * |
228 | GNUNET_TESTBED_host_get_hostname(const struct GNUNET_TESTBED_Host *host); | 228 | GNUNET_TESTBED_host_get_hostname (const struct GNUNET_TESTBED_Host *host); |
229 | 229 | ||
230 | 230 | ||
231 | /** | 231 | /** |
232 | * Enumeration with (at most 64) possible event types that | 232 | * Enumeration with (at most 64) possible event types that |
233 | * can be monitored using the testbed framework. | 233 | * can be monitored using the testbed framework. |
234 | */ | 234 | */ |
235 | enum GNUNET_TESTBED_EventType { | 235 | enum GNUNET_TESTBED_EventType |
236 | { | ||
236 | /** | 237 | /** |
237 | * A peer has been started. | 238 | * A peer has been started. |
238 | */ | 239 | */ |
@@ -263,7 +264,8 @@ enum GNUNET_TESTBED_EventType { | |||
263 | /** | 264 | /** |
264 | * Types of information that can be requested about a peer. | 265 | * Types of information that can be requested about a peer. |
265 | */ | 266 | */ |
266 | enum GNUNET_TESTBED_PeerInformationType { | 267 | enum GNUNET_TESTBED_PeerInformationType |
268 | { | ||
267 | /** | 269 | /** |
268 | * Special value (not valid for requesting information) | 270 | * Special value (not valid for requesting information) |
269 | * that is used in the event struct if a 'generic' pointer | 271 | * that is used in the event struct if a 'generic' pointer |
@@ -294,7 +296,8 @@ enum GNUNET_TESTBED_PeerInformationType { | |||
294 | * Argument to GNUNET_TESTBED_ControllerCallback with details about | 296 | * Argument to GNUNET_TESTBED_ControllerCallback with details about |
295 | * the event. | 297 | * the event. |
296 | */ | 298 | */ |
297 | struct GNUNET_TESTBED_EventInformation { | 299 | struct GNUNET_TESTBED_EventInformation |
300 | { | ||
298 | /** | 301 | /** |
299 | * Type of the event. | 302 | * Type of the event. |
300 | */ | 303 | */ |
@@ -313,11 +316,13 @@ struct GNUNET_TESTBED_EventInformation { | |||
313 | /** | 316 | /** |
314 | * Details about the event. | 317 | * Details about the event. |
315 | */ | 318 | */ |
316 | union { | 319 | union |
320 | { | ||
317 | /** | 321 | /** |
318 | * Details about peer start event. | 322 | * Details about peer start event. |
319 | */ | 323 | */ |
320 | struct { | 324 | struct |
325 | { | ||
321 | /** | 326 | /** |
322 | * Handle for the host where the peer | 327 | * Handle for the host where the peer |
323 | * was started. | 328 | * was started. |
@@ -333,7 +338,8 @@ struct GNUNET_TESTBED_EventInformation { | |||
333 | /** | 338 | /** |
334 | * Details about peer stop event. | 339 | * Details about peer stop event. |
335 | */ | 340 | */ |
336 | struct { | 341 | struct |
342 | { | ||
337 | /** | 343 | /** |
338 | * Handle for the peer that was started. | 344 | * Handle for the peer that was started. |
339 | */ | 345 | */ |
@@ -343,7 +349,8 @@ struct GNUNET_TESTBED_EventInformation { | |||
343 | /** | 349 | /** |
344 | * Details about connect event. | 350 | * Details about connect event. |
345 | */ | 351 | */ |
346 | struct { | 352 | struct |
353 | { | ||
347 | /** | 354 | /** |
348 | * Handle for one of the connected peers. | 355 | * Handle for one of the connected peers. |
349 | */ | 356 | */ |
@@ -358,7 +365,8 @@ struct GNUNET_TESTBED_EventInformation { | |||
358 | /** | 365 | /** |
359 | * Details about disconnect event. | 366 | * Details about disconnect event. |
360 | */ | 367 | */ |
361 | struct { | 368 | struct |
369 | { | ||
362 | /** | 370 | /** |
363 | * Handle for one of the disconnected peers. | 371 | * Handle for one of the disconnected peers. |
364 | */ | 372 | */ |
@@ -373,7 +381,8 @@ struct GNUNET_TESTBED_EventInformation { | |||
373 | /** | 381 | /** |
374 | * Details about an operation finished event. | 382 | * Details about an operation finished event. |
375 | */ | 383 | */ |
376 | struct { | 384 | struct |
385 | { | ||
377 | /** | 386 | /** |
378 | * Error message for the operation, NULL on success. | 387 | * Error message for the operation, NULL on success. |
379 | */ | 388 | */ |
@@ -398,7 +407,8 @@ struct GNUNET_TESTBED_EventInformation { | |||
398 | */ | 407 | */ |
399 | typedef void | 408 | typedef void |
400 | (*GNUNET_TESTBED_ControllerCallback)(void *cls, | 409 | (*GNUNET_TESTBED_ControllerCallback)(void *cls, |
401 | const struct GNUNET_TESTBED_EventInformation *event); | 410 | const struct |
411 | GNUNET_TESTBED_EventInformation *event); | ||
402 | 412 | ||
403 | 413 | ||
404 | /** | 414 | /** |
@@ -418,7 +428,8 @@ struct GNUNET_TESTBED_ControllerProc; | |||
418 | */ | 428 | */ |
419 | typedef void | 429 | typedef void |
420 | (*GNUNET_TESTBED_ControllerStatusCallback) (void *cls, | 430 | (*GNUNET_TESTBED_ControllerStatusCallback) (void *cls, |
421 | const struct GNUNET_CONFIGURATION_Handle *cfg, | 431 | const struct |
432 | GNUNET_CONFIGURATION_Handle *cfg, | ||
422 | int status); | 433 | int status); |
423 | 434 | ||
424 | 435 | ||
@@ -446,10 +457,10 @@ typedef void | |||
446 | * @return the controller process handle, NULL on errors | 457 | * @return the controller process handle, NULL on errors |
447 | */ | 458 | */ |
448 | struct GNUNET_TESTBED_ControllerProc * | 459 | struct GNUNET_TESTBED_ControllerProc * |
449 | GNUNET_TESTBED_controller_start(const char *trusted_ip, | 460 | GNUNET_TESTBED_controller_start (const char *trusted_ip, |
450 | struct GNUNET_TESTBED_Host *host, | 461 | struct GNUNET_TESTBED_Host *host, |
451 | GNUNET_TESTBED_ControllerStatusCallback cb, | 462 | GNUNET_TESTBED_ControllerStatusCallback cb, |
452 | void *cls); | 463 | void *cls); |
453 | 464 | ||
454 | 465 | ||
455 | /** | 466 | /** |
@@ -461,7 +472,7 @@ GNUNET_TESTBED_controller_start(const char *trusted_ip, | |||
461 | * @param cproc the controller process handle | 472 | * @param cproc the controller process handle |
462 | */ | 473 | */ |
463 | void | 474 | void |
464 | GNUNET_TESTBED_controller_stop(struct GNUNET_TESTBED_ControllerProc *cproc); | 475 | GNUNET_TESTBED_controller_stop (struct GNUNET_TESTBED_ControllerProc *cproc); |
465 | 476 | ||
466 | 477 | ||
467 | /** | 478 | /** |
@@ -481,10 +492,10 @@ GNUNET_TESTBED_controller_stop(struct GNUNET_TESTBED_ControllerProc *cproc); | |||
481 | * @return handle to the controller | 492 | * @return handle to the controller |
482 | */ | 493 | */ |
483 | struct GNUNET_TESTBED_Controller * | 494 | struct GNUNET_TESTBED_Controller * |
484 | GNUNET_TESTBED_controller_connect(struct GNUNET_TESTBED_Host *host, | 495 | GNUNET_TESTBED_controller_connect (struct GNUNET_TESTBED_Host *host, |
485 | uint64_t event_mask, | 496 | uint64_t event_mask, |
486 | GNUNET_TESTBED_ControllerCallback cc, | 497 | GNUNET_TESTBED_ControllerCallback cc, |
487 | void *cc_cls); | 498 | void *cc_cls); |
488 | 499 | ||
489 | 500 | ||
490 | /** | 501 | /** |
@@ -495,7 +506,7 @@ GNUNET_TESTBED_controller_connect(struct GNUNET_TESTBED_Host *host, | |||
495 | * @param c handle to controller to stop | 506 | * @param c handle to controller to stop |
496 | */ | 507 | */ |
497 | void | 508 | void |
498 | GNUNET_TESTBED_controller_disconnect(struct GNUNET_TESTBED_Controller *c); | 509 | GNUNET_TESTBED_controller_disconnect (struct GNUNET_TESTBED_Controller *c); |
499 | 510 | ||
500 | 511 | ||
501 | /** | 512 | /** |
@@ -511,8 +522,8 @@ struct GNUNET_TESTBED_HostRegistrationHandle; | |||
511 | * @param emsg the error message; NULL if host registration is successful | 522 | * @param emsg the error message; NULL if host registration is successful |
512 | */ | 523 | */ |
513 | typedef void | 524 | typedef void |
514 | (* GNUNET_TESTBED_HostRegistrationCompletion) (void *cls, | 525 | (*GNUNET_TESTBED_HostRegistrationCompletion) (void *cls, |
515 | const char *emsg); | 526 | const char *emsg); |
516 | 527 | ||
517 | 528 | ||
518 | /** | 529 | /** |
@@ -531,10 +542,10 @@ typedef void | |||
531 | * is not cancelled | 542 | * is not cancelled |
532 | */ | 543 | */ |
533 | struct GNUNET_TESTBED_HostRegistrationHandle * | 544 | struct GNUNET_TESTBED_HostRegistrationHandle * |
534 | GNUNET_TESTBED_register_host(struct GNUNET_TESTBED_Controller *controller, | 545 | GNUNET_TESTBED_register_host (struct GNUNET_TESTBED_Controller *controller, |
535 | struct GNUNET_TESTBED_Host *host, | 546 | struct GNUNET_TESTBED_Host *host, |
536 | GNUNET_TESTBED_HostRegistrationCompletion cc, | 547 | GNUNET_TESTBED_HostRegistrationCompletion cc, |
537 | void *cc_cls); | 548 | void *cc_cls); |
538 | 549 | ||
539 | 550 | ||
540 | /** | 551 | /** |
@@ -547,8 +558,8 @@ GNUNET_TESTBED_register_host(struct GNUNET_TESTBED_Controller *controller, | |||
547 | * @param handle the registration handle to cancel | 558 | * @param handle the registration handle to cancel |
548 | */ | 559 | */ |
549 | void | 560 | void |
550 | GNUNET_TESTBED_cancel_registration(struct GNUNET_TESTBED_HostRegistrationHandle | 561 | GNUNET_TESTBED_cancel_registration (struct GNUNET_TESTBED_HostRegistrationHandle |
551 | *handle); | 562 | *handle); |
552 | 563 | ||
553 | 564 | ||
554 | /** | 565 | /** |
@@ -561,7 +572,8 @@ GNUNET_TESTBED_cancel_registration(struct GNUNET_TESTBED_HostRegistrationHandle | |||
561 | */ | 572 | */ |
562 | typedef void | 573 | typedef void |
563 | (*GNUNET_TESTBED_OperationCompletionCallback) (void *cls, | 574 | (*GNUNET_TESTBED_OperationCompletionCallback) (void *cls, |
564 | struct GNUNET_TESTBED_Operation *op, | 575 | struct GNUNET_TESTBED_Operation * |
576 | op, | ||
565 | const char *emsg); | 577 | const char *emsg); |
566 | 578 | ||
567 | 579 | ||
@@ -594,11 +606,11 @@ typedef void | |||
594 | * @return the operation handle | 606 | * @return the operation handle |
595 | */ | 607 | */ |
596 | struct GNUNET_TESTBED_Operation * | 608 | struct GNUNET_TESTBED_Operation * |
597 | GNUNET_TESTBED_controller_link(void *op_cls, | 609 | GNUNET_TESTBED_controller_link (void *op_cls, |
598 | struct GNUNET_TESTBED_Controller *master, | 610 | struct GNUNET_TESTBED_Controller *master, |
599 | struct GNUNET_TESTBED_Host *delegated_host, | 611 | struct GNUNET_TESTBED_Host *delegated_host, |
600 | struct GNUNET_TESTBED_Host *slave_host, | 612 | struct GNUNET_TESTBED_Host *slave_host, |
601 | int is_subordinate); | 613 | int is_subordinate); |
602 | 614 | ||
603 | 615 | ||
604 | /** | 616 | /** |
@@ -617,9 +629,9 @@ GNUNET_TESTBED_controller_link(void *op_cls, | |||
617 | * master | 629 | * master |
618 | */ | 630 | */ |
619 | struct GNUNET_TESTBED_Operation * | 631 | struct GNUNET_TESTBED_Operation * |
620 | GNUNET_TESTBED_get_slave_config(void *op_cls, | 632 | GNUNET_TESTBED_get_slave_config (void *op_cls, |
621 | struct GNUNET_TESTBED_Controller *master, | 633 | struct GNUNET_TESTBED_Controller *master, |
622 | struct GNUNET_TESTBED_Host *slave_host); | 634 | struct GNUNET_TESTBED_Host *slave_host); |
623 | 635 | ||
624 | 636 | ||
625 | /** | 637 | /** |
@@ -667,11 +679,11 @@ typedef void | |||
667 | * @return the operation handle | 679 | * @return the operation handle |
668 | */ | 680 | */ |
669 | struct GNUNET_TESTBED_Operation * | 681 | struct GNUNET_TESTBED_Operation * |
670 | GNUNET_TESTBED_peer_create(struct GNUNET_TESTBED_Controller *controller, | 682 | GNUNET_TESTBED_peer_create (struct GNUNET_TESTBED_Controller *controller, |
671 | struct GNUNET_TESTBED_Host *host, | 683 | struct GNUNET_TESTBED_Host *host, |
672 | const struct GNUNET_CONFIGURATION_Handle *cfg, | 684 | const struct GNUNET_CONFIGURATION_Handle *cfg, |
673 | GNUNET_TESTBED_PeerCreateCallback cb, | 685 | GNUNET_TESTBED_PeerCreateCallback cb, |
674 | void *cls); | 686 | void *cls); |
675 | 687 | ||
676 | 688 | ||
677 | /** | 689 | /** |
@@ -697,10 +709,10 @@ typedef void | |||
697 | * @return handle to the operation | 709 | * @return handle to the operation |
698 | */ | 710 | */ |
699 | struct GNUNET_TESTBED_Operation * | 711 | struct GNUNET_TESTBED_Operation * |
700 | GNUNET_TESTBED_peer_start(void *op_cls, | 712 | GNUNET_TESTBED_peer_start (void *op_cls, |
701 | struct GNUNET_TESTBED_Peer *peer, | 713 | struct GNUNET_TESTBED_Peer *peer, |
702 | GNUNET_TESTBED_PeerChurnCallback pcc, | 714 | GNUNET_TESTBED_PeerChurnCallback pcc, |
703 | void *pcc_cls); | 715 | void *pcc_cls); |
704 | 716 | ||
705 | 717 | ||
706 | /** | 718 | /** |
@@ -716,16 +728,17 @@ GNUNET_TESTBED_peer_start(void *op_cls, | |||
716 | * @return handle to the operation | 728 | * @return handle to the operation |
717 | */ | 729 | */ |
718 | struct GNUNET_TESTBED_Operation * | 730 | struct GNUNET_TESTBED_Operation * |
719 | GNUNET_TESTBED_peer_stop(void *op_cls, | 731 | GNUNET_TESTBED_peer_stop (void *op_cls, |
720 | struct GNUNET_TESTBED_Peer *peer, | 732 | struct GNUNET_TESTBED_Peer *peer, |
721 | GNUNET_TESTBED_PeerChurnCallback pcc, | 733 | GNUNET_TESTBED_PeerChurnCallback pcc, |
722 | void *pcc_cls); | 734 | void *pcc_cls); |
723 | 735 | ||
724 | 736 | ||
725 | /** | 737 | /** |
726 | * Data returned from GNUNET_TESTBED_peer_get_information | 738 | * Data returned from GNUNET_TESTBED_peer_get_information |
727 | */ | 739 | */ |
728 | struct GNUNET_TESTBED_PeerInformation { | 740 | struct GNUNET_TESTBED_PeerInformation |
741 | { | ||
729 | /** | 742 | /** |
730 | * Peer information type; captures which of the types | 743 | * Peer information type; captures which of the types |
731 | * in the 'op_result' is actually in use. | 744 | * in the 'op_result' is actually in use. |
@@ -735,7 +748,8 @@ struct GNUNET_TESTBED_PeerInformation { | |||
735 | /** | 748 | /** |
736 | * The result of the get information operation; Choose according to the pit | 749 | * The result of the get information operation; Choose according to the pit |
737 | */ | 750 | */ |
738 | union { | 751 | union |
752 | { | ||
739 | /** | 753 | /** |
740 | * The configuration of the peer | 754 | * The configuration of the peer |
741 | */ | 755 | */ |
@@ -762,7 +776,8 @@ struct GNUNET_TESTBED_PeerInformation { | |||
762 | typedef void | 776 | typedef void |
763 | (*GNUNET_TESTBED_PeerInfoCallback) (void *cb_cls, | 777 | (*GNUNET_TESTBED_PeerInfoCallback) (void *cb_cls, |
764 | struct GNUNET_TESTBED_Operation *op, | 778 | struct GNUNET_TESTBED_Operation *op, |
765 | const struct GNUNET_TESTBED_PeerInformation *pinfo, | 779 | const struct |
780 | GNUNET_TESTBED_PeerInformation *pinfo, | ||
766 | const char *emsg); | 781 | const char *emsg); |
767 | 782 | ||
768 | 783 | ||
@@ -781,11 +796,11 @@ typedef void | |||
781 | * @return handle to the operation | 796 | * @return handle to the operation |
782 | */ | 797 | */ |
783 | struct GNUNET_TESTBED_Operation * | 798 | struct GNUNET_TESTBED_Operation * |
784 | GNUNET_TESTBED_peer_get_information(struct GNUNET_TESTBED_Peer *peer, | 799 | GNUNET_TESTBED_peer_get_information (struct GNUNET_TESTBED_Peer *peer, |
785 | enum GNUNET_TESTBED_PeerInformationType | 800 | enum GNUNET_TESTBED_PeerInformationType |
786 | pit, | 801 | pit, |
787 | GNUNET_TESTBED_PeerInfoCallback cb, | 802 | GNUNET_TESTBED_PeerInfoCallback cb, |
788 | void *cb_cls); | 803 | void *cb_cls); |
789 | 804 | ||
790 | 805 | ||
791 | /** | 806 | /** |
@@ -797,8 +812,9 @@ GNUNET_TESTBED_peer_get_information(struct GNUNET_TESTBED_Peer *peer, | |||
797 | * @return handle to the operation | 812 | * @return handle to the operation |
798 | */ | 813 | */ |
799 | struct GNUNET_TESTBED_Operation * | 814 | struct GNUNET_TESTBED_Operation * |
800 | GNUNET_TESTBED_peer_update_configuration(struct GNUNET_TESTBED_Peer *peer, | 815 | GNUNET_TESTBED_peer_update_configuration (struct GNUNET_TESTBED_Peer *peer, |
801 | const struct GNUNET_CONFIGURATION_Handle *cfg); | 816 | const struct |
817 | GNUNET_CONFIGURATION_Handle *cfg); | ||
802 | 818 | ||
803 | 819 | ||
804 | /** | 820 | /** |
@@ -809,7 +825,7 @@ GNUNET_TESTBED_peer_update_configuration(struct GNUNET_TESTBED_Peer *peer, | |||
809 | * @return handle to the operation | 825 | * @return handle to the operation |
810 | */ | 826 | */ |
811 | struct GNUNET_TESTBED_Operation * | 827 | struct GNUNET_TESTBED_Operation * |
812 | GNUNET_TESTBED_peer_destroy(struct GNUNET_TESTBED_Peer *peer); | 828 | GNUNET_TESTBED_peer_destroy (struct GNUNET_TESTBED_Peer *peer); |
813 | 829 | ||
814 | 830 | ||
815 | /** | 831 | /** |
@@ -828,12 +844,13 @@ GNUNET_TESTBED_peer_destroy(struct GNUNET_TESTBED_Peer *peer); | |||
828 | * @return an operation handle; NULL upon error (peer not running) | 844 | * @return an operation handle; NULL upon error (peer not running) |
829 | */ | 845 | */ |
830 | struct GNUNET_TESTBED_Operation * | 846 | struct GNUNET_TESTBED_Operation * |
831 | GNUNET_TESTBED_peer_manage_service(void *op_cls, | 847 | GNUNET_TESTBED_peer_manage_service (void *op_cls, |
832 | struct GNUNET_TESTBED_Peer *peer, | 848 | struct GNUNET_TESTBED_Peer *peer, |
833 | const char *service_name, | 849 | const char *service_name, |
834 | GNUNET_TESTBED_OperationCompletionCallback cb, | 850 | GNUNET_TESTBED_OperationCompletionCallback |
835 | void *cb_cls, | 851 | cb, |
836 | unsigned int start); | 852 | void *cb_cls, |
853 | unsigned int start); | ||
837 | 854 | ||
838 | 855 | ||
839 | /** | 856 | /** |
@@ -852,17 +869,18 @@ GNUNET_TESTBED_peer_manage_service(void *op_cls, | |||
852 | * present | 869 | * present |
853 | */ | 870 | */ |
854 | struct GNUNET_TESTBED_Operation * | 871 | struct GNUNET_TESTBED_Operation * |
855 | GNUNET_TESTBED_shutdown_peers(struct GNUNET_TESTBED_Controller *c, | 872 | GNUNET_TESTBED_shutdown_peers (struct GNUNET_TESTBED_Controller *c, |
856 | void *op_cls, | 873 | void *op_cls, |
857 | GNUNET_TESTBED_OperationCompletionCallback cb, | 874 | GNUNET_TESTBED_OperationCompletionCallback cb, |
858 | void *cb_cls); | 875 | void *cb_cls); |
859 | 876 | ||
860 | 877 | ||
861 | 878 | ||
862 | /** | 879 | /** |
863 | * Options for peer connections. | 880 | * Options for peer connections. |
864 | */ | 881 | */ |
865 | enum GNUNET_TESTBED_ConnectOption { | 882 | enum GNUNET_TESTBED_ConnectOption |
883 | { | ||
866 | /** | 884 | /** |
867 | * No option (not valid as an argument). | 885 | * No option (not valid as an argument). |
868 | */ | 886 | */ |
@@ -898,11 +916,11 @@ enum GNUNET_TESTBED_ConnectOption { | |||
898 | * time is not allowed | 916 | * time is not allowed |
899 | */ | 917 | */ |
900 | struct GNUNET_TESTBED_Operation * | 918 | struct GNUNET_TESTBED_Operation * |
901 | GNUNET_TESTBED_underlay_configure_link_va(void *op_cls, | 919 | GNUNET_TESTBED_underlay_configure_link_va (void *op_cls, |
902 | struct GNUNET_TESTBED_Peer *p1, | 920 | struct GNUNET_TESTBED_Peer *p1, |
903 | struct GNUNET_TESTBED_Peer *p2, | 921 | struct GNUNET_TESTBED_Peer *p2, |
904 | enum GNUNET_TESTBED_ConnectOption co, | 922 | enum GNUNET_TESTBED_ConnectOption co, |
905 | va_list ap); | 923 | va_list ap); |
906 | 924 | ||
907 | 925 | ||
908 | /** | 926 | /** |
@@ -918,10 +936,11 @@ GNUNET_TESTBED_underlay_configure_link_va(void *op_cls, | |||
918 | * time is not allowed | 936 | * time is not allowed |
919 | */ | 937 | */ |
920 | struct GNUNET_TESTBED_Operation * | 938 | struct GNUNET_TESTBED_Operation * |
921 | GNUNET_TESTBED_underlay_configure_link(void *op_cls, | 939 | GNUNET_TESTBED_underlay_configure_link (void *op_cls, |
922 | struct GNUNET_TESTBED_Peer *p1, | 940 | struct GNUNET_TESTBED_Peer *p1, |
923 | struct GNUNET_TESTBED_Peer *p2, | 941 | struct GNUNET_TESTBED_Peer *p2, |
924 | enum GNUNET_TESTBED_ConnectOption co, ...); | 942 | enum GNUNET_TESTBED_ConnectOption co, |
943 | ...); | ||
925 | 944 | ||
926 | 945 | ||
927 | 946 | ||
@@ -929,7 +948,8 @@ GNUNET_TESTBED_underlay_configure_link(void *op_cls, | |||
929 | * Topologies and topology options supported for testbeds. Options should always | 948 | * Topologies and topology options supported for testbeds. Options should always |
930 | * end with #GNUNET_TESTBED_TOPOLOGY_OPTION_END | 949 | * end with #GNUNET_TESTBED_TOPOLOGY_OPTION_END |
931 | */ | 950 | */ |
932 | enum GNUNET_TESTBED_TopologyOption { | 951 | enum GNUNET_TESTBED_TopologyOption |
952 | { | ||
933 | /** | 953 | /** |
934 | * A clique (everyone connected to everyone else). No options. If there are N | 954 | * A clique (everyone connected to everyone else). No options. If there are N |
935 | * peers this topology results in (N * (N -1)) connections. | 955 | * peers this topology results in (N * (N -1)) connections. |
@@ -1036,11 +1056,14 @@ enum GNUNET_TESTBED_TopologyOption { | |||
1036 | * is not allowed at this time | 1056 | * is not allowed at this time |
1037 | */ | 1057 | */ |
1038 | struct GNUNET_TESTBED_Operation * | 1058 | struct GNUNET_TESTBED_Operation * |
1039 | GNUNET_TESTBED_underlay_configure_topology_va(void *op_cls, | 1059 | GNUNET_TESTBED_underlay_configure_topology_va (void *op_cls, |
1040 | unsigned int num_peers, | 1060 | unsigned int num_peers, |
1041 | struct GNUNET_TESTBED_Peer **peers, | 1061 | struct GNUNET_TESTBED_Peer ** |
1042 | enum GNUNET_TESTBED_TopologyOption topo, | 1062 | peers, |
1043 | va_list ap); | 1063 | enum |
1064 | GNUNET_TESTBED_TopologyOption | ||
1065 | topo, | ||
1066 | va_list ap); | ||
1044 | 1067 | ||
1045 | 1068 | ||
1046 | /** | 1069 | /** |
@@ -1055,11 +1078,12 @@ GNUNET_TESTBED_underlay_configure_topology_va(void *op_cls, | |||
1055 | * is not allowed at this time | 1078 | * is not allowed at this time |
1056 | */ | 1079 | */ |
1057 | struct GNUNET_TESTBED_Operation * | 1080 | struct GNUNET_TESTBED_Operation * |
1058 | GNUNET_TESTBED_underlay_configure_topology(void *op_cls, | 1081 | GNUNET_TESTBED_underlay_configure_topology (void *op_cls, |
1059 | unsigned int num_peers, | 1082 | unsigned int num_peers, |
1060 | struct GNUNET_TESTBED_Peer **peers, | 1083 | struct GNUNET_TESTBED_Peer **peers, |
1061 | enum GNUNET_TESTBED_TopologyOption topo, | 1084 | enum GNUNET_TESTBED_TopologyOption |
1062 | ...); | 1085 | topo, |
1086 | ...); | ||
1063 | 1087 | ||
1064 | 1088 | ||
1065 | /** | 1089 | /** |
@@ -1077,11 +1101,11 @@ GNUNET_TESTBED_underlay_configure_topology(void *op_cls, | |||
1077 | * not running or underlay disallows) | 1101 | * not running or underlay disallows) |
1078 | */ | 1102 | */ |
1079 | struct GNUNET_TESTBED_Operation * | 1103 | struct GNUNET_TESTBED_Operation * |
1080 | GNUNET_TESTBED_overlay_connect(void *op_cls, | 1104 | GNUNET_TESTBED_overlay_connect (void *op_cls, |
1081 | GNUNET_TESTBED_OperationCompletionCallback cb, | 1105 | GNUNET_TESTBED_OperationCompletionCallback cb, |
1082 | void *cb_cls, | 1106 | void *cb_cls, |
1083 | struct GNUNET_TESTBED_Peer *p1, | 1107 | struct GNUNET_TESTBED_Peer *p1, |
1084 | struct GNUNET_TESTBED_Peer *p2); | 1108 | struct GNUNET_TESTBED_Peer *p2); |
1085 | 1109 | ||
1086 | 1110 | ||
1087 | /** | 1111 | /** |
@@ -1094,8 +1118,10 @@ GNUNET_TESTBED_overlay_connect(void *op_cls, | |||
1094 | * @param nfailures the number of overlay connects which failed | 1118 | * @param nfailures the number of overlay connects which failed |
1095 | */ | 1119 | */ |
1096 | typedef void (*GNUNET_TESTBED_TopologyCompletionCallback) (void *cls, | 1120 | typedef void (*GNUNET_TESTBED_TopologyCompletionCallback) (void *cls, |
1097 | unsigned int nsuccess, | 1121 | unsigned int |
1098 | unsigned int nfailures); | 1122 | nsuccess, |
1123 | unsigned int | ||
1124 | nfailures); | ||
1099 | 1125 | ||
1100 | 1126 | ||
1101 | /** | 1127 | /** |
@@ -1119,15 +1145,16 @@ typedef void (*GNUNET_TESTBED_TopologyCompletionCallback) (void *cls, | |||
1119 | * not running or underlay disallows) or if num_peers is less than 2 | 1145 | * not running or underlay disallows) or if num_peers is less than 2 |
1120 | */ | 1146 | */ |
1121 | struct GNUNET_TESTBED_Operation * | 1147 | struct GNUNET_TESTBED_Operation * |
1122 | GNUNET_TESTBED_overlay_configure_topology_va(void *op_cls, | 1148 | GNUNET_TESTBED_overlay_configure_topology_va (void *op_cls, |
1123 | unsigned int num_peers, | 1149 | unsigned int num_peers, |
1124 | struct GNUNET_TESTBED_Peer **peers, | 1150 | struct GNUNET_TESTBED_Peer **peers, |
1125 | unsigned int *max_connections, | 1151 | unsigned int *max_connections, |
1126 | GNUNET_TESTBED_TopologyCompletionCallback | 1152 | GNUNET_TESTBED_TopologyCompletionCallback |
1127 | comp_cb, | 1153 | comp_cb, |
1128 | void *comp_cb_cls, | 1154 | void *comp_cb_cls, |
1129 | enum GNUNET_TESTBED_TopologyOption topo, | 1155 | enum GNUNET_TESTBED_TopologyOption |
1130 | va_list va); | 1156 | topo, |
1157 | va_list va); | ||
1131 | 1158 | ||
1132 | 1159 | ||
1133 | /** | 1160 | /** |
@@ -1151,15 +1178,16 @@ GNUNET_TESTBED_overlay_configure_topology_va(void *op_cls, | |||
1151 | * not running or underlay disallows) or if num_peers is less than 2 | 1178 | * not running or underlay disallows) or if num_peers is less than 2 |
1152 | */ | 1179 | */ |
1153 | struct GNUNET_TESTBED_Operation * | 1180 | struct GNUNET_TESTBED_Operation * |
1154 | GNUNET_TESTBED_overlay_configure_topology(void *op_cls, | 1181 | GNUNET_TESTBED_overlay_configure_topology (void *op_cls, |
1155 | unsigned int num_peers, | 1182 | unsigned int num_peers, |
1156 | struct GNUNET_TESTBED_Peer **peers, | 1183 | struct GNUNET_TESTBED_Peer **peers, |
1157 | unsigned int *max_connections, | 1184 | unsigned int *max_connections, |
1158 | GNUNET_TESTBED_TopologyCompletionCallback | 1185 | GNUNET_TESTBED_TopologyCompletionCallback |
1159 | comp_cb, | 1186 | comp_cb, |
1160 | void *comp_cb_cls, | 1187 | void *comp_cb_cls, |
1161 | enum GNUNET_TESTBED_TopologyOption topo, | 1188 | enum GNUNET_TESTBED_TopologyOption |
1162 | ...); | 1189 | topo, |
1190 | ...); | ||
1163 | 1191 | ||
1164 | 1192 | ||
1165 | /** | 1193 | /** |
@@ -1173,8 +1201,10 @@ GNUNET_TESTBED_overlay_configure_topology(void *op_cls, | |||
1173 | * be written to. | 1201 | * be written to. |
1174 | */ | 1202 | */ |
1175 | void | 1203 | void |
1176 | GNUNET_TESTBED_overlay_write_topology_to_file(struct GNUNET_TESTBED_Controller *controller, | 1204 | GNUNET_TESTBED_overlay_write_topology_to_file (struct |
1177 | const char *filename); | 1205 | GNUNET_TESTBED_Controller * |
1206 | controller, | ||
1207 | const char *filename); | ||
1178 | 1208 | ||
1179 | 1209 | ||
1180 | /** | 1210 | /** |
@@ -1215,7 +1245,8 @@ typedef void | |||
1215 | */ | 1245 | */ |
1216 | typedef void | 1246 | typedef void |
1217 | (*GNUNET_TESTBED_ServiceConnectCompletionCallback) (void *cls, | 1247 | (*GNUNET_TESTBED_ServiceConnectCompletionCallback) (void *cls, |
1218 | struct GNUNET_TESTBED_Operation *op, | 1248 | struct |
1249 | GNUNET_TESTBED_Operation *op, | ||
1219 | void *ca_result, | 1250 | void *ca_result, |
1220 | const char *emsg); | 1251 | const char *emsg); |
1221 | 1252 | ||
@@ -1243,14 +1274,15 @@ typedef void | |||
1243 | * @return handle for the operation | 1274 | * @return handle for the operation |
1244 | */ | 1275 | */ |
1245 | struct GNUNET_TESTBED_Operation * | 1276 | struct GNUNET_TESTBED_Operation * |
1246 | GNUNET_TESTBED_service_connect(void *op_cls, | 1277 | GNUNET_TESTBED_service_connect (void *op_cls, |
1247 | struct GNUNET_TESTBED_Peer *peer, | 1278 | struct GNUNET_TESTBED_Peer *peer, |
1248 | const char *service_name, | 1279 | const char *service_name, |
1249 | GNUNET_TESTBED_ServiceConnectCompletionCallback cb, | 1280 | GNUNET_TESTBED_ServiceConnectCompletionCallback |
1250 | void *cb_cls, | 1281 | cb, |
1251 | GNUNET_TESTBED_ConnectAdapter ca, | 1282 | void *cb_cls, |
1252 | GNUNET_TESTBED_DisconnectAdapter da, | 1283 | GNUNET_TESTBED_ConnectAdapter ca, |
1253 | void *cada_cls); | 1284 | GNUNET_TESTBED_DisconnectAdapter da, |
1285 | void *cada_cls); | ||
1254 | 1286 | ||
1255 | 1287 | ||
1256 | /** | 1288 | /** |
@@ -1275,7 +1307,7 @@ GNUNET_TESTBED_service_connect(void *op_cls, | |||
1275 | * @param operation operation to signal completion or cancellation | 1307 | * @param operation operation to signal completion or cancellation |
1276 | */ | 1308 | */ |
1277 | void | 1309 | void |
1278 | GNUNET_TESTBED_operation_done(struct GNUNET_TESTBED_Operation *operation); | 1310 | GNUNET_TESTBED_operation_done (struct GNUNET_TESTBED_Operation *operation); |
1279 | 1311 | ||
1280 | 1312 | ||
1281 | /** | 1313 | /** |
@@ -1314,12 +1346,12 @@ typedef int | |||
1314 | * @return operation handle to cancel the operation | 1346 | * @return operation handle to cancel the operation |
1315 | */ | 1347 | */ |
1316 | struct GNUNET_TESTBED_Operation * | 1348 | struct GNUNET_TESTBED_Operation * |
1317 | GNUNET_TESTBED_get_statistics(unsigned int num_peers, | 1349 | GNUNET_TESTBED_get_statistics (unsigned int num_peers, |
1318 | struct GNUNET_TESTBED_Peer **peers, | 1350 | struct GNUNET_TESTBED_Peer **peers, |
1319 | const char *subsystem, const char *name, | 1351 | const char *subsystem, const char *name, |
1320 | GNUNET_TESTBED_StatisticsIterator proc, | 1352 | GNUNET_TESTBED_StatisticsIterator proc, |
1321 | GNUNET_TESTBED_OperationCompletionCallback cont, | 1353 | GNUNET_TESTBED_OperationCompletionCallback cont, |
1322 | void *cls); | 1354 | void *cls); |
1323 | 1355 | ||
1324 | 1356 | ||
1325 | /** | 1357 | /** |
@@ -1331,7 +1363,7 @@ GNUNET_TESTBED_get_statistics(unsigned int num_peers, | |||
1331 | * @return The peer's unique ID. | 1363 | * @return The peer's unique ID. |
1332 | */ | 1364 | */ |
1333 | uint32_t | 1365 | uint32_t |
1334 | GNUNET_TESTBED_get_index(const struct GNUNET_TESTBED_Peer *peer); | 1366 | GNUNET_TESTBED_get_index (const struct GNUNET_TESTBED_Peer *peer); |
1335 | 1367 | ||
1336 | 1368 | ||
1337 | /** | 1369 | /** |
@@ -1397,14 +1429,14 @@ typedef void | |||
1397 | * @param test_master_cls closure for 'test_master'. | 1429 | * @param test_master_cls closure for 'test_master'. |
1398 | */ | 1430 | */ |
1399 | void | 1431 | void |
1400 | GNUNET_TESTBED_run(const char *host_filename, | 1432 | GNUNET_TESTBED_run (const char *host_filename, |
1401 | const struct GNUNET_CONFIGURATION_Handle *cfg, | 1433 | const struct GNUNET_CONFIGURATION_Handle *cfg, |
1402 | unsigned int num_peers, | 1434 | unsigned int num_peers, |
1403 | uint64_t event_mask, | 1435 | uint64_t event_mask, |
1404 | GNUNET_TESTBED_ControllerCallback cc, | 1436 | GNUNET_TESTBED_ControllerCallback cc, |
1405 | void *cc_cls, | 1437 | void *cc_cls, |
1406 | GNUNET_TESTBED_TestMaster test_master, | 1438 | GNUNET_TESTBED_TestMaster test_master, |
1407 | void *test_master_cls); | 1439 | void *test_master_cls); |
1408 | 1440 | ||
1409 | 1441 | ||
1410 | /** | 1442 | /** |
@@ -1446,14 +1478,14 @@ GNUNET_TESTBED_run(const char *host_filename, | |||
1446 | * @return #GNUNET_SYSERR on error, #GNUNET_OK on success | 1478 | * @return #GNUNET_SYSERR on error, #GNUNET_OK on success |
1447 | */ | 1479 | */ |
1448 | int | 1480 | int |
1449 | GNUNET_TESTBED_test_run(const char *testname, | 1481 | GNUNET_TESTBED_test_run (const char *testname, |
1450 | const char *cfg_filename, | 1482 | const char *cfg_filename, |
1451 | unsigned int num_peers, | 1483 | unsigned int num_peers, |
1452 | uint64_t event_mask, | 1484 | uint64_t event_mask, |
1453 | GNUNET_TESTBED_ControllerCallback cc, | 1485 | GNUNET_TESTBED_ControllerCallback cc, |
1454 | void *cc_cls, | 1486 | void *cc_cls, |
1455 | GNUNET_TESTBED_TestMaster test_master, | 1487 | GNUNET_TESTBED_TestMaster test_master, |
1456 | void *test_master_cls); | 1488 | void *test_master_cls); |
1457 | 1489 | ||
1458 | 1490 | ||
1459 | /** | 1491 | /** |
@@ -1464,7 +1496,7 @@ GNUNET_TESTBED_test_run(const char *testname, | |||
1464 | * @return handle to the master controller | 1496 | * @return handle to the master controller |
1465 | */ | 1497 | */ |
1466 | struct GNUNET_TESTBED_Controller * | 1498 | struct GNUNET_TESTBED_Controller * |
1467 | GNUNET_TESTBED_run_get_controller_handle(struct GNUNET_TESTBED_RunHandle *h); | 1499 | GNUNET_TESTBED_run_get_controller_handle (struct GNUNET_TESTBED_RunHandle *h); |
1468 | 1500 | ||
1469 | 1501 | ||
1470 | /** | 1502 | /** |
@@ -1476,7 +1508,8 @@ struct GNUNET_TESTBED_Barrier; | |||
1476 | /** | 1508 | /** |
1477 | * Status of a barrier | 1509 | * Status of a barrier |
1478 | */ | 1510 | */ |
1479 | enum GNUNET_TESTBED_BarrierStatus { | 1511 | enum GNUNET_TESTBED_BarrierStatus |
1512 | { | ||
1480 | /** | 1513 | /** |
1481 | * Barrier initialised successfully | 1514 | * Barrier initialised successfully |
1482 | */ | 1515 | */ |
@@ -1532,11 +1565,11 @@ typedef void | |||
1532 | * @return barrier handle | 1565 | * @return barrier handle |
1533 | */ | 1566 | */ |
1534 | struct GNUNET_TESTBED_Barrier * | 1567 | struct GNUNET_TESTBED_Barrier * |
1535 | GNUNET_TESTBED_barrier_init(struct GNUNET_TESTBED_Controller *controller, | 1568 | GNUNET_TESTBED_barrier_init (struct GNUNET_TESTBED_Controller *controller, |
1536 | const char *name, | 1569 | const char *name, |
1537 | unsigned int quorum, | 1570 | unsigned int quorum, |
1538 | GNUNET_TESTBED_barrier_status_cb cb, | 1571 | GNUNET_TESTBED_barrier_status_cb cb, |
1539 | void *cb_cls); | 1572 | void *cb_cls); |
1540 | 1573 | ||
1541 | 1574 | ||
1542 | /** | 1575 | /** |
@@ -1545,7 +1578,7 @@ GNUNET_TESTBED_barrier_init(struct GNUNET_TESTBED_Controller *controller, | |||
1545 | * @param barrier the barrier handle | 1578 | * @param barrier the barrier handle |
1546 | */ | 1579 | */ |
1547 | void | 1580 | void |
1548 | GNUNET_TESTBED_barrier_cancel(struct GNUNET_TESTBED_Barrier *barrier); | 1581 | GNUNET_TESTBED_barrier_cancel (struct GNUNET_TESTBED_Barrier *barrier); |
1549 | 1582 | ||
1550 | 1583 | ||
1551 | /** | 1584 | /** |
@@ -1582,9 +1615,9 @@ typedef void | |||
1582 | * anytime before the callback is called. NULL upon error. | 1615 | * anytime before the callback is called. NULL upon error. |
1583 | */ | 1616 | */ |
1584 | struct GNUNET_TESTBED_BarrierWaitHandle * | 1617 | struct GNUNET_TESTBED_BarrierWaitHandle * |
1585 | GNUNET_TESTBED_barrier_wait(const char *name, | 1618 | GNUNET_TESTBED_barrier_wait (const char *name, |
1586 | GNUNET_TESTBED_barrier_wait_cb cb, | 1619 | GNUNET_TESTBED_barrier_wait_cb cb, |
1587 | void *cls); | 1620 | void *cls); |
1588 | 1621 | ||
1589 | 1622 | ||
1590 | /** | 1623 | /** |
@@ -1594,7 +1627,7 @@ GNUNET_TESTBED_barrier_wait(const char *name, | |||
1594 | * @param h the barrier wait handle | 1627 | * @param h the barrier wait handle |
1595 | */ | 1628 | */ |
1596 | void | 1629 | void |
1597 | GNUNET_TESTBED_barrier_wait_cancel(struct GNUNET_TESTBED_BarrierWaitHandle *h); | 1630 | GNUNET_TESTBED_barrier_wait_cancel (struct GNUNET_TESTBED_BarrierWaitHandle *h); |
1598 | 1631 | ||
1599 | 1632 | ||
1600 | /** | 1633 | /** |
@@ -1608,7 +1641,8 @@ struct GNUNET_TESTBED_UnderlayLinkModel; | |||
1608 | * The type of GNUNET_TESTBED_UnderlayLinkModel | 1641 | * The type of GNUNET_TESTBED_UnderlayLinkModel |
1609 | * @ingroup underlay | 1642 | * @ingroup underlay |
1610 | */ | 1643 | */ |
1611 | enum GNUNET_TESTBED_UnderlayLinkModelType { | 1644 | enum GNUNET_TESTBED_UnderlayLinkModelType |
1645 | { | ||
1612 | /** | 1646 | /** |
1613 | * The model is based on white listing of peers to which underlay connections | 1647 | * The model is based on white listing of peers to which underlay connections |
1614 | * are permitted. Underlay connections to all other peers will not be | 1648 | * are permitted. Underlay connections to all other peers will not be |
@@ -1635,8 +1669,10 @@ enum GNUNET_TESTBED_UnderlayLinkModelType { | |||
1635 | * @return the model | 1669 | * @return the model |
1636 | */ | 1670 | */ |
1637 | struct GNUNET_TESTBED_UnderlayLinkModel * | 1671 | struct GNUNET_TESTBED_UnderlayLinkModel * |
1638 | GNUNET_TESTBED_underlaylinkmodel_create(struct GNUNET_TESTBED_Peer *peer, | 1672 | GNUNET_TESTBED_underlaylinkmodel_create (struct GNUNET_TESTBED_Peer *peer, |
1639 | enum GNUNET_TESTBED_UnderlayLinkModelType type); | 1673 | enum |
1674 | GNUNET_TESTBED_UnderlayLinkModelType | ||
1675 | type); | ||
1640 | 1676 | ||
1641 | 1677 | ||
1642 | /** | 1678 | /** |
@@ -1649,8 +1685,10 @@ GNUNET_TESTBED_underlaylinkmodel_create(struct GNUNET_TESTBED_Peer *peer, | |||
1649 | * @param peer the peer to add | 1685 | * @param peer the peer to add |
1650 | */ | 1686 | */ |
1651 | void | 1687 | void |
1652 | GNUNET_TESTBED_underlaylinkmodel_add_peer(struct GNUNET_TESTBED_UnderlayLinkModel *model, | 1688 | GNUNET_TESTBED_underlaylinkmodel_add_peer (struct |
1653 | struct GNUNET_TESTBED_Peer *peer); | 1689 | GNUNET_TESTBED_UnderlayLinkModel * |
1690 | model, | ||
1691 | struct GNUNET_TESTBED_Peer *peer); | ||
1654 | 1692 | ||
1655 | 1693 | ||
1656 | /** | 1694 | /** |
@@ -1665,11 +1703,13 @@ GNUNET_TESTBED_underlaylinkmodel_add_peer(struct GNUNET_TESTBED_UnderlayLinkMode | |||
1665 | * @param bandwidth bandwidth of the link in kilobytes per second [kB/s] | 1703 | * @param bandwidth bandwidth of the link in kilobytes per second [kB/s] |
1666 | */ | 1704 | */ |
1667 | void | 1705 | void |
1668 | GNUNET_TESTBED_underlaylinkmodel_set_link(struct GNUNET_TESTBED_UnderlayLinkModel *model, | 1706 | GNUNET_TESTBED_underlaylinkmodel_set_link (struct |
1669 | struct GNUNET_TESTBED_Peer *peer, | 1707 | GNUNET_TESTBED_UnderlayLinkModel * |
1670 | uint32_t latency, | 1708 | model, |
1671 | uint32_t loss, | 1709 | struct GNUNET_TESTBED_Peer *peer, |
1672 | uint32_t bandwidth); | 1710 | uint32_t latency, |
1711 | uint32_t loss, | ||
1712 | uint32_t bandwidth); | ||
1673 | 1713 | ||
1674 | 1714 | ||
1675 | /** | 1715 | /** |
@@ -1679,7 +1719,8 @@ GNUNET_TESTBED_underlaylinkmodel_set_link(struct GNUNET_TESTBED_UnderlayLinkMode | |||
1679 | * @param model the model to commit | 1719 | * @param model the model to commit |
1680 | */ | 1720 | */ |
1681 | void | 1721 | void |
1682 | GNUNET_TESTBED_underlaylinkmodel_commit(struct GNUNET_TESTBED_UnderlayLinkModel *model); | 1722 | GNUNET_TESTBED_underlaylinkmodel_commit (struct |
1723 | GNUNET_TESTBED_UnderlayLinkModel *model); | ||
1683 | 1724 | ||
1684 | 1725 | ||
1685 | /** | 1726 | /** |
@@ -1691,7 +1732,8 @@ GNUNET_TESTBED_underlaylinkmodel_commit(struct GNUNET_TESTBED_UnderlayLinkModel | |||
1691 | * @param model the model to unallocate | 1732 | * @param model the model to unallocate |
1692 | */ | 1733 | */ |
1693 | void | 1734 | void |
1694 | GNUNET_TESTBED_underlaylinkmodel_free(struct GNUNET_TESTBED_UnderlayLinkModel *model); | 1735 | GNUNET_TESTBED_underlaylinkmodel_free (struct |
1736 | GNUNET_TESTBED_UnderlayLinkModel *model); | ||
1695 | 1737 | ||
1696 | 1738 | ||
1697 | #if 0 /* keep Emacsens' auto-indent happy */ | 1739 | #if 0 /* keep Emacsens' auto-indent happy */ |