unbound
0.1
|
The context structure. More...
#include <context.h>
Data Fields | |
lock_basic_type | qqpipe_lock |
mutex on query write pipe | |
struct tube * | qq_pipe |
the query write pipe | |
lock_basic_type | rrpipe_lock |
mutex on result read pipe | |
struct tube * | rr_pipe |
the result read pipe | |
lock_basic_type | cfglock |
mutex for access to env.cfg, finalized and dothread | |
int | finalized |
The context has been finalized This is after config when the first resolve is done. More... | |
int | created_bg |
is bg worker created yet ? | |
pid_t | bg_pid |
pid of bg worker process | |
ub_thread_type | bg_tid |
tid of bg worker thread | |
int | dothread |
do threading (instead of forking) for async resolution | |
int | thr_next_num |
next thread number for new threads | |
int | logfile_override |
if logfile is overridden | |
FILE * | log_out |
what logfile to use instead | |
struct alloc_cache * | alloc_list |
List of alloc-cache-id points per threadnum for notinuse threads. More... | |
struct alloc_cache | superalloc |
shared caches, and so on | |
struct module_env * | env |
module env master value | |
struct module_stack | mods |
module stack | |
struct local_zones * | local_zones |
local authority zones | |
struct ub_randstate * | seed_rnd |
random state used to seed new random state structures | |
struct ub_event_base * | event_base |
event base for event oriented interface | |
struct libworker * | event_worker |
libworker for event based interface | |
int | next_querynum |
next query number (to try) to use | |
size_t | num_async |
number of async queries outstanding | |
rbtree_type | queries |
Tree of outstanding queries. More... | |
The context structure.
Contains two pipes for async service qq : write queries to the async service pid/tid. rr : read results from the async service pid/tid.
int ub_ctx::finalized |
The context has been finalized This is after config when the first resolve is done.
The modules are inited (module-init()) and shared caches created.
struct alloc_cache* ub_ctx::alloc_list |
List of alloc-cache-id points per threadnum for notinuse threads.
Simply the entire struct alloc_cache with the 'super' member used to link a simply linked list. Reset super member to the superalloc before use.
rbtree_type ub_ctx::queries |
Tree of outstanding queries.
Indexed by querynum Used when results come in for async to lookup. Used when cancel is done for lookup (and delete). Used to see if querynum is free for use. Content of type ctx_query.
Referenced by add_bg_result().