GNUnet  0.10.x
Functions
gnunet-service-fs_pe.h File Reference

API to manage query plan. More...

#include "gnunet-service-fs.h"
Include dependency graph for gnunet-service-fs_pe.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void GSF_plan_add_ (struct GSF_ConnectedPeer *cp, struct GSF_PendingRequest *pr)
 Create a new query plan entry. More...
 
void GSF_plan_notify_peer_disconnect_ (const struct GSF_ConnectedPeer *cp)
 Notify the plan about a peer being no longer available; destroy all entries associated with this peer. More...
 
void GSF_plan_notify_request_done_ (struct GSF_PendingRequest *pr)
 Notify the plan about a request being done; destroy all entries associated with this request. More...
 
int GSF_request_plan_reference_get_last_transmission_ (struct GSF_PendingRequestPlanBijection *pr_head, struct GSF_ConnectedPeer *sender, struct GNUNET_TIME_Absolute *result)
 Get the last transmission attempt time for the request plan list referenced by 'rpr_head', that was sent to 'sender'. More...
 
void GSF_plan_init (void)
 Initialize plan subsystem. More...
 
void GSF_plan_done (void)
 Shutdown plan subsystem. More...
 

Detailed Description

API to manage query plan.

Author
Christian Grothoff

Definition in file gnunet-service-fs_pe.h.

Function Documentation

◆ GSF_plan_add_()

void GSF_plan_add_ ( struct GSF_ConnectedPeer cp,
struct GSF_PendingRequest pr 
)

Create a new query plan entry.

Parameters
cppeer with the entry
prrequest with the entry

Definition at line 552 of file gnunet-service-fs_pe.c.

References PeerPlan::cp, PeerPlan::delay_heap, get_rp_key(), gettext_noop, GNUNET_assert, GNUNET_CONTAINER_heap_create(), GNUNET_CONTAINER_HEAP_ORDER_MAX, GNUNET_CONTAINER_HEAP_ORDER_MIN, GNUNET_CONTAINER_MDLL_insert, GNUNET_CONTAINER_multihashmap_create(), GNUNET_CONTAINER_multihashmap_get_multiple(), GNUNET_CONTAINER_multihashmap_put(), GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE, GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY, GNUNET_CONTAINER_multipeermap_get(), GNUNET_CONTAINER_multipeermap_put(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_h2s(), GNUNET_i2s(), GNUNET_log, GNUNET_new, GNUNET_NO, GNUNET_OK, GNUNET_SCHEDULER_add_now(), GNUNET_STATISTICS_update(), GNUNET_YES, GSF_connected_peer_get_identity2_(), GSF_pending_request_get_data_(), GSF_pending_request_test_active_(), GSF_stats, id, merge_pr(), MergeContext::merged, GSF_RequestPlan::pe_head, GSF_RequestPlan::pe_tail, plan(), plan_count, PeerPlan::plan_map, GSF_RequestPlan::pp, GSF_PendingRequestPlanBijection::pr, MergeContext::pr, GSF_PendingRequestData::pr_head, GSF_PendingRequestData::pr_tail, PeerPlan::priority_heap, GSF_PendingRequestData::query, GSF_PendingRequestPlanBijection::rp, schedule_peer_transmission(), and PeerPlan::task.

Referenced by consider_peer_for_forwarding(), and consider_request_for_forwarding().

554 {
555  const struct GNUNET_PeerIdentity *id;
556  struct PeerPlan *pp;
557  struct GSF_PendingRequestData *prd;
558  struct GSF_RequestPlan *rp;
560  struct MergeContext mpc;
561 
564  GNUNET_assert(NULL != cp);
567  if (NULL == pp)
568  {
569  pp = GNUNET_new(struct PeerPlan);
571  pp->priority_heap =
573  pp->delay_heap =
575  pp->cp = cp;
578  id,
579  pp,
582  pp);
583  }
584  mpc.merged = GNUNET_NO;
585  mpc.pr = pr;
588  &prd->query,
589  &merge_pr,
590  &mpc);
591  if (GNUNET_NO != mpc.merged)
592  return;
593  plan_count++;
595  gettext_noop("# query plan entries"),
596  1,
597  GNUNET_NO);
599  "Planning transmission of query `%s' to peer `%s'\n",
600  GNUNET_h2s(&prd->query),
601  GNUNET_i2s(id));
602  rp = GNUNET_new(struct GSF_RequestPlan);
604  bi->rp = rp;
605  bi->pr = pr;
607  prd->pr_head,
608  prd->pr_tail,
609  bi);
611  rp->pe_head,
612  rp->pe_tail,
613  bi);
614  rp->pp = pp;
617  get_rp_key(rp),
618  rp,
620  plan(pp,
621  rp);
622 }
Closure for merge_pr().
struct GNUNET_CONTAINER_MultiHashMap * plan_map
Map of queries to plan entries.
Transmission plan for a peer.
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
static unsigned long long plan_count
Number of plan entries.
struct GSF_PendingRequestPlanBijection * pr_head
Fields for the plan module to track a DLL with the request.
struct GNUNET_STATISTICS_Handle * GSF_stats
Handle for reporting statistics.
#define GNUNET_NO
Definition: gnunet_common.h:78
static struct GNUNET_IDENTITY_Handle * id
Handle to identity service.
const char * GNUNET_h2s(const struct GNUNET_HashCode *hc)
Convert a hash value to a string (for printing debug messages).
#define GNUNET_OK
Named constants for return values.
Definition: gnunet_common.h:75
#define GNUNET_new(type)
Allocate a struct or union of the given type.
void GNUNET_STATISTICS_update(struct GNUNET_STATISTICS_Handle *handle, const char *name, int64_t delta, int make_persistent)
Set statistic value for the peer.
static const struct GNUNET_HashCode * get_rp_key(struct GSF_RequestPlan *rp)
Return the query (key in the plan_map) for the given request plan.
struct GSF_ConnectedPeer * cp
Peer for which this is the plan.
struct GSF_RequestPlan * rp
Associated request plan (tells us one of the peers that we plan to forward the request to)...
struct GNUNET_HashCode query
Primary query hash for this request.
struct GSF_PendingRequestPlanBijection * pe_head
Head of list of associated pending requests.
struct GSF_PendingRequestPlanBijection * pe_tail
Tail of list of associated pending requests.
struct GNUNET_CONTAINER_Heap * delay_heap
Heap with pending queries (struct GSF_RequestPlan), by transmission time, lowest first.
Public data (in the sense of not encapsulated within 'gnunet-service-fs_pr', not in the sense of netw...
static void schedule_peer_transmission(void *cls)
Figure out when and how to transmit to the given peer.
#define GNUNET_CONTAINER_MDLL_insert(mdll, head, tail, element)
Insert an element at the head of a MDLL.
struct PeerPlan * pp
The transmission plan for a peer that this request is associated with.
int GSF_pending_request_test_active_(struct GSF_PendingRequest *pr)
Check if the given request is still active.
struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_now(GNUNET_SCHEDULER_TaskCallback task, void *task_cls)
Schedule a new task to be run as soon as possible.
Definition: scheduler.c:1264
static void plan(struct PeerPlan *pp, struct GSF_RequestPlan *rp)
Insert the given request plan into the heap with the appropriate weight.
Heap with the minimum cost at the root.
struct GSF_PendingRequest * pr
Associated pending request (identifies request details and one of the origins of the request)...
There must only be one value per key; storing a value should fail if a value under the same key alrea...
struct GSF_PendingRequestPlanBijection * pr_tail
Fields for the plan module to track a DLL with the request.
Information we keep per request per peer.
int GNUNET_CONTAINER_multihashmap_put(struct GNUNET_CONTAINER_MultiHashMap *map, const struct GNUNET_HashCode *key, void *value, enum GNUNET_CONTAINER_MultiHashMapOption opt)
Store a key-value pair in the map.
struct GNUNET_CONTAINER_Heap * GNUNET_CONTAINER_heap_create(enum GNUNET_CONTAINER_HeapOrder order)
Create a new heap.
Allow multiple values with the same key.
int GNUNET_CONTAINER_multipeermap_put(struct GNUNET_CONTAINER_MultiPeerMap *map, const struct GNUNET_PeerIdentity *key, void *value, enum GNUNET_CONTAINER_MultiHashMapOption opt)
Store a key-value pair in the map.
The identity of the host (wraps the signing key of the peer).
struct GSF_PendingRequestData * GSF_pending_request_get_data_(struct GSF_PendingRequest *pr)
Obtain the public data associated with a pending request.
int GNUNET_CONTAINER_multihashmap_get_multiple(struct GNUNET_CONTAINER_MultiHashMap *map, const struct GNUNET_HashCode *key, GNUNET_CONTAINER_MulitHashMapIteratorCallback it, void *it_cls)
Iterate over all entries in the map that match a particular key.
const struct GNUNET_PeerIdentity * GSF_connected_peer_get_identity2_(const struct GSF_ConnectedPeer *cp)
Obtain the identity of a connected peer.
void * GNUNET_CONTAINER_multipeermap_get(const struct GNUNET_CONTAINER_MultiPeerMap *map, const struct GNUNET_PeerIdentity *key)
Given a key find a value in the map matching the key.
Heap with the maximum cost at the root.
#define GNUNET_log(kind,...)
struct GSF_PendingRequest * pr
Request we are trying to merge.
struct GNUNET_CONTAINER_MultiHashMap * GNUNET_CONTAINER_multihashmap_create(unsigned int len, int do_not_copy_keys)
Create a multi hash map.
static char * rp
Relying party.
#define GNUNET_YES
Definition: gnunet_common.h:77
struct GNUNET_SCHEDULER_Task * task
Current task for executing the plan.
static int merge_pr(void *cls, const struct GNUNET_HashCode *query, void *element)
Iterator that checks if an equivalent request is already present for this peer.
static struct GNUNET_CONTAINER_MultiPeerMap * plans
Hash map from peer identities to PeerPlans.
const char * GNUNET_i2s(const struct GNUNET_PeerIdentity *pid)
Convert a peer identity to a string (for printing debug messages).
M:N binding of plans to pending requests.
#define gettext_noop(String)
Definition: gettext.h:69
struct GNUNET_CONTAINER_Heap * priority_heap
Heap with pending queries (struct GSF_RequestPlan), higher weights mean higher priority.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GSF_plan_notify_peer_disconnect_()

void GSF_plan_notify_peer_disconnect_ ( const struct GSF_ConnectedPeer cp)

Notify the plan about a peer being no longer available; destroy all entries associated with this peer.

Parameters
cpconnected peer

Definition at line 632 of file gnunet-service-fs_pe.c.

References PeerPlan::delay_heap, get_rp_key(), gettext_noop, GNUNET_assert, GNUNET_break, GNUNET_CONTAINER_heap_destroy(), GNUNET_CONTAINER_heap_remove_root(), GNUNET_CONTAINER_MDLL_remove, GNUNET_CONTAINER_multihashmap_destroy(), GNUNET_CONTAINER_multihashmap_remove(), GNUNET_CONTAINER_multipeermap_get(), GNUNET_CONTAINER_multipeermap_remove(), GNUNET_free, GNUNET_NO, GNUNET_SCHEDULER_cancel(), GNUNET_STATISTICS_set(), GNUNET_YES, GSF_connected_peer_get_identity2_(), GSF_pending_request_get_data_(), GSF_stats, id, GSF_RequestPlan::pe_head, GSF_RequestPlan::pe_tail, plan_count, PeerPlan::plan_map, GSF_PendingRequestPlanBijection::pr, GSF_PendingRequestData::pr_head, GSF_PendingRequestData::pr_tail, PeerPlan::priority_heap, GSF_PendingRequestPlanBijection::rp, and PeerPlan::task.

Referenced by GSF_peer_disconnect_handler().

633 {
634  const struct GNUNET_PeerIdentity *id;
635  struct PeerPlan *pp;
636  struct GSF_RequestPlan *rp;
637  struct GSF_PendingRequestData *prd;
639 
642  if (NULL == pp)
643  return; /* nothing was ever planned for this peer */
646  pp));
647  if (NULL != pp->task)
648  {
650  pp->task = NULL;
651  }
652  while (NULL != (rp = GNUNET_CONTAINER_heap_remove_root(pp->priority_heap)))
653  {
656  get_rp_key(rp),
657  rp));
658  while (NULL != (bi = rp->pe_head))
659  {
661  rp->pe_head,
662  rp->pe_tail,
663  bi);
666  prd->pr_head,
667  prd->pr_tail,
668  bi);
669  GNUNET_free(bi);
670  }
671  plan_count--;
672  GNUNET_free(rp);
673  }
675  while (NULL != (rp = GNUNET_CONTAINER_heap_remove_root(pp->delay_heap)))
676  {
679  get_rp_key(rp),
680  rp));
681  while (NULL != (bi = rp->pe_head))
682  {
685  rp->pe_head,
686  rp->pe_tail,
687  bi);
689  prd->pr_head,
690  prd->pr_tail,
691  bi);
692  GNUNET_free(bi);
693  }
694  plan_count--;
695  GNUNET_free(rp);
696  }
698  gettext_noop("# query plan entries"),
699  plan_count,
700  GNUNET_NO);
703  GNUNET_free(pp);
704 }
struct GNUNET_CONTAINER_MultiHashMap * plan_map
Map of queries to plan entries.
Transmission plan for a peer.
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
static unsigned long long plan_count
Number of plan entries.
struct GSF_PendingRequestPlanBijection * pr_head
Fields for the plan module to track a DLL with the request.
struct GNUNET_STATISTICS_Handle * GSF_stats
Handle for reporting statistics.
int GNUNET_CONTAINER_multipeermap_remove(struct GNUNET_CONTAINER_MultiPeerMap *map, const struct GNUNET_PeerIdentity *key, const void *value)
Remove the given key-value pair from the map.
#define GNUNET_NO
Definition: gnunet_common.h:78
static struct GNUNET_IDENTITY_Handle * id
Handle to identity service.
static const struct GNUNET_HashCode * get_rp_key(struct GSF_RequestPlan *rp)
Return the query (key in the plan_map) for the given request plan.
#define GNUNET_break(cond)
Use this for internal assertion violations that are not fatal (can be handled) but should not occur...
struct GSF_PendingRequestPlanBijection * pe_head
Head of list of associated pending requests.
struct GSF_PendingRequestPlanBijection * pe_tail
Tail of list of associated pending requests.
struct GNUNET_CONTAINER_Heap * delay_heap
Heap with pending queries (struct GSF_RequestPlan), by transmission time, lowest first.
Public data (in the sense of not encapsulated within 'gnunet-service-fs_pr', not in the sense of netw...
void GNUNET_CONTAINER_multihashmap_destroy(struct GNUNET_CONTAINER_MultiHashMap *map)
Destroy a hash map.
#define GNUNET_CONTAINER_MDLL_remove(mdll, head, tail, element)
Remove an element from a MDLL.
int GNUNET_CONTAINER_multihashmap_remove(struct GNUNET_CONTAINER_MultiHashMap *map, const struct GNUNET_HashCode *key, const void *value)
Remove the given key-value pair from the map.
void GNUNET_STATISTICS_set(struct GNUNET_STATISTICS_Handle *handle, const char *name, uint64_t value, int make_persistent)
Set statistic value for the peer.
void GNUNET_CONTAINER_heap_destroy(struct GNUNET_CONTAINER_Heap *heap)
Destroys the heap.
struct GSF_PendingRequest * pr
Associated pending request (identifies request details and one of the origins of the request)...
struct GSF_PendingRequestPlanBijection * pr_tail
Fields for the plan module to track a DLL with the request.
Information we keep per request per peer.
The identity of the host (wraps the signing key of the peer).
struct GSF_PendingRequestData * GSF_pending_request_get_data_(struct GSF_PendingRequest *pr)
Obtain the public data associated with a pending request.
const struct GNUNET_PeerIdentity * GSF_connected_peer_get_identity2_(const struct GSF_ConnectedPeer *cp)
Obtain the identity of a connected peer.
void * GNUNET_CONTAINER_multipeermap_get(const struct GNUNET_CONTAINER_MultiPeerMap *map, const struct GNUNET_PeerIdentity *key)
Given a key find a value in the map matching the key.
void * GNUNET_CONTAINER_heap_remove_root(struct GNUNET_CONTAINER_Heap *heap)
Remove root of the heap.
static char * rp
Relying party.
#define GNUNET_YES
Definition: gnunet_common.h:77
struct GNUNET_SCHEDULER_Task * task
Current task for executing the plan.
static struct GNUNET_CONTAINER_MultiPeerMap * plans
Hash map from peer identities to PeerPlans.
#define GNUNET_free(ptr)
Wrapper around free.
M:N binding of plans to pending requests.
#define gettext_noop(String)
Definition: gettext.h:69
struct GNUNET_CONTAINER_Heap * priority_heap
Heap with pending queries (struct GSF_RequestPlan), higher weights mean higher priority.
void * GNUNET_SCHEDULER_cancel(struct GNUNET_SCHEDULER_Task *task)
Cancel the task with the specified identifier.
Definition: scheduler.c:956
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GSF_plan_notify_request_done_()

void GSF_plan_notify_request_done_ ( struct GSF_PendingRequest pr)

Notify the plan about a request being done; destroy all entries associated with this request.

Parameters
prrequest that is done

Definition at line 745 of file gnunet-service-fs_pe.c.

References gettext_noop, GNUNET_assert, GNUNET_break, GNUNET_CONTAINER_heap_remove_node(), GNUNET_CONTAINER_MDLL_remove, GNUNET_CONTAINER_multihashmap_remove(), GNUNET_free, GNUNET_NO, GNUNET_STATISTICS_set(), GNUNET_YES, GSF_pending_request_get_data_(), GSF_stats, GSF_RequestPlan::hn, GSF_RequestPlan::pe_head, GSF_RequestPlan::pe_tail, plan_count, PeerPlan::plan_map, GSF_RequestPlan::pp, GSF_PendingRequestPlanBijection::pr, GSF_PendingRequestData::pr_head, GSF_PendingRequestData::pr_tail, GSF_PendingRequestData::query, and GSF_PendingRequestPlanBijection::rp.

Referenced by clean_request(), and GSF_pending_request_cancel_().

746 {
747  struct GSF_RequestPlan *rp;
748  struct GSF_PendingRequestData *prd;
750 
752  while (NULL != (bi = prd->pr_head))
753  {
754  rp = bi->rp;
756  prd->pr_head,
757  prd->pr_tail,
758  bi);
760  rp->pe_head,
761  rp->pe_tail,
762  bi);
763  GNUNET_assert(bi->pr == pr);
764  if (NULL == rp->pe_head)
765  {
767  plan_count--;
770  &prd->query,
771  rp));
772  GNUNET_free(rp);
773  }
774  GNUNET_free(bi);
775  }
777  gettext_noop("# query plan entries"),
778  plan_count,
779  GNUNET_NO);
780 }
struct GNUNET_CONTAINER_MultiHashMap * plan_map
Map of queries to plan entries.
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
static unsigned long long plan_count
Number of plan entries.
struct GSF_PendingRequestPlanBijection * pr_head
Fields for the plan module to track a DLL with the request.
struct GNUNET_STATISTICS_Handle * GSF_stats
Handle for reporting statistics.
#define GNUNET_NO
Definition: gnunet_common.h:78
#define GNUNET_break(cond)
Use this for internal assertion violations that are not fatal (can be handled) but should not occur...
struct GSF_RequestPlan * rp
Associated request plan (tells us one of the peers that we plan to forward the request to)...
struct GNUNET_HashCode query
Primary query hash for this request.
struct GSF_PendingRequestPlanBijection * pe_head
Head of list of associated pending requests.
struct GSF_PendingRequestPlanBijection * pe_tail
Tail of list of associated pending requests.
Public data (in the sense of not encapsulated within 'gnunet-service-fs_pr', not in the sense of netw...
struct PeerPlan * pp
The transmission plan for a peer that this request is associated with.
#define GNUNET_CONTAINER_MDLL_remove(mdll, head, tail, element)
Remove an element from a MDLL.
int GNUNET_CONTAINER_multihashmap_remove(struct GNUNET_CONTAINER_MultiHashMap *map, const struct GNUNET_HashCode *key, const void *value)
Remove the given key-value pair from the map.
void GNUNET_STATISTICS_set(struct GNUNET_STATISTICS_Handle *handle, const char *name, uint64_t value, int make_persistent)
Set statistic value for the peer.
struct GSF_PendingRequest * pr
Associated pending request (identifies request details and one of the origins of the request)...
struct GSF_PendingRequestPlanBijection * pr_tail
Fields for the plan module to track a DLL with the request.
struct GNUNET_CONTAINER_HeapNode * hn
Heap node associated with this request and this peer.
Information we keep per request per peer.
struct GSF_PendingRequestData * GSF_pending_request_get_data_(struct GSF_PendingRequest *pr)
Obtain the public data associated with a pending request.
static char * rp
Relying party.
#define GNUNET_YES
Definition: gnunet_common.h:77
void * GNUNET_CONTAINER_heap_remove_node(struct GNUNET_CONTAINER_HeapNode *node)
Removes a node from the heap.
#define GNUNET_free(ptr)
Wrapper around free.
M:N binding of plans to pending requests.
#define gettext_noop(String)
Definition: gettext.h:69
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GSF_request_plan_reference_get_last_transmission_()

int GSF_request_plan_reference_get_last_transmission_ ( struct GSF_PendingRequestPlanBijection pr_head,
struct GSF_ConnectedPeer sender,
struct GNUNET_TIME_Absolute result 
)

Get the last transmission attempt time for the request plan list referenced by 'rpr_head', that was sent to 'sender'.

Parameters
pr_headrequest plan reference list to check.
senderthe peer that we've sent the request to.
resultthe timestamp to fill.
Returns
GNUNET_YES if 'result' was changed, GNUNET_NO otherwise.

Get the last transmission attempt time for the request plan list referenced by 'rpr_head', that was sent to 'sender'.

Parameters
pr_headrequest plan reference list to check.
senderthe peer that we've sent the request to.
resultthe timestamp to fill, set to GNUNET_TIME_UNIT_FOREVER_ABS if never transmitted
Returns
GNUNET_YES if result was changed, GNUNET_NO otherwise.

Definition at line 717 of file gnunet-service-fs_pe.c.

References GNUNET_TIME_Absolute::abs_value_us, PeerPlan::cp, GNUNET_NO, GNUNET_TIME_UNIT_FOREVER_ABS, GNUNET_YES, GSF_RequestPlan::last_transmission, GSF_PendingRequestPlanBijection::next_PR, GSF_RequestPlan::pp, and GSF_PendingRequestPlanBijection::rp.

Referenced by process_reply().

720 {
722 
723  for (bi = pr_head; NULL != bi; bi = bi->next_PR)
724  {
725  if (bi->rp->pp->cp == sender)
726  {
727  if (0 == bi->rp->last_transmission.abs_value_us)
729  else
730  *result = bi->rp->last_transmission;
731  return GNUNET_YES;
732  }
733  }
734  return GNUNET_NO;
735 }
#define GNUNET_NO
Definition: gnunet_common.h:78
struct GSF_PendingRequestPlanBijection * next_PR
This is a doubly-linked list.
uint64_t abs_value_us
The actual value.
struct GSF_ConnectedPeer * cp
Peer for which this is the plan.
struct GSF_RequestPlan * rp
Associated request plan (tells us one of the peers that we plan to forward the request to)...
#define GNUNET_TIME_UNIT_FOREVER_ABS
Constant used to specify "forever".
struct PeerPlan * pp
The transmission plan for a peer that this request is associated with.
struct GNUNET_TIME_Absolute last_transmission
When was the last time we transmitted this request to this peer? 0 for never.
#define GNUNET_YES
Definition: gnunet_common.h:77
M:N binding of plans to pending requests.
Here is the caller graph for this function:

◆ GSF_plan_init()

void GSF_plan_init ( void  )

Initialize plan subsystem.

Definition at line 787 of file gnunet-service-fs_pe.c.

References GNUNET_CONTAINER_multipeermap_create(), and GNUNET_YES.

Referenced by run().

788 {
790  GNUNET_YES);
791 }
struct GNUNET_CONTAINER_MultiPeerMap * GNUNET_CONTAINER_multipeermap_create(unsigned int len, int do_not_copy_keys)
Create a multi peer map (hash map for public keys of peers).
#define GNUNET_YES
Definition: gnunet_common.h:77
static struct GNUNET_CONTAINER_MultiPeerMap * plans
Hash map from peer identities to PeerPlans.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GSF_plan_done()

void GSF_plan_done ( void  )

Shutdown plan subsystem.

Definition at line 798 of file gnunet-service-fs_pe.c.

References GNUNET_assert, GNUNET_CONTAINER_multipeermap_destroy(), and GNUNET_CONTAINER_multipeermap_size().

Referenced by shutdown_task().

799 {
802 }
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
void GNUNET_CONTAINER_multipeermap_destroy(struct GNUNET_CONTAINER_MultiPeerMap *map)
Destroy a hash map.
unsigned int GNUNET_CONTAINER_multipeermap_size(const struct GNUNET_CONTAINER_MultiPeerMap *map)
Get the number of key-value pairs in the map.
static struct GNUNET_CONTAINER_MultiPeerMap * plans
Hash map from peer identities to PeerPlans.
Here is the call graph for this function:
Here is the caller graph for this function: