Tor 0.4.9.0-alpha-dev
|
#include <dirserv.h>
Data Fields | |
unsigned | spool_eagerly: 1 |
dir_spool_source_bitfield_t | spool_source: 7 |
uint8_t | digest [DIGEST256_LEN] |
struct cached_dir_t * | cached_dir_ref |
struct consensus_cache_entry_t * | consensus_cache_entry |
const uint8_t * | cce_body |
size_t | cce_len |
off_t | cached_dir_offset |
Object to remember the identity of an object that we are spooling, or about to spool, in response to a directory request.
(Why do we spool? Because some directory responses are very large, and we don't want to just shove the complete answer into the output buffer: that would take a ridiculous amount of RAM.)
If the spooled resource is relatively small (like microdescriptors, descriptors, etc), we look them up by ID as needed, and add the whole thing onto the output buffer at once. If the spooled reseource is big (like networkstatus documents), we reference-count it, and add it a few K at a time.
off_t cached_dir_offset |
struct cached_dir_t* cached_dir_ref |
A large object that we're spooling. Holds a reference count. Only used when spool_eagerly is false.
Definition at line 60 of file dirserv.h.
Referenced by spooled_resource_estimate_size(), and spooled_resource_free_().
struct consensus_cache_entry_t* consensus_cache_entry |
A different kind of large object that we might be spooling. Also reference-counted. Also only used when spool_eagerly is false.
Definition at line 65 of file dirserv.h.
Referenced by spooled_resource_estimate_size(), and spooled_resource_free_().
uint8_t digest[DIGEST256_LEN] |
Tells us the specific object to spool.
Definition at line 55 of file dirserv.h.
Referenced by dirserv_spool_sort_comparison_(), and spooled_resource_lookup_cached_dir().
unsigned spool_eagerly |
If true, we add the entire object to the outbuf. If false, we spool the object a few K at a time.
Definition at line 47 of file dirserv.h.
Referenced by spooled_resource_estimate_size(), spooled_resource_flush_some(), spooled_resource_lookup_body(), and spooled_resource_lookup_cached_dir().
dir_spool_source_bitfield_t spool_source |
Tells us what kind of object to get, and how to look it up.
Definition at line 51 of file dirserv.h.
Referenced by spooled_resource_estimate_size(), and spooled_resource_lookup_body().