GNUnet 0.22.0
CustomPeerMap Struct Reference

Peer map to store peers with specialised use-cases (push_list, pull_list, view, ...) More...

Collaboration diagram for CustomPeerMap:
[legend]

Data Fields

struct GNUNET_CONTAINER_MultiHashMap32hash_map
 Multihashmap to be able to access a random index. More...
 
struct GNUNET_CONTAINER_MultiPeerMappeer_map
 Peermap to quickly check whether a peer is contained. More...
 

Detailed Description

Peer map to store peers with specialised use-cases (push_list, pull_list, view, ...)

It is aimed for use as unordered list-like structures that can be indexed. Main use-case:

permut = GNUNET_CRYPTO_random_permute (GNUNET_CRYPTO_QUALITY_STRONG, CustomPeerMap_size (peer_map)); for (i = 0; i < some_border; i++) some_array[i] = *CustomPeerMap_get_peer_by_index (peer_map, permut[i]); for (i = some_border; i < CustomPeerMap_size (peer_map); i++) other_array[i-some_border] = *CustomPeerMap_get_peer_by_index (peer_map, permut[i]);

This list is expected to

  • be altered in small steps frequently
  • be cleared regularly
  • often being queried whether a peer is contained
  • alter indices of peers
  • contain continuous indices 0 <= i < len
  • not contain duplicate peers

Definition at line 57 of file gnunet-service-rps_custommap.c.

Field Documentation

◆ hash_map

◆ peer_map


The documentation for this struct was generated from the following file: