The context structure. More...
#include <context.h>
Data Fields | |
lock_basic_t | qqpipe_lock |
mutex on query write pipe | |
struct tube * | qq_pipe |
the query write pipe | |
lock_basic_t | rrpipe_lock |
mutex on result read pipe | |
struct tube * | rr_pipe |
the result read pipe | |
lock_basic_t | 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. | |
int | created_bg |
is bg worker created yet ? | |
pid_t | bg_pid |
pid of bg worker process | |
ub_thread_t | 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 overriden | |
FILE * | log_out |
what logfile to use instead | |
struct alloc_cache * | alloc_list |
List of alloc-cache-id points per threadnum for notinuse threads. | |
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 | |
int | next_querynum |
next query number (to try) to use | |
size_t | num_async |
number of async queries outstanding | |
rbtree_t | queries |
Tree of outstanding queries. |
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.
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.
Referenced by context_finalize(), ub_ctx_add_ta(), ub_ctx_add_ta_file(), ub_ctx_async(), ub_ctx_config(), ub_ctx_finalize(), ub_ctx_hosts(), ub_ctx_set_fwd(), ub_ctx_set_option(), ub_ctx_trustedkeys(), ub_resolve(), and ub_resolve_async().
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.
Referenced by context_obtain_alloc(), context_release_alloc(), and ub_ctx_delete().
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(), context_deserialize_answer(), context_deserialize_cancel(), context_deserialize_new_query(), context_lookup_new_query(), context_new(), find_id(), libworker_bg_done_cb(), process_answer_detail(), ub_cancel(), ub_ctx_create(), ub_ctx_delete(), ub_resolve(), and ub_resolve_async().