Go to the source code of this file.
◆ GDS_CLIENTS_init()
| void GDS_CLIENTS_init |
( |
void |
| ) |
|
Initialize client subsystem.
Definition at line 2019 of file gnunet-service-dht_clients.c.
2020{
2026}
static struct GNUNET_CONTAINER_Heap * retry_heap
Heap with all of our client's request, sorted by retry time (earliest on top).
static struct GNUNET_CONTAINER_MultiHashMap * forward_map
Hashmap for fast key based lookup, maps keys to struct ClientQueryRecord entries.
struct GNUNET_CONTAINER_MultiHashMap * GNUNET_CONTAINER_multihashmap_create(unsigned int len, int do_not_copy_keys)
Create a multi hash map.
struct GNUNET_CONTAINER_Heap * GNUNET_CONTAINER_heap_create(enum GNUNET_CONTAINER_HeapOrder order)
Create a new heap.
@ GNUNET_CONTAINER_HEAP_ORDER_MIN
Heap with the minimum cost at the root.
References forward_map, GNUNET_CONTAINER_heap_create(), GNUNET_CONTAINER_HEAP_ORDER_MIN, GNUNET_CONTAINER_multihashmap_create(), GNUNET_YES, and retry_heap.
Referenced by run().
◆ GDS_CLIENTS_stop()
| void GDS_CLIENTS_stop |
( |
void |
| ) |
|
Shutdown client subsystem.
Definition at line 2033 of file gnunet-service-dht_clients.c.
2034{
2036
2038 {
2041 }
2043 {
2046 }
2047 while (NULL != (pp =
pp_head))
2048 {
2051 pp);
2054 }
2055}
static struct PendingPut * pp_tail
Tail of the list of PUTs waiting for a usable routing table.
static struct GNUNET_SCHEDULER_Task * retry_task
Task that re-transmits requests (using retry_heap).
static struct PendingPut * pp_head
Head of the list of PUTs waiting for a usable routing table.
static unsigned int pp_count
Number of entries in the pp_head DLL.
static struct GNUNET_SCHEDULER_Task * put_retry_task
Task that re-tries the PUTs in the pp_head DLL.
#define GNUNET_CONTAINER_DLL_remove(head, tail, element)
Remove an element from a DLL.
#define GNUNET_free(ptr)
Wrapper around free.
void * GNUNET_SCHEDULER_cancel(struct GNUNET_SCHEDULER_Task *task)
Cancel the task with the specified identifier.
A local PUT that we could not route anywhere, kept so that we can try again once we have a peer to ro...
References GNUNET_CONTAINER_DLL_remove, GNUNET_free, GNUNET_SCHEDULER_cancel(), pp_count, pp_head, pp_tail, put_retry_task, and retry_task.
Referenced by shutdown_task().