diff options
author | Sree Harsha Totakura <totakura@in.tum.de> | 2013-02-22 14:53:28 +0000 |
---|---|---|
committer | Sree Harsha Totakura <totakura@in.tum.de> | 2013-02-22 14:53:28 +0000 |
commit | f6a740636d7a43be40a13b2c5c83ec4c3e6f81a5 (patch) | |
tree | 8ea61a8c0fd4acce519ef624995963add3d3524e /src/testbed/gnunet-service-testbed.h | |
parent | 21f7abb96a59ece024cf63e72b3fb91eed6409e1 (diff) | |
download | gnunet-f6a740636d7a43be40a13b2c5c83ec4c3e6f81a5.tar.gz gnunet-f6a740636d7a43be40a13b2c5c83ec4c3e6f81a5.zip |
Use a sub operation while forwarding controller link operations. This helps to
propagate the change in a host's configuration along the controller tree's
branch back to root.
Diffstat (limited to 'src/testbed/gnunet-service-testbed.h')
-rw-r--r-- | src/testbed/gnunet-service-testbed.h | 56 |
1 files changed, 45 insertions, 11 deletions
diff --git a/src/testbed/gnunet-service-testbed.h b/src/testbed/gnunet-service-testbed.h index 984cf438a..37f6a6aaf 100644 --- a/src/testbed/gnunet-service-testbed.h +++ b/src/testbed/gnunet-service-testbed.h | |||
@@ -186,11 +186,6 @@ struct Slave | |||
186 | struct GNUNET_TESTBED_Controller *controller; | 186 | struct GNUNET_TESTBED_Controller *controller; |
187 | 187 | ||
188 | /** | 188 | /** |
189 | * The configuration of the slave. Cannot be NULL | ||
190 | */ | ||
191 | struct GNUNET_CONFIGURATION_Handle *cfg; | ||
192 | |||
193 | /** | ||
194 | * handle to lcc which is associated with this slave startup. Should be set to | 189 | * handle to lcc which is associated with this slave startup. Should be set to |
195 | * NULL when the slave has successfully started up | 190 | * NULL when the slave has successfully started up |
196 | */ | 191 | */ |
@@ -393,12 +388,34 @@ struct ForwardedOverlayConnectContext | |||
393 | 388 | ||
394 | 389 | ||
395 | /** | 390 | /** |
391 | * The type for data structures which commonly arrive at the slave_event_callback | ||
392 | */ | ||
393 | enum ClosureType | ||
394 | { | ||
395 | /** | ||
396 | * Type for RegisteredHostContext closures | ||
397 | */ | ||
398 | CLOSURE_TYPE_RHC = 1, | ||
399 | |||
400 | /** | ||
401 | * Type for LinkControllersForwardingContext closures | ||
402 | */ | ||
403 | CLOSURE_TYPE_LCF | ||
404 | }; | ||
405 | |||
406 | |||
407 | /** | ||
396 | * This context information will be created for each host that is registered at | 408 | * This context information will be created for each host that is registered at |
397 | * slave controllers during overlay connects. | 409 | * slave controllers during overlay connects. |
398 | */ | 410 | */ |
399 | struct RegisteredHostContext | 411 | struct RegisteredHostContext |
400 | { | 412 | { |
401 | /** | 413 | /** |
414 | * The type of this data structure. Set this to CLOSURE_TYPE_RHC | ||
415 | */ | ||
416 | enum ClosureType type; | ||
417 | |||
418 | /** | ||
402 | * The host which is being registered | 419 | * The host which is being registered |
403 | */ | 420 | */ |
404 | struct GNUNET_TESTBED_Host *reg_host; | 421 | struct GNUNET_TESTBED_Host *reg_host; |
@@ -502,14 +519,14 @@ enum LCFContextState | |||
502 | struct LCFContext | 519 | struct LCFContext |
503 | { | 520 | { |
504 | /** | 521 | /** |
505 | * The gateway which will pass the link message to delegated host | 522 | * The type of this data structure. Set this to CLOSURE_TYPE_LCF |
506 | */ | 523 | */ |
507 | struct Slave *gateway; | 524 | enum ClosureType type; |
508 | 525 | ||
509 | /** | 526 | /** |
510 | * The controller link message that has to be forwarded to | 527 | * The gateway which will pass the link message to delegated host |
511 | */ | 528 | */ |
512 | struct GNUNET_TESTBED_ControllerLinkRequest *msg; | 529 | struct Slave *gateway; |
513 | 530 | ||
514 | /** | 531 | /** |
515 | * The client which has asked to perform this operation | 532 | * The client which has asked to perform this operation |
@@ -519,12 +536,28 @@ struct LCFContext | |||
519 | /** | 536 | /** |
520 | * Handle for operations which are forwarded while linking controllers | 537 | * Handle for operations which are forwarded while linking controllers |
521 | */ | 538 | */ |
522 | struct ForwardedOperationContext *fopc; | 539 | struct GNUNET_TESTBED_Operation *op; |
540 | |||
541 | /** | ||
542 | * The configuration which has to be either used as a template while starting | ||
543 | * the delegated controller or for connecting to the delegated controller | ||
544 | */ | ||
545 | struct GNUNET_CONFIGURATION_Handle *cfg; | ||
546 | |||
547 | /** | ||
548 | * The timeout task | ||
549 | */ | ||
550 | GNUNET_SCHEDULER_TaskIdentifier timeout_task; | ||
523 | 551 | ||
524 | /** | 552 | /** |
525 | * The id of the operation which created this context | 553 | * The id of the operation which created this context |
526 | */ | 554 | */ |
527 | uint64_t operation_id; | 555 | uint64_t operation_id; |
556 | |||
557 | /** | ||
558 | * should the slave controller start the delegated controller? | ||
559 | */ | ||
560 | int is_subordinate; | ||
528 | 561 | ||
529 | /** | 562 | /** |
530 | * The state of this context | 563 | * The state of this context |
@@ -565,6 +598,7 @@ struct LCFContextQueue | |||
565 | struct LCFContextQueue *prev; | 598 | struct LCFContextQueue *prev; |
566 | }; | 599 | }; |
567 | 600 | ||
601 | |||
568 | /** | 602 | /** |
569 | * Our configuration | 603 | * Our configuration |
570 | */ | 604 | */ |