Electroneum
cachedb.h File Reference
#include "util/module.h"
Include dependency graph for cachedb.h:

Go to the source code of this file.

Classes

struct  cachedb_env
 
struct  cachedb_qstate
 
struct  cachedb_backend
 

Macros

#define CACHEDB_HASHSIZE   256 /* bit hash */
 

Functions

int cachedb_init (struct module_env *env, int id)
 
void cachedb_deinit (struct module_env *env, int id)
 
void cachedb_operate (struct module_qstate *qstate, enum module_ev event, int id, struct outbound_entry *outbound)
 
void cachedb_inform_super (struct module_qstate *qstate, int id, struct module_qstate *super)
 
void cachedb_clear (struct module_qstate *qstate, int id)
 
size_t cachedb_get_mem (struct module_env *env, int id)
 
struct module_func_blockcachedb_get_funcblock (void)
 

Detailed Description

This file contains a module that uses an external database to cache dns responses.

Definition in file cachedb.h.

Macro Definition Documentation

◆ CACHEDB_HASHSIZE

#define CACHEDB_HASHSIZE   256 /* bit hash */

Definition at line 90 of file cachedb.h.

Function Documentation

◆ cachedb_clear()

void cachedb_clear ( struct module_qstate qstate,
int  id 
)

clear the cachedb query-specific contents out of qstate

◆ cachedb_deinit()

void cachedb_deinit ( struct module_env env,
int  id 
)

Deinit the cachedb module

◆ cachedb_get_funcblock()

struct module_func_block* cachedb_get_funcblock ( void  )

Get the function block with pointers to the cachedb functions

Returns
the function block for "cachedb".

◆ cachedb_get_mem()

size_t cachedb_get_mem ( struct module_env env,
int  id 
)

return memory estimate for cachedb module

◆ cachedb_inform_super()

void cachedb_inform_super ( struct module_qstate qstate,
int  id,
struct module_qstate super 
)

Subordinate query done, inform this super request of its conclusion

◆ cachedb_init()

int cachedb_init ( struct module_env env,
int  id 
)

Init the cachedb module

◆ cachedb_operate()

void cachedb_operate ( struct module_qstate qstate,
enum module_ev  event,
int  id,
struct outbound_entry outbound 
)

Operate on an event on a query (in qstate).