aboutsummaryrefslogtreecommitdiff
path: root/src/testbed/gnunet-service-testbed.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/testbed/gnunet-service-testbed.h')
-rw-r--r--src/testbed/gnunet-service-testbed.h192
1 files changed, 1 insertions, 191 deletions
diff --git a/src/testbed/gnunet-service-testbed.h b/src/testbed/gnunet-service-testbed.h
index 2a410a850..b17c3d781 100644
--- a/src/testbed/gnunet-service-testbed.h
+++ b/src/testbed/gnunet-service-testbed.h
@@ -35,6 +35,7 @@
35#include "testbed_api_operations.h" 35#include "testbed_api_operations.h"
36#include "testbed_api_hosts.h" 36#include "testbed_api_hosts.h"
37#include "gnunet_testing_lib.h" 37#include "gnunet_testing_lib.h"
38#include "gnunet-service-testbed_links.h"
38 39
39 40
40/** 41/**
@@ -171,55 +172,6 @@ struct LinkControllersContext
171 172
172 173
173/** 174/**
174 * Structure representing a connected(directly-linked) controller
175 */
176struct Slave
177{
178 /**
179 * The controller process handle if we had started the controller
180 */
181 struct GNUNET_TESTBED_ControllerProc *controller_proc;
182
183 /**
184 * The controller handle
185 */
186 struct GNUNET_TESTBED_Controller *controller;
187
188 /**
189 * handle to lcc which is associated with this slave startup. Should be set to
190 * NULL when the slave has successfully started up
191 */
192 struct LinkControllersContext *lcc;
193
194 /**
195 * Head of the host registration DLL
196 */
197 struct HostRegistration *hr_dll_head;
198
199 /**
200 * Tail of the host registration DLL
201 */
202 struct HostRegistration *hr_dll_tail;
203
204 /**
205 * The current host registration handle
206 */
207 struct GNUNET_TESTBED_HostRegistrationHandle *rhandle;
208
209 /**
210 * Hashmap to hold Registered host contexts
211 */
212 struct GNUNET_CONTAINER_MultiHashMap *reghost_map;
213
214 /**
215 * The id of the host this controller is running on
216 */
217 uint32_t host_id;
218
219};
220
221
222/**
223 * A peer 175 * A peer
224 */ 176 */
225 177
@@ -487,119 +439,6 @@ struct RegisteredHostContext
487 439
488 440
489/** 441/**
490 * States of LCFContext
491 */
492enum LCFContextState
493{
494 /**
495 * The Context has been initialized; Nothing has been done on it
496 */
497 INIT,
498
499 /**
500 * Delegated host has been registered at the forwarding controller
501 */
502 DELEGATED_HOST_REGISTERED,
503
504 /**
505 * The slave host has been registred at the forwarding controller
506 */
507 SLAVE_HOST_REGISTERED,
508
509 /**
510 * The context has been finished (may have error)
511 */
512 FINISHED
513};
514
515
516/**
517 * Link controllers request forwarding context
518 */
519struct LCFContext
520{
521 /**
522 * The type of this data structure. Set this to CLOSURE_TYPE_LCF
523 */
524 enum ClosureType type;
525
526 /**
527 * The gateway which will pass the link message to delegated host
528 */
529 struct Slave *gateway;
530
531 /**
532 * The client which has asked to perform this operation
533 */
534 struct GNUNET_SERVER_Client *client;
535
536 /**
537 * Handle for operations which are forwarded while linking controllers
538 */
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;
551
552 /**
553 * The id of the operation which created this context
554 */
555 uint64_t operation_id;
556
557 /**
558 * should the slave controller start the delegated controller?
559 */
560 int is_subordinate;
561
562 /**
563 * The state of this context
564 */
565 enum LCFContextState state;
566
567 /**
568 * The delegated host
569 */
570 uint32_t delegated_host_id;
571
572 /**
573 * The slave host
574 */
575 uint32_t slave_host_id;
576
577};
578
579
580/**
581 * Structure of a queue entry in LCFContext request queue
582 */
583struct LCFContextQueue
584{
585 /**
586 * The LCFContext
587 */
588 struct LCFContext *lcf;
589
590 /**
591 * Head prt for DLL
592 */
593 struct LCFContextQueue *next;
594
595 /**
596 * Tail ptr for DLL
597 */
598 struct LCFContextQueue *prev;
599};
600
601
602/**
603 * Context data for GNUNET_MESSAGE_TYPE_TESTBED_SHUTDOWN_PEERS handler 442 * Context data for GNUNET_MESSAGE_TYPE_TESTBED_SHUTDOWN_PEERS handler
604 */ 443 */
605struct HandlerContext_ShutdownPeers 444struct HandlerContext_ShutdownPeers
@@ -649,11 +488,6 @@ extern struct Peer **GST_peer_list;
649extern struct GNUNET_TESTBED_Host **GST_host_list; 488extern struct GNUNET_TESTBED_Host **GST_host_list;
650 489
651/** 490/**
652 * A list of directly linked neighbours
653 */
654extern struct Slave **GST_slave_list;
655
656/**
657 * Operation queue for open file descriptors 491 * Operation queue for open file descriptors
658 */ 492 */
659extern struct OperationQueue *GST_opq_openfds; 493extern struct OperationQueue *GST_opq_openfds;
@@ -674,11 +508,6 @@ extern unsigned int GST_peer_list_size;
674extern unsigned int GST_host_list_size; 508extern unsigned int GST_host_list_size;
675 509
676/** 510/**
677 * The size of directly linked neighbours list
678 */
679extern unsigned int GST_slave_list_size;
680
681/**
682 * The directory where to store load statistics data 511 * The directory where to store load statistics data
683 */ 512 */
684extern char *GST_stats_dir; 513extern char *GST_stats_dir;
@@ -748,18 +577,6 @@ GST_find_dest_route (uint32_t host_id);
748 577
749 578
750/** 579/**
751 * Message handler for GNUNET_MESSAGE_TYPE_TESTBED_LCONTROLLERS message
752 *
753 * @param cls NULL
754 * @param client identification of the client
755 * @param message the actual message
756 */
757void
758GST_handle_link_controllers (void *cls, struct GNUNET_SERVER_Client *client,
759 const struct GNUNET_MessageHeader *message);
760
761
762/**
763 * Handler for GNUNET_MESSAGE_TYPE_TESTBED_OLCONNECT messages 580 * Handler for GNUNET_MESSAGE_TYPE_TESTBED_OLCONNECT messages
764 * 581 *
765 * @param cls NULL 582 * @param cls NULL
@@ -957,13 +774,6 @@ GST_route_list_clear ();
957 774
958 775
959/** 776/**
960 * Cleans up the slave list
961 */
962void
963GST_slave_list_clear ();
964
965
966/**
967 * Processes a forwarded overlay connect context in the queue of the given RegisteredHostContext 777 * Processes a forwarded overlay connect context in the queue of the given RegisteredHostContext
968 * 778 *
969 * @param rhc the RegisteredHostContext 779 * @param rhc the RegisteredHostContext