tor  master
Public Member Functions | Data Fields
consensus_cache_entry_t Struct Reference
Collaboration diagram for consensus_cache_entry_t:
Collaboration graph
[legend]

Public Member Functions

 HANDLE_ENTRY (consensus_cache_entry, consensus_cache_entry_t)
 

Data Fields

uint32_t magic
 
int32_t refcnt
 
unsigned can_remove: 1
 
unsigned release_aggressively: 1
 
char * fname
 
config_line_tlabels
 
consensus_cache_tin_cache
 
time_t unused_since
 
tor_mmap_tmap
 
size_t bodylen
 
const uint8_t * body
 

Detailed Description

A consensus_cache_entry_t is a reference-counted handle to an item in a consensus_cache_t. It can be mmapped into RAM, or not, depending whether it's currently in use.

Field Documentation

◆ body

const uint8_t* body

Pointer to the body within map.

◆ bodylen

size_t bodylen

Length of the body within map.

◆ can_remove

unsigned can_remove

If true, we want to delete this file.

◆ fname

char* fname

Filename for this object within the storage_dir_t

◆ in_cache

consensus_cache_t* in_cache

Pointer to the cache that includes this entry (if any).

◆ labels

config_line_t* labels

Labels associated with this object. Immutable once the object is created.

◆ magic

uint32_t magic

Must be set to CCE_MAGIC

◆ map

tor_mmap_t* map

mmaped contents of the underlying file. May be NULL

◆ refcnt

int32_t refcnt

Reference count.

◆ release_aggressively

unsigned release_aggressively

If true, we intend to unmap this file as soon as we're done with it.

◆ unused_since

time_t unused_since

Since what time has this object been mapped into RAM, but with the cache being the only having a reference to it?


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