Tor  0.4.6.0-alpha-dev
Functions
dircache_stub.c File Reference

Stub declarations for use when dircache module is disabled. More...

#include "core/or/or.h"
#include "feature/dircache/consdiffmgr.h"
#include "feature/dircache/dircache.h"
#include "feature/dircache/dirserv.h"
#include "feature/dircommon/dir_connection_st.h"

Go to the source code of this file.

Functions

int directory_handle_command (dir_connection_t *conn)
 
int connection_dirserv_flushed_some (dir_connection_t *conn)
 
void dir_conn_clear_spool (dir_connection_t *conn)
 
void consdiffmgr_enable_background_compression (void)
 
int consdiffmgr_add_consensus (const char *consensus, size_t consensus_len, const networkstatus_t *as_parsed)
 
int consdiffmgr_register_with_sandbox (struct sandbox_cfg_elem_t **cfg)
 
int consdiffmgr_cleanup (void)
 
void consdiffmgr_free_all (void)
 
void dirserv_free_all (void)
 

Detailed Description

Stub declarations for use when dircache module is disabled.

Definition in file dircache_stub.c.

Function Documentation

◆ consdiffmgr_add_consensus()

int consdiffmgr_add_consensus ( const char *  consensus,
size_t  consensus_len,
const networkstatus_t as_parsed 
)

Given a buffer containing a networkstatus consensus, and the results of having parsed that consensus, add that consensus to the cache if it is not already present and not too old. Create new consensus diffs from or to that consensus as appropriate.

Return 0 on success and -1 on failure.

Definition at line 49 of file dircache_stub.c.

◆ consdiffmgr_cleanup()

int consdiffmgr_cleanup ( void  )

Perform periodic cleanup tasks on the consensus diff cache. Return the number of objects marked for deletion.

Definition at line 67 of file dircache_stub.c.

◆ consdiffmgr_enable_background_compression()

void consdiffmgr_enable_background_compression ( void  )

Tell the consdiffmgr backend to compress consensuses in worker threads.

Definition at line 44 of file dircache_stub.c.

◆ consdiffmgr_free_all()

void consdiffmgr_free_all ( void  )

Called before shutdown: drop all storage held by the consdiffmgr.c module.

Definition at line 73 of file dircache_stub.c.

◆ consdiffmgr_register_with_sandbox()

int consdiffmgr_register_with_sandbox ( struct sandbox_cfg_elem_t **  cfg)

Tell the sandbox (if any) configured by cfg to allow the operations that the consensus diff manager will need.

Definition at line 60 of file dircache_stub.c.

◆ directory_handle_command()

int directory_handle_command ( dir_connection_t conn)

Called when a dirserver receives data on a directory connection; looks for an HTTP request. If the request is complete, remove it from the inbuf, try to process it; otherwise, leave it on the buffer. Return a 0 on success, or -1 on error.

Definition at line 19 of file dircache_stub.c.