GNUnet 0.28.1-dev.4-46-g92a0edb0d
 
Loading...
Searching...
No Matches
gnunet-service-dht_clients.h File Reference
Include dependency graph for gnunet-service-dht_clients.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void GDS_CLIENTS_init (void)
 Initialize client subsystem.
 
void GDS_CLIENTS_stop (void)
 Shutdown client subsystem.
 

Function Documentation

◆ GDS_CLIENTS_init()

void GDS_CLIENTS_init ( void  )

Initialize client subsystem.

Definition at line 2019 of file gnunet-service-dht_clients.c.

2020{
2023 GNUNET_YES);
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.
@ GNUNET_YES

References forward_map, GNUNET_CONTAINER_heap_create(), GNUNET_CONTAINER_HEAP_ORDER_MIN, GNUNET_CONTAINER_multihashmap_create(), GNUNET_YES, and retry_heap.

Referenced by run().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GDS_CLIENTS_stop()

void GDS_CLIENTS_stop ( void  )

Shutdown client subsystem.

Definition at line 2033 of file gnunet-service-dht_clients.c.

2034{
2035 struct PendingPut *pp;
2036
2037 if (NULL != retry_task)
2038 {
2040 retry_task = NULL;
2041 }
2042 if (NULL != put_retry_task)
2043 {
2045 put_retry_task = NULL;
2046 }
2047 while (NULL != (pp = pp_head))
2048 {
2050 pp_tail,
2051 pp);
2052 pp_count--;
2053 GNUNET_free (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.
Definition scheduler.c:986
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().

Here is the call graph for this function:
Here is the caller graph for this function: