TESTBED service components that deals with starting slave controllers and establishing lateral links between controllers. More...
Go to the source code of this file.
Data Structures | |
struct | LCFContext |
Link controllers request forwarding context. More... | |
struct | NeighbourConnectNotification |
Notification context to be used to notify when connection to the neighbour's controller is opened. More... | |
struct | Neighbour |
A connected controller which is not our child. More... | |
struct | NeighbourConnectCtxt |
Context information for establishing a link to neighbour (Used is GST_handle_link_controllers() More... | |
Macros | |
#define | LOG(kind, ...) GNUNET_log_from (kind, "testbed-links", __VA_ARGS__) |
Redefine LOG with a changed log component string. More... | |
#define | EVENT_MASK (1LL << GNUNET_TESTBED_ET_OPERATION_FINISHED) |
The event mask for the events we listen from sub-controllers. More... | |
Enumerations | |
enum | LCFContextState { INIT , DELEGATED_HOST_REGISTERED , SLAVE_HOST_REGISTERED , FINISHED } |
States of LCFContext. More... | |
Functions | |
static void | slave_list_add (struct Slave *slave) |
Adds a slave to the slave array. More... | |
static int | drop_client_entries (void *cls, const struct GNUNET_HashCode *key, void *value) |
Clean up all forwarded operation overlay context matching the client given in cls. More... | |
static void | route_list_add (struct Route *route) |
Adds a route to the route list. More... | |
static void | neighbour_list_add (struct Neighbour *n) |
Add a neighbour to the neighbour list. More... | |
void | GST_route_list_clear () |
Cleans up the route list. More... | |
static int | reghost_free_iterator (void *cls, const struct GNUNET_HashCode *key, void *value) |
Iterator for freeing hash map entries in a slave's reghost_map. More... | |
static void | kill_slave (struct Slave *slave) |
Kill a Slave object. More... | |
static void | destroy_slave (struct Slave *slave) |
Destroy a Slave object. More... | |
void | GST_slave_list_clear () |
Cleans up the slave list. More... | |
struct Route * | GST_find_dest_route (uint32_t host_id) |
Finds the route with directly connected host as destination through which the destination host can be reached. More... | |
static void | send_controller_link_response (struct GNUNET_SERVICE_Client *client, uint64_t operation_id, const struct GNUNET_CONFIGURATION_Handle *cfg, const char *emsg) |
Function to send a failure response for controller link operation. More... | |
static void | lcf_proc_task (void *cls) |
The Link Controller forwarding task. More... | |
static void | lcf_proc_cc (void *cls, const char *emsg) |
Completion callback for host registrations while forwarding Link Controller messages. More... | |
static void | lcf_forwarded_operation_timeout (void *cls) |
Task to free resources when forwarded link controllers has been timedout. More... | |
static void | slave_event_cb (void *cls, const struct GNUNET_TESTBED_EventInformation *event) |
Callback for event from slave controllers. More... | |
static void | slave_status_cb (void *cls, const struct GNUNET_CONFIGURATION_Handle *cfg, int status) |
Callback to signal successful startup of the controller process. More... | |
static void | trigger_notifications (struct Neighbour *n) |
Trigger notification task if there are notification requests currently waiting in the given neighbour. More... | |
static void | neighbour_connect_notify_task (void *cls) |
Task to call the notification queued in the notifications list of the given neighbour. More... | |
static void | opstart_neighbour_conn (void *cls) |
Callback to be called when the neighbour connect operation is started. More... | |
static void | oprelease_neighbour_conn (void *cls) |
Callback to be called when the neighbour connect operation is released. More... | |
struct NeighbourConnectNotification * | GST_neighbour_get_connection (struct Neighbour *n, GST_NeighbourConnectNotifyCallback cb, void *cb_cls) |
Try to open a connection to the given neighbour. More... | |
void | GST_neighbour_get_connection_cancel (struct NeighbourConnectNotification *h) |
Cancel the request for opening a connection to the neighbour. More... | |
void | GST_neighbour_release_connection (struct Neighbour *n) |
Release the connection to the neighbour. More... | |
static void | cleanup_ncc (struct NeighbourConnectCtxt *ncc) |
Cleanup neighbour connect contexts. More... | |
void | GST_neighbour_list_clean () |
Cleans up the neighbour list. More... | |
struct Neighbour * | GST_get_neighbour (uint32_t id) |
Get a neighbour from the neighbour list. More... | |
void | GST_free_nccq () |
Function to cleanup the neighbour connect contexts. More... | |
static void | timeout_neighbour_connect (void *cls) |
Task to be run upon timeout while attempting to connect to the neighbour. More... | |
static void | neighbour_connect_cb (void *cls, struct GNUNET_TESTBED_Controller *c) |
Callback called when a connection to the neighbour is made. More... | |
struct Neighbour * | GST_create_neighbour (struct GNUNET_TESTBED_Host *host) |
Function to create a neighbour and add it into the neighbour list. More... | |
void | handle_link_controllers (void *cls, const struct GNUNET_TESTBED_ControllerLinkRequest *msg) |
Message handler for #GNUNET_MESSAGE_TYPE_TESTBED_LCONTROLLERS message. More... | |
void | GST_link_notify_disconnect (struct GNUNET_SERVICE_Client *client) |
Clean up client handle if we stored any via handle_link_controllers(), the given client disconnected. More... | |
void | GST_free_lcf () |
Cleans up the queue used for forwarding link controllers requests. More... | |
Variables | |
static struct Neighbour ** | neighbour_list |
The neighbour list. More... | |
static unsigned int | neighbour_list_size |
The size of the neighbour list. More... | |
struct NeighbourConnectCtxt * | ncc_head |
DLL head for the list of neighbour connect contexts. More... | |
struct NeighbourConnectCtxt * | ncc_tail |
DLL tail for the list of neighbour connect contexts. More... | |
struct Slave ** | GST_slave_list |
A list of directly linked neighbours. More... | |
unsigned int | GST_slave_list_size |
The size of directly linked neighbours list. More... | |
static struct Route ** | route_list |
A list of routes. More... | |
static struct LCFContext * | lcf_head |
The LCF queue. More... | |
static struct LCFContext * | lcf_tail |
The tail for the LCF queue. More... | |
static struct GNUNET_SCHEDULER_Task * | lcf_proc_task_id |
The lcf_task handle. More... | |
static unsigned int | route_list_size |
The size of the route list. More... | |
TESTBED service components that deals with starting slave controllers and establishing lateral links between controllers.
Definition in file gnunet-service-testbed_links.c.
#define LOG | ( | kind, | |
... | |||
) | GNUNET_log_from (kind, "testbed-links", __VA_ARGS__) |
Redefine LOG with a changed log component string.
Definition at line 37 of file gnunet-service-testbed_links.c.
#define EVENT_MASK (1LL << GNUNET_TESTBED_ET_OPERATION_FINISHED) |
The event mask for the events we listen from sub-controllers.
Definition at line 43 of file gnunet-service-testbed_links.c.
enum LCFContextState |
States of LCFContext.
Enumerator | |
---|---|
INIT | The Context has been initialized; Nothing has been done on it. |
DELEGATED_HOST_REGISTERED | Delegated host has been registered at the forwarding controller. |
SLAVE_HOST_REGISTERED | The slave host has been registered at the forwarding controller. |
FINISHED | The context has been finished (may have error) |
Definition at line 49 of file gnunet-service-testbed_links.c.
|
static |
Adds a slave to the slave array.
slave | the slave controller to add |
Definition at line 322 of file gnunet-service-testbed_links.c.
References GNUNET_assert, GST_array_grow_large_enough, GST_slave_list, GST_slave_list_size, and Slave::host_id.
Referenced by handle_link_controllers().
|
static |
Clean up all forwarded operation overlay context matching the client given in cls.
cls | a struct GNUNET_SERVICE_Client * to match |
key | unused |
value | the struct RegisteredHostContext to search for cls |
Definition at line 343 of file gnunet-service-testbed_links.c.
References ForwardedOverlayConnectContext::client, RegisteredHostContext::focc_dll_head, GNUNET_OK, GST_cleanup_focc(), ForwardedOverlayConnectContext::next, ForwardedOverlayConnectContext::rhc, and value.
Referenced by GST_link_notify_disconnect().
|
static |
Adds a route to the route list.
route | the route to add |
Definition at line 368 of file gnunet-service-testbed_links.c.
References Route::dest, GNUNET_assert, GST_array_grow_large_enough, route_list, and route_list_size.
Referenced by handle_link_controllers().
|
static |
Add a neighbour to the neighbour list.
Grows the neighbour list automatically.
n | the neighbour to add |
Definition at line 384 of file gnunet-service-testbed_links.c.
References GNUNET_assert, GST_array_grow_large_enough, Neighbour::host_id, neighbour_list, and neighbour_list_size.
Referenced by GST_create_neighbour().
void GST_route_list_clear | ( | void | ) |
Cleans up the route list.
Definition at line 398 of file gnunet-service-testbed_links.c.
References GNUNET_free, id, route_list, and route_list_size.
Referenced by shutdown_task().
|
static |
Iterator for freeing hash map entries in a slave's reghost_map.
cls | handle to the slave |
key | current key code |
value | value in the hash map |
Definition at line 420 of file gnunet-service-testbed_links.c.
References RegisteredHostContext::focc_dll_head, GNUNET_assert, GNUNET_CONTAINER_multihashmap_remove(), GNUNET_free, GNUNET_YES, GST_cleanup_focc(), key, Slave::reghost_map, ForwardedOverlayConnectContext::rhc, and value.
Referenced by kill_slave().
|
static |
Kill a Slave object.
slave | the Slave object |
Definition at line 444 of file gnunet-service-testbed_links.c.
References Slave::controller, Slave::controller_proc, GNUNET_assert, GNUNET_CONTAINER_DLL_remove, GNUNET_CONTAINER_multihashmap_destroy(), GNUNET_CONTAINER_multihashmap_iterate(), GNUNET_free, GNUNET_SYSERR, GNUNET_TESTBED_cancel_registration(), GNUNET_TESTBED_controller_disconnect(), GNUNET_TESTBED_controller_kill_(), Slave::hr_dll_head, Slave::hr_dll_tail, LOG_DEBUG, reghost_free_iterator(), Slave::reghost_map, and Slave::rhandle.
Referenced by GST_slave_list_clear(), and slave_status_cb().
|
static |
Destroy a Slave object.
slave | the Slave object |
Definition at line 477 of file gnunet-service-testbed_links.c.
References Slave::controller_proc, GNUNET_free, GNUNET_TESTBED_controller_destroy_(), GST_slave_list, Slave::host_id, and LOG_DEBUG.
Referenced by GST_slave_list_clear(), and slave_status_cb().
void GST_slave_list_clear | ( | void | ) |
Cleans up the slave list.
Definition at line 493 of file gnunet-service-testbed_links.c.
References destroy_slave(), GNUNET_free, GST_slave_list, GST_slave_list_size, id, and kill_slave().
Referenced by shutdown_task().
struct Route* GST_find_dest_route | ( | uint32_t | host_id | ) |
Finds the route with directly connected host as destination through which the destination host can be reached.
host_id | the id of the destination host |
Definition at line 526 of file gnunet-service-testbed_links.c.
References GST_context, Context::host_id, route_list, route_list_size, and Route::thru.
Referenced by forward_overlay_connect(), handle_link_controllers(), and handle_peer_create().
|
static |
Function to send a failure response for controller link operation.
client | the client to send the message to |
operation_id | the operation ID of the controller link request |
cfg | the configuration with which the delegated controller is started. Can be NULL if the delegated controller is not started but just linked to. |
emsg | set to an error message explaining why the controller link failed. Setting this to NULL signifies success. !This should be NULL if cfg is set! |
Definition at line 555 of file gnunet-service-testbed_links.c.
References cfg, GNUNET_TESTBED_ControllerLinkResponse::config_size, env, GNUNET_assert, GNUNET_free, GNUNET_htonll(), GNUNET_memcpy, GNUNET_MESSAGE_TYPE_TESTBED_LINK_CONTROLLERS_RESULT, GNUNET_MQ_msg_extra, GNUNET_MQ_send(), GNUNET_SERVICE_client_get_mq(), GNUNET_TESTBED_compress_cfg_(), GNUNET_YES, msg, and GNUNET_TESTBED_ControllerLinkResponse::operation_id.
Referenced by lcf_forwarded_operation_timeout(), neighbour_connect_cb(), slave_event_cb(), slave_status_cb(), and timeout_neighbour_connect().
|
static |
The Link Controller forwarding task.
cls | the LCFContext |
Definition at line 696 of file gnunet-service-testbed_links.c.
References Slave::controller, LCFContext::delegated_host_id, DELEGATED_HOST_REGISTERED, FINISHED, LCFContext::gateway, GNUNET_CONTAINER_DLL_remove, GNUNET_free, GNUNET_NO, GNUNET_SCHEDULER_add_delayed(), GNUNET_SCHEDULER_add_now(), GNUNET_TESTBED_controller_link(), GNUNET_TESTBED_is_host_registered_(), GNUNET_TESTBED_operation_done(), GST_host_list, GST_queue_host_registration(), GST_timeout, INIT, LCFContext::is_subordinate, lcf_forwarded_operation_timeout(), lcf_head, lcf_proc_cc(), lcf_proc_task_id, lcf_tail, LCFContext::op, LCFContext::slave_host_id, SLAVE_HOST_REGISTERED, LCFContext::state, and LCFContext::timeout_task.
Referenced by handle_link_controllers(), lcf_forwarded_operation_timeout(), lcf_proc_cc(), and slave_event_cb().
|
static |
Completion callback for host registrations while forwarding Link Controller messages.
cls | the LCFContext |
emsg | the error message; NULL if host registration is successful |
Definition at line 620 of file gnunet-service-testbed_links.c.
References DELEGATED_HOST_REGISTERED, FINISHED, GNUNET_assert, GNUNET_ERROR_TYPE_WARNING, GNUNET_SCHEDULER_add_now(), INIT, lcf_proc_task(), lcf_proc_task_id, LOG, SLAVE_HOST_REGISTERED, and LCFContext::state.
Referenced by lcf_proc_task().
|
static |
Task to free resources when forwarded link controllers has been timedout.
cls | the LCFContext |
Definition at line 672 of file gnunet-service-testbed_links.c.
References LCFContext::client, GNUNET_assert, GNUNET_ERROR_TYPE_WARNING, GNUNET_SCHEDULER_add_now(), lcf_proc_task(), lcf_proc_task_id, LOG, LCFContext::operation_id, send_controller_link_response(), and LCFContext::timeout_task.
Referenced by lcf_proc_task().
|
static |
Callback for event from slave controllers.
cls | NULL |
event | information about the event |
Definition at line 769 of file gnunet-service-testbed_links.c.
References LCFContext::client, LCFContext::delegated_host_id, GNUNET_TESTBED_EventInformation::details, FINISHED, GNUNET_assert, GNUNET_SCHEDULER_add_now(), GNUNET_SCHEDULER_cancel(), GNUNET_TESTBED_ET_OPERATION_FINISHED, GNUNET_TESTBED_host_get_cfg_(), GNUNET_TESTBED_operation_done(), GST_host_list, lcf_proc_task(), lcf_proc_task_id, GNUNET_TESTBED_EventInformation::op, LCFContext::op, GNUNET_TESTBED_EventInformation::operation_finished, LCFContext::operation_id, send_controller_link_response(), LCFContext::state, LCFContext::timeout_task, and GNUNET_TESTBED_EventInformation::type.
Referenced by opstart_neighbour_conn(), and slave_status_cb().
|
static |
Callback to signal successful startup of the controller process.
cls | the handle to the slave whose status is to be found here |
cfg | the configuration with which the controller has been started; NULL if status is not GNUNET_OK |
status | GNUNET_OK if the startup is successful; GNUNET_SYSERR if not, GNUNET_TESTBED_controller_stop() shouldn't be called in this case |
Definition at line 807 of file gnunet-service-testbed_links.c.
References cfg, LinkControllersContext::client, Slave::controller, Slave::controller_proc, destroy_slave(), EVENT_MASK, GNUNET_ERROR_TYPE_WARNING, GNUNET_free, GNUNET_SCHEDULER_shutdown(), GNUNET_SERVICE_client_continue(), GNUNET_SYSERR, GNUNET_TESTBED_controller_connect(), GST_free_lcf(), GST_host_list, Slave::host_id, kill_slave(), Slave::lcc, LOG, LinkControllersContext::operation_id, send_controller_link_response(), slave_event_cb(), and status.
Referenced by handle_link_controllers().
|
static |
Trigger notification task if there are notification requests currently waiting in the given neighbour.
Also activates the neighbour connect operation if it was previously inactivated so that the connection to the neighbour can be re-used
n | the neighbour |
Definition at line 906 of file gnunet-service-testbed_links.c.
References Neighbour::conn_op, Neighbour::controller, GNUNET_assert, GNUNET_SCHEDULER_add_now(), GNUNET_TESTBED_operation_activate_(), Neighbour::inactive, NeighbourConnectNotification::n, neighbour_connect_notify_task(), Neighbour::nl_head, Neighbour::notify_task, and Neighbour::reference_cnt.
Referenced by GST_neighbour_get_connection(), GST_neighbour_get_connection_cancel(), neighbour_connect_notify_task(), and opstart_neighbour_conn().
|
static |
Task to call the notification queued in the notifications list of the given neighbour.
cls | the neighbour |
Definition at line 881 of file gnunet-service-testbed_links.c.
References Neighbour::controller, GNUNET_assert, GNUNET_CONTAINER_DLL_remove, GNUNET_free, h, NeighbourConnectNotification::n, Neighbour::nl_head, Neighbour::nl_tail, Neighbour::notify_task, and trigger_notifications().
Referenced by trigger_notifications().
|
static |
Callback to be called when the neighbour connect operation is started.
The connection to the neighbour is opened here and any pending notifications are trigger.
cls | the neighbour |
Definition at line 935 of file gnunet-service-testbed_links.c.
References Neighbour::conn_op, Neighbour::controller, EVENT_MASK, GNUNET_assert, GNUNET_TESTBED_controller_connect(), GST_host_list, Neighbour::host_id, LOG_DEBUG, slave_event_cb(), and trigger_notifications().
Referenced by GST_neighbour_get_connection().
|
static |
Callback to be called when the neighbour connect operation is released.
cls | the neighbour |
Definition at line 956 of file gnunet-service-testbed_links.c.
References Neighbour::conn_op, Neighbour::controller, GNUNET_assert, GNUNET_TESTBED_controller_disconnect(), Neighbour::host_id, Neighbour::inactive, LOG_DEBUG, Neighbour::nl_head, Neighbour::notify_task, and Neighbour::reference_cnt.
Referenced by GST_neighbour_get_connection().
struct NeighbourConnectNotification* GST_neighbour_get_connection | ( | struct Neighbour * | n, |
GST_NeighbourConnectNotifyCallback | cb, | ||
void * | cb_cls | ||
) |
Try to open a connection to the given neighbour.
If the connection is open already, then it is re-used. If not, the request is queued in the operation queues responsible for bounding the total number of file descriptors. The actual connection will happen when the operation queue marks the corresponding operation as active.
n | the neighbour to open a connection to |
cb | the notification callback to call when the connection is opened |
cb_cls | the closure for the above callback |
Definition at line 986 of file gnunet-service-testbed_links.c.
References NeighbourConnectNotification::cb, NeighbourConnectNotification::cb_cls, Neighbour::conn_op, Neighbour::controller, GNUNET_assert, GNUNET_CONTAINER_DLL_insert_tail, GNUNET_new, GNUNET_TESTBED_operation_begin_wait_(), GNUNET_TESTBED_operation_create_(), GNUNET_TESTBED_operation_queue_insert_(), GST_opq_openfds, h, Neighbour::host_id, LOG_DEBUG, NeighbourConnectNotification::n, Neighbour::nl_head, Neighbour::nl_tail, oprelease_neighbour_conn(), opstart_neighbour_conn(), and trigger_notifications().
Referenced by handle_link_controllers(), and handle_overlay_connect().
void GST_neighbour_get_connection_cancel | ( | struct NeighbourConnectNotification * | h | ) |
Cancel the request for opening a connection to the neighbour.
h | the notification handle |
Definition at line 1020 of file gnunet-service-testbed_links.c.
References cleanup_task, Neighbour::conn_op, GNUNET_assert, GNUNET_CONTAINER_DLL_remove, GNUNET_free, GNUNET_NO, GNUNET_SCHEDULER_cancel(), GNUNET_TESTBED_operation_inactivate_(), GNUNET_YES, h, Neighbour::inactive, Neighbour::nl_head, Neighbour::nl_tail, Neighbour::notify_task, Neighbour::reference_cnt, and trigger_notifications().
Referenced by cleanup_ncc(), and cleanup_occ_rp2c().
void GST_neighbour_release_connection | ( | struct Neighbour * | n | ) |
Release the connection to the neighbour.
The actual connection will be closed if connections to other neighbour are waiting (to maintain a bound on the total number of connections that are open).
n | the neighbour whose connection can be closed |
Definition at line 1058 of file gnunet-service-testbed_links.c.
References Neighbour::conn_op, GNUNET_assert, GNUNET_TESTBED_operation_inactivate_(), Neighbour::inactive, and Neighbour::reference_cnt.
Referenced by cleanup_occ_rp2c(), and neighbour_connect_cb().
|
static |
Cleanup neighbour connect contexts.
ncc | the neighbour connect context to cleanup |
Definition at line 1077 of file gnunet-service-testbed_links.c.
References GNUNET_CONTAINER_DLL_remove, GNUNET_free, GNUNET_SCHEDULER_cancel(), GST_neighbour_get_connection_cancel(), ncc_head, ncc_tail, NeighbourConnectCtxt::nh, and NeighbourConnectCtxt::timeout_task.
Referenced by GST_free_nccq(), GST_link_notify_disconnect(), neighbour_connect_cb(), and timeout_neighbour_connect().
void GST_neighbour_list_clean | ( | void | ) |
Cleans up the neighbour list.
Definition at line 1094 of file gnunet-service-testbed_links.c.
References Neighbour::conn_op, GNUNET_free, GNUNET_TESTBED_operation_release_(), id, neighbour_list, and neighbour_list_size.
Referenced by shutdown_task().
struct Neighbour* GST_get_neighbour | ( | uint32_t | id | ) |
Get a neighbour from the neighbour list.
id | the index of the neighbour in the neighbour list |
Definition at line 1120 of file gnunet-service-testbed_links.c.
References id, neighbour_list, and neighbour_list_size.
Referenced by handle_overlay_connect().
void GST_free_nccq | ( | void | ) |
Function to cleanup the neighbour connect contexts.
Definition at line 1132 of file gnunet-service-testbed_links.c.
References cleanup_ncc(), and ncc_head.
Referenced by shutdown_task().
|
static |
Task to be run upon timeout while attempting to connect to the neighbour.
cls | the NeighbourConnectCtxt created in GST_handle_link_controllers() |
Definition at line 1145 of file gnunet-service-testbed_links.c.
References cleanup_ncc(), NeighbourConnectCtxt::client, NeighbourConnectCtxt::op_id, send_controller_link_response(), and NeighbourConnectCtxt::timeout_task.
Referenced by handle_link_controllers().
|
static |
Callback called when a connection to the neighbour is made.
cls | the NeighbourConnectCtxt created in GST_handle_link_controllers() |
c | the handle the neighbour's controller |
Definition at line 1165 of file gnunet-service-testbed_links.c.
References cleanup_ncc(), NeighbourConnectCtxt::client, GNUNET_SCHEDULER_cancel(), GST_neighbour_release_connection(), NeighbourConnectCtxt::n, NeighbourConnectCtxt::nh, NeighbourConnectCtxt::op_id, send_controller_link_response(), and NeighbourConnectCtxt::timeout_task.
Referenced by handle_link_controllers().
struct Neighbour* GST_create_neighbour | ( | struct GNUNET_TESTBED_Host * | host | ) |
Function to create a neighbour and add it into the neighbour list.
host | the host of the neighbour |
Definition at line 1188 of file gnunet-service-testbed_links.c.
References GNUNET_new, GNUNET_TESTBED_host_get_id_(), Neighbour::host_id, and neighbour_list_add().
Referenced by handle_link_controllers(), and handle_overlay_connect().
void handle_link_controllers | ( | void * | cls, |
const struct GNUNET_TESTBED_ControllerLinkRequest * | msg | ||
) |
Message handler for #GNUNET_MESSAGE_TYPE_TESTBED_LCONTROLLERS message.
cls | identification of the client |
msg | the actual message |
Definition at line 1206 of file gnunet-service-testbed_links.c.
References LinkControllersContext::client, LCFContext::client, NeighbourConnectCtxt::client, Slave::controller_proc, LCFContext::delegated_host_id, Route::dest, LCFContext::gateway, GNUNET_assert, GNUNET_break, GNUNET_break_op, GNUNET_CONTAINER_DLL_insert_tail, GNUNET_CONTAINER_multihashmap_create(), GNUNET_ERROR_TYPE_WARNING, GNUNET_new, GNUNET_NO, GNUNET_ntohll(), GNUNET_SCHEDULER_add_delayed(), GNUNET_SCHEDULER_add_now(), GNUNET_SERVICE_client_continue(), GNUNET_SERVICE_client_drop(), GNUNET_TESTBED_controller_start(), GST_context, GST_create_neighbour(), GST_find_dest_route(), GST_host_list, GST_host_list_size, GST_neighbour_get_connection(), GST_slave_list, GST_slave_list_size, GST_timeout, Context::host_id, Slave::host_id, INIT, LCFContext::is_subordinate, Slave::lcc, lcf_head, lcf_proc_task(), lcf_proc_task_id, lcf_tail, LOG, LOG_DEBUG, Context::master_ip, msg, NeighbourConnectCtxt::n, ncc_head, ncc_tail, neighbour_connect_cb(), neighbour_list, neighbour_list_size, NeighbourConnectCtxt::nh, NeighbourConnectCtxt::op_id, LinkControllersContext::operation_id, LCFContext::operation_id, Slave::reghost_map, route_list, route_list_add(), route_list_size, LCFContext::slave_host_id, slave_list_add(), slave_status_cb(), LCFContext::state, Route::thru, timeout_neighbour_connect(), and NeighbourConnectCtxt::timeout_task.
void GST_link_notify_disconnect | ( | struct GNUNET_SERVICE_Client * | client | ) |
Clean up client handle if we stored any via handle_link_controllers(), the given client disconnected.
client | the client that is history |
Definition at line 1391 of file gnunet-service-testbed_links.c.
References cleanup_ncc(), LinkControllersContext::client, LCFContext::client, NeighbourConnectCtxt::client, drop_client_entries(), GNUNET_CONTAINER_DLL_remove, GNUNET_CONTAINER_multihashmap_iterate(), GNUNET_free, GNUNET_TESTBED_operation_done(), GST_slave_list, GST_slave_list_size, Slave::lcc, lcf_head, lcf_tail, ncc_head, LCFContext::next, NeighbourConnectCtxt::next, LCFContext::op, and Slave::reghost_map.
Referenced by client_disconnect_cb().
void GST_free_lcf | ( | void | ) |
Cleans up the queue used for forwarding link controllers requests.
Definition at line 1444 of file gnunet-service-testbed_links.c.
References GNUNET_assert, GNUNET_CONTAINER_DLL_remove, GNUNET_free, GNUNET_SCHEDULER_cancel(), GNUNET_TESTBED_operation_done(), lcf_head, lcf_proc_task_id, lcf_tail, LCFContext::op, and LCFContext::timeout_task.
Referenced by shutdown_task(), and slave_status_cb().
|
static |
The neighbour list.
Definition at line 219 of file gnunet-service-testbed_links.c.
Referenced by GST_get_neighbour(), GST_neighbour_list_clean(), handle_link_controllers(), and neighbour_list_add().
|
static |
The size of the neighbour list.
Definition at line 224 of file gnunet-service-testbed_links.c.
Referenced by GST_get_neighbour(), GST_neighbour_list_clean(), handle_link_controllers(), and neighbour_list_add().
struct NeighbourConnectCtxt* ncc_head |
DLL head for the list of neighbour connect contexts.
Definition at line 273 of file gnunet-service-testbed_links.c.
Referenced by cleanup_ncc(), GST_free_nccq(), GST_link_notify_disconnect(), and handle_link_controllers().
struct NeighbourConnectCtxt* ncc_tail |
DLL tail for the list of neighbour connect contexts.
Definition at line 278 of file gnunet-service-testbed_links.c.
Referenced by cleanup_ncc(), and handle_link_controllers().
struct Slave** GST_slave_list |
A list of directly linked neighbours.
Definition at line 283 of file gnunet-service-testbed_links.c.
Referenced by destroy_slave(), GST_link_notify_disconnect(), GST_slave_list_clear(), handle_barrier_init(), handle_link_controllers(), handle_peer_create(), handle_shutdown_peers(), handle_slave_get_config(), and slave_list_add().
unsigned int GST_slave_list_size |
The size of directly linked neighbours list.
Definition at line 288 of file gnunet-service-testbed_links.c.
Referenced by GST_link_notify_disconnect(), GST_slave_list_clear(), handle_barrier_init(), handle_link_controllers(), handle_shutdown_peers(), handle_slave_get_config(), and slave_list_add().
|
static |
A list of routes.
Definition at line 293 of file gnunet-service-testbed_links.c.
Referenced by GST_find_dest_route(), GST_route_list_clear(), handle_link_controllers(), and route_list_add().
|
static |
The LCF queue.
Definition at line 298 of file gnunet-service-testbed_links.c.
Referenced by GST_free_lcf(), GST_link_notify_disconnect(), handle_link_controllers(), and lcf_proc_task().
|
static |
The tail for the LCF queue.
Definition at line 303 of file gnunet-service-testbed_links.c.
Referenced by GST_free_lcf(), GST_link_notify_disconnect(), handle_link_controllers(), and lcf_proc_task().
|
static |
The lcf_task handle.
Definition at line 308 of file gnunet-service-testbed_links.c.
Referenced by GST_free_lcf(), handle_link_controllers(), lcf_forwarded_operation_timeout(), lcf_proc_cc(), lcf_proc_task(), and slave_event_cb().
|
static |
The size of the route list.
Definition at line 313 of file gnunet-service-testbed_links.c.
Referenced by GST_find_dest_route(), GST_route_list_clear(), handle_link_controllers(), and route_list_add().