diff options
author | harsha <harsha@140774ce-b5e7-0310-ab8b-a85725594a96> | 2013-01-25 14:40:32 +0000 |
---|---|---|
committer | harsha <harsha@140774ce-b5e7-0310-ab8b-a85725594a96> | 2013-01-25 14:40:32 +0000 |
commit | cfd6f58ecde127ecdc44470ee6c3f034dbce5c55 (patch) | |
tree | e30e6bd5a90c493ccbebb9a99e0bb2bc4200a055 | |
parent | 24d5262ec19811f830f989076eec16a6ae7ba958 (diff) |
- rearrange
git-svn-id: https://gnunet.org/svn/gnunet@25901 140774ce-b5e7-0310-ab8b-a85725594a96
-rw-r--r-- | src/testbed/gnunet-service-testbed.c | 127 |
1 files changed, 61 insertions, 66 deletions
diff --git a/src/testbed/gnunet-service-testbed.c b/src/testbed/gnunet-service-testbed.c index e312dce117..a9e77789a4 100644 --- a/src/testbed/gnunet-service-testbed.c +++ b/src/testbed/gnunet-service-testbed.c @@ -29,6 +29,65 @@ #include <zlib.h> +/***********/ +/* Globals */ +/***********/ + +/** + * Our configuration + */ +struct GNUNET_CONFIGURATION_Handle *our_config; + +/** + * The master context; generated with the first INIT message + */ +struct Context *GST_context; + +/** + * A list of directly linked neighbours + */ +struct Slave **GST_slave_list; + +/** + * A list of peers we know about + */ +struct Peer **GST_peer_list; + +/** + * Array of hosts + */ +struct GNUNET_TESTBED_Host **GST_host_list; + +/** + * DLL head for forwarded operation contexts + */ +struct ForwardedOperationContext *fopcq_head; + +/** + * DLL tail for forwarded operation contexts + */ +struct ForwardedOperationContext *fopcq_tail; + +/** + * The size of the host list + */ +unsigned int GST_host_list_size; + +/** + * The size of directly linked neighbours list + */ +unsigned int GST_slave_list_size; + +/** + * The size of the peer list + */ +unsigned int GST_peer_list_size; + + +/***********************************/ +/* Local definitions and variables */ +/***********************************/ + /** * The message queue for sending messages to clients */ @@ -55,36 +114,16 @@ struct MessageQueue struct MessageQueue *prev; }; - -/** - * The master context; generated with the first INIT message - */ -struct Context *GST_context; - /** * Our hostname; we give this to all the peers we start */ static char *hostname; - -/***********/ -/* Handles */ -/***********/ - -/** - * Our configuration - */ -struct GNUNET_CONFIGURATION_Handle *our_config; - /** * Current Transmit Handle; NULL if no notify transmit exists currently */ static struct GNUNET_SERVER_TransmitHandle *transmit_handle; -/****************/ -/* Lists & Maps */ -/****************/ - /** * The head for the LCF queue */ @@ -106,19 +145,9 @@ static struct MessageQueue *mq_head; static struct MessageQueue *mq_tail; /** - * DLL head for forwarded operation contexts - */ -struct ForwardedOperationContext *fopcq_head; - -/** - * DLL tail for forwarded operation contexts - */ -struct ForwardedOperationContext *fopcq_tail; - -/** - * Array of hosts + * The hashmap of shared services */ -struct GNUNET_TESTBED_Host **GST_host_list; +static struct GNUNET_CONTAINER_MultiHashMap *ss_map; /** * A list of routes @@ -126,50 +155,16 @@ struct GNUNET_TESTBED_Host **GST_host_list; static struct Route **route_list; /** - * A list of directly linked neighbours - */ -struct Slave **GST_slave_list; - -/** - * A list of peers we know about - */ -struct Peer **GST_peer_list; - -/** - * The hashmap of shared services - */ -static struct GNUNET_CONTAINER_MultiHashMap *ss_map; - -/** * The event mask for the events we listen from sub-controllers */ static uint64_t event_mask; /** - * The size of the host list - */ -unsigned int GST_host_list_size; - -/** * The size of the route list */ static unsigned int route_list_size; /** - * The size of directly linked neighbours list - */ -unsigned int GST_slave_list_size; - -/** - * The size of the peer list - */ -unsigned int GST_peer_list_size; - -/*********/ -/* Tasks */ -/*********/ - -/** * The lcf_task handle */ static GNUNET_SCHEDULER_TaskIdentifier lcf_proc_task_id; |