GNUnet 0.29.1-12-g57a93edc3
 
Loading...
Searching...
No Matches
GNUNET_CONTAINER_MultiMap Struct Reference

Internal representation of a map. More...

Collaboration diagram for GNUNET_CONTAINER_MultiMap:
[legend]

Data Fields

struct MapEntry ** buckets
 All of our buckets, map_length many.
 
unsigned int size
 Number of entries in the map.
 
unsigned int map_length
 Length of the buckets array, always a power of two.
 
unsigned int shift
 64 minus the binary logarithm of map_length, for Fibonacci hashing.
 
bool unprotected
 True if the map was created with GNUNET_CONTAINER_MULTIMAP_FLAG_UNPROTECTED: buckets are then chosen by Fibonacci hashing of the first 8 bytes of the key instead of by SipHash with sip_key.
 
unsigned int modification_counter
 Counts the destructive modifications (grow, remove) to the map, so that iterators can check if they are still valid.
 
unsigned int next_cache_off
 Offset of next_cache entries in use, must be smaller than NEXT_CACHE_SIZE.
 
size_t key_size
 Size of the keys in bytes.
 
enum KeyStorage storage
 How keys are stored.
 
uint64_t sip_key [2]
 Random SipHash key of this map, unless it is unprotected.
 
struct MapEntry * next_cache [16]
 Map entries indicating iteration positions currently in use by GNUNET_CONTAINER_multimap_iterate_() and GNUNET_CONTAINER_multimap_get_multiple_().
 

Detailed Description

Internal representation of a map.

Definition at line 157 of file container_multimap.c.

Field Documentation

◆ buckets

struct MapEntry** GNUNET_CONTAINER_MultiMap::buckets

All of our buckets, map_length many.

Definition at line 162 of file container_multimap.c.

◆ size

unsigned int GNUNET_CONTAINER_MultiMap::size

Number of entries in the map.

Definition at line 167 of file container_multimap.c.

◆ map_length

unsigned int GNUNET_CONTAINER_MultiMap::map_length

Length of the buckets array, always a power of two.

Definition at line 172 of file container_multimap.c.

Referenced by GNUNET_CONTAINER_multimap_create_().

◆ shift

unsigned int GNUNET_CONTAINER_MultiMap::shift

64 minus the binary logarithm of map_length, for Fibonacci hashing.

Definition at line 178 of file container_multimap.c.

◆ unprotected

bool GNUNET_CONTAINER_MultiMap::unprotected

True if the map was created with GNUNET_CONTAINER_MULTIMAP_FLAG_UNPROTECTED: buckets are then chosen by Fibonacci hashing of the first 8 bytes of the key instead of by SipHash with sip_key.

Definition at line 186 of file container_multimap.c.

◆ modification_counter

unsigned int GNUNET_CONTAINER_MultiMap::modification_counter

Counts the destructive modifications (grow, remove) to the map, so that iterators can check if they are still valid.

Definition at line 192 of file container_multimap.c.

◆ next_cache_off

unsigned int GNUNET_CONTAINER_MultiMap::next_cache_off

Offset of next_cache entries in use, must be smaller than NEXT_CACHE_SIZE.

Definition at line 198 of file container_multimap.c.

◆ key_size

size_t GNUNET_CONTAINER_MultiMap::key_size

Size of the keys in bytes.

Definition at line 203 of file container_multimap.c.

Referenced by GNUNET_CONTAINER_multimap_create_().

◆ storage

enum KeyStorage GNUNET_CONTAINER_MultiMap::storage

How keys are stored.

Definition at line 208 of file container_multimap.c.

◆ sip_key

uint64_t GNUNET_CONTAINER_MultiMap::sip_key[2]

Random SipHash key of this map, unless it is unprotected.

Definition at line 213 of file container_multimap.c.

◆ next_cache

struct MapEntry* GNUNET_CONTAINER_MultiMap::next_cache[16]

Map entries indicating iteration positions currently in use by GNUNET_CONTAINER_multimap_iterate_() and GNUNET_CONTAINER_multimap_get_multiple_().

Only used up to next_cache_off.

Definition at line 221 of file container_multimap.c.


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