|
unbound 0.1
|
Module state, per query. More...
#include <module.h>
Data Fields | |
| struct query_info | qinfo |
| which query is being answered: name, type, class | |
| uint16_t | query_flags |
| flags uint16 from query | |
| int | is_priming |
| if this is a (stub or root) priming query (with hints) | |
| int | is_valrec |
| if this is a validation recursion query that does not get validation itself | |
| struct comm_reply * | reply |
| comm_reply contains server replies | |
| struct dns_msg * | return_msg |
| the reply message, with message for client and calling module | |
| int | return_rcode |
| the rcode, in case of error, instead of a reply message | |
| struct sock_list * | reply_origin |
| origin of the reply (can be NULL from cache, list for cnames) | |
| struct sock_list * | blacklist |
| IP blacklist for queries. | |
| struct regional * | region |
| region for this query. | |
| struct errinf_strlist * | errinf |
| failure reason information if val-log-level is high | |
| int | curmod |
| which module is executing | |
| enum module_ext_state | ext_state [MAX_MODULE] |
| module states | |
| void * | minfo [MAX_MODULE] |
| module specific data for query. | |
| struct module_env * | env |
| environment for this query | |
| struct mesh_state * | mesh_info |
| mesh related information for this query | |
| time_t | prefetch_leeway |
| how many seconds before expiry is this prefetched (0 if not) | |
| struct serve_expired_data * | serve_expired_data |
| serve expired data | |
| struct edns_option * | edns_opts_front_in |
| incoming edns options from the front end | |
| struct edns_option * | edns_opts_back_out |
| outgoing edns options to the back end | |
| struct edns_option * | edns_opts_back_in |
| incoming edns options from the back end | |
| struct edns_option * | edns_opts_front_out |
| outgoing edns options to the front end | |
| int | no_cache_lookup |
| whether modules should answer from the cache | |
| int | no_cache_store |
| whether modules should store answer in the cache | |
| int | need_refetch |
| whether to refetch a fresh answer on finishing this state | |
| int | was_ratelimited |
| whether the query (or a subquery) was ratelimited | |
| time_t | qstarttime |
| time when query was started. | |
| int | is_cachedb_answer |
| whether a message from cachedb will be used for the reply | |
| int | is_subnet_answer |
| whether the reply is subnet specific | |
| int | error_response_cache |
| if the response as error is from error_response_cache, and is suitable for caching (briefly) the error response. | |
| int | fwd_stub_no_cache |
| if the iterator sees that the forward/stub has no_cache set. | |
| struct respip_client_info * | client_info |
| Attributes of clients that share the qstate that may affect IP-based actions. | |
| struct respip_action_info * | respip_action_info |
| Extended result of response-ip action processing, mainly for logging purposes. | |
| int | rpz_applied |
| if the query has been modified by rpz processing. | |
| int | rpz_passthru |
| if the query is rpz passthru, no further rpz processing for it | |
| int | tcp_required |
| int | is_drop |
| whether the reply should be dropped | |
| int | global_quota_reached |
| the global quota that was reached, by one of the modules. | |
| int | global_quota_started |
| the global quota that a query started with, it is a subquery, so that calling mesh states can see the increase. | |
Module state, per query.
| struct query_info module_qstate::qinfo |
which query is being answered: name, type, class
Referenced by auth_zone_delegpt(), dns64_adjust_a(), dns64_adjust_ptr(), dns64_always_synth_for_qname(), dns64_inform_super(), dns64_operate(), dns_error_reporting(), do_dump_requestlist(), errinf_to_str_bogus(), errinf_to_str_servfail(), error_response_cache(), error_supers(), generate_a_aaaa_check(), generate_dnskey_prefetch(), generate_ns_check(), generate_parentside_target_query(), generate_sub_request(), get_mesh_status(), handle_event_moddone(), handle_event_pass(), handle_ipv6_ptr(), ipset_operate(), iter_inform_super(), iter_mark_cycle_targets(), iter_mark_pside_cycle_targets(), iter_new(), iter_operate(), mesh_area_find(), mesh_area_find_unique(), mesh_continue(), mesh_do_callback(), mesh_log_list(), mesh_make_new_space(), mesh_query_done(), mesh_send_reply(), mesh_serve_expired_callback(), mesh_state_add_reply(), mesh_state_compare(), mesh_state_create(), needs_validation(), outnet_serviced_query(), prime_root(), prime_stub(), prime_supers(), process_response(), processClassResponse(), processCollectClass(), processDSNSResponse(), processFinished(), processFinished(), processInit(), processInitRequest(), processInitRequest2(), processInitRequest3(), processLastResort(), processPrimeResponse(), processQueryResponse(), processQueryTargets(), processTargetResponse(), processValidate(), pythonmod_inform_super(), query_for_targets(), respip_inform_super(), respip_operate(), rpz_callback_from_iterator_cname(), val_inform_super(), val_new_getmsg(), and val_operate().
| uint16_t module_qstate::query_flags |
flags uint16 from query
Referenced by dns64_inform_super(), error_response_cache(), generate_a_aaaa_check(), generate_dnskey_prefetch(), generate_ns_check(), generate_sub_request(), handle_event_moddone(), handle_event_pass(), handle_ipv6_ptr(), invalidateQueryInCache(), iter_new(), mesh_area_find(), mesh_area_find_unique(), mesh_log_list(), mesh_serve_expired_callback(), mesh_serve_expired_lookup(), mesh_state_compare(), mesh_state_create(), processCollectClass(), processFinished(), processFinished(), processInit(), processInitRequest(), processInitRequest3(), processQueryResponse(), processQueryTargets(), processValidate(), respip_operate(), storeQueryInCache(), and val_new_getmsg().
| int module_qstate::is_priming |
if this is a (stub or root) priming query (with hints)
Referenced by causes_cycle(), iter_inform_super(), mesh_area_find(), mesh_area_find_unique(), mesh_log_list(), mesh_state_compare(), mesh_state_create(), and prime_supers().
| int module_qstate::is_valrec |
if this is a validation recursion query that does not get validation itself
Referenced by causes_cycle(), dns64_inform_super(), error_response_cache(), handle_event_moddone(), mesh_area_find(), mesh_area_find_unique(), mesh_log_list(), mesh_state_compare(), mesh_state_create(), needs_validation(), processFinished(), processFinished(), processQueryResponse(), storeQueryInCache(), and val_operate().
| struct comm_reply* module_qstate::reply |
comm_reply contains server replies
Referenced by errinf_reply(), mesh_report_reply(), mesh_run(), mesh_state_create(), process_response(), and processQueryResponse().
| struct dns_msg* module_qstate::return_msg |
the reply message, with message for client and calling module
Referenced by createResponse(), dns64_adjust_a(), dns64_adjust_ptr(), dns64_inform_super(), error_response(), error_response(), handle_event_moddone(), ipset_operate(), mesh_make_new_space(), mesh_query_done(), mesh_run(), mesh_state_create(), prime_supers(), processClassResponse(), processDSNSResponse(), processFinished(), processFinished(), processInitRequest(), processPrimeResponse(), processQueryResponse(), processQueryTargets(), processTargetResponse(), respip_inform_super(), respip_operate(), val_inform_super(), val_new_getmsg(), and val_operate().
| int module_qstate::return_rcode |
the rcode, in case of error, instead of a reply message
Referenced by dns64_inform_super(), error_response(), error_response(), iter_inform_super(), mesh_continue(), mesh_make_new_space(), mesh_query_done(), mesh_run(), mesh_state_create(), prime_supers(), processClassResponse(), processDSNSResponse(), processFinished(), processFinished(), processInitRequest(), processPrimeResponse(), processQueryResponse(), processQueryTargets(), processTargetResponse(), respip_inform_super(), respip_operate(), val_error(), val_inform_super(), val_new_getmsg(), and val_operate().
| struct sock_list* module_qstate::reply_origin |
origin of the reply (can be NULL from cache, list for cnames)
Referenced by processFindKey(), processFinished(), processInitRequest(), processInitRequest3(), processQueryResponse(), processTargetResponse(), processValidate(), val_inform_super(), and validate_msg_signatures().
| struct sock_list* module_qstate::blacklist |
IP blacklist for queries.
Referenced by auth_zone_delegpt(), generate_parentside_target_query(), processFindKey(), processFinished(), processInitRequest(), and processQueryTargets().
| struct regional* module_qstate::region |
region for this query.
Cleared when query process finishes.
Referenced by auth_zone_delegpt(), createResponse(), dns64_adjust_a(), dns64_adjust_ptr(), dns64_inform_super(), dns64_operate(), ds_response_to_ke(), errinf_to_str_misc(), errinf_to_str_servfail(), error_supers(), forward_request(), generate_dnskey_prefetch(), generate_keytag_query(), generate_ns_check(), generate_parentside_target_query(), generate_sub_request(), handle_ipv6_ptr(), iter_add_prepend_answer(), iter_add_prepend_auth(), iter_new(), libworker_send_query(), mesh_do_callback(), mesh_get_mem(), mesh_new_callback(), mesh_new_client(), mesh_send_reply(), mesh_serve_expired_callback(), mesh_serve_expired_init(), mesh_serve_expired_lookup(), mesh_state_add_cb(), mesh_state_add_reply(), mesh_state_attachment(), mesh_state_cleanup(), mesh_state_create(), prime_root(), prime_stub(), prime_supers(), prime_trust_anchor(), primeResponseToKE(), process_dnskey_response(), process_ds_response(), process_prime_response(), process_response(), processClassResponse(), processDSNSResponse(), processFindKey(), processFinished(), processFinished(), processInit(), processInitRequest(), processInitRequest3(), processLastResort(), processQueryResponse(), processQueryTargets(), processTargetResponse(), respip_inform_super(), respip_operate(), rpz_add_soa(), rpz_synthesize_cname_override_msg(), rrset_canonical(), val_inform_super(), val_new(), val_new_getmsg(), validate_any_response(), validate_cname_noanswer_response(), validate_cname_response(), validate_nameerror_response(), validate_nodata_response(), validate_positive_response(), and worker_send_query().
| struct errinf_strlist* module_qstate::errinf |
failure reason information if val-log-level is high
Referenced by dns64_inform_super(), errinf_to_reason_bogus(), errinf_to_str_bogus(), errinf_to_str_misc(), errinf_to_str_servfail(), process_dnskey_response(), process_ds_response(), process_prime_response(), processFinished(), processFinished(), and processValidate().
| int module_qstate::curmod |
which module is executing
Referenced by generate_sub_request(), get_mesh_status(), handle_ipv6_ptr(), mesh_continue(), mesh_log_list(), mesh_run(), mesh_state_create(), and mesh_walk_supers().
| enum module_ext_state module_qstate::ext_state[MAX_MODULE] |
module states
Referenced by check_waiting_queries(), dns64_operate(), error_response(), error_response(), generate_keytag_query(), generate_request(), generate_sub_request(), get_mesh_status(), handle_ipv6_ptr(), ipset_operate(), iter_operate(), mesh_run(), mesh_state_cleanup(), mesh_state_create(), prime_root(), prime_stub(), processFinished(), processFinished(), processInitRequest(), processLastResort(), processPrimeResponse(), processQueryResponse(), processQueryTargets(), pythonmod_inform_super(), query_for_targets(), respip_operate(), val_error(), val_operate(), and validate_suspend_setup_timer().
| void* module_qstate::minfo[MAX_MODULE] |
module specific data for query.
indexed by module id.
Referenced by dns64_clear(), dns64_inform_super(), dns64_operate(), error_supers(), generate_dnskey_prefetch(), generate_ns_check(), generate_parentside_target_query(), generate_request(), generate_sub_request(), get_mesh_status(), handle_event_moddone(), handle_event_pass(), handle_ipv6_ptr(), ipset_clear(), ipset_operate(), iter_clear(), iter_inform_super(), iter_new(), iter_operate(), mesh_continue(), mesh_state_cleanup(), mesh_state_create(), prime_root(), prime_stub(), prime_supers(), processClassResponse(), processCollectClass(), processDSNSResponse(), processPrimeResponse(), processTargetResponse(), pythonmod_clear(), pythonmod_inform_super(), respip_clear(), respip_inform_super(), respip_operate(), val_clear(), val_inform_super(), val_new(), and val_operate().
| struct module_env* module_qstate::env |
environment for this query
Referenced by auth_zone_delegpt(), causes_cycle(), createResponse(), dns64_adjust_a(), dns64_always_synth_for_qname(), dns64_inform_super(), dns_error_reporting(), dnskey_verify_rrset_sig(), ds_response_to_ke(), dynlibmod_clear(), dynlibmod_inform_super(), dynlibmod_operate(), errinf_dname(), errinf_origin(), errinf_reply(), errinf_rrset(), error_response_cache(), error_supers(), forward_request(), generate_a_aaaa_check(), generate_dnskey_prefetch(), generate_ns_check(), generate_parentside_target_query(), generate_request(), generate_sub_request(), handle_event_moddone(), handle_event_pass(), handle_ipv6_ptr(), invalidateQueryInCache(), ipset_operate(), iter_new(), iter_operate(), iter_stub_fwd_no_cache(), libworker_handle_service_reply(), libworker_send_query(), mesh_add_sub(), mesh_attach_sub(), mesh_continue(), mesh_detach_subs(), mesh_detect_cycle(), mesh_do_callback(), mesh_query_done(), mesh_run(), mesh_send_reply(), mesh_serve_expired_callback(), mesh_serve_expired_init(), mesh_serve_expired_lookup(), mesh_state_add_reply(), mesh_state_cleanup(), mesh_state_create(), mesh_state_delete(), prime_root(), prime_stub(), prime_supers(), prime_trust_anchor(), primeResponseToKE(), process_dnskey_response(), process_ds_response(), process_prime_response(), process_response(), processCollectClass(), processDSNSResponse(), processFindKey(), processFinished(), processFinished(), processInit(), processInitRequest(), processInitRequest2(), processInitRequest3(), processLastResort(), processPrimeResponse(), processQueryResponse(), processQueryTargets(), processTargetResponse(), processValidate(), pythonmod_inform_super(), query_for_targets(), respip_inform_super(), respip_operate(), rpz_callback_from_iterator_cname(), rpz_callback_from_iterator_module(), storeQueryInCache(), val_can_restart(), val_operate(), validate_suspend_setup_timer(), validate_suspend_timer_cb(), worker_handle_service_reply(), and worker_send_query().
| struct mesh_state* module_qstate::mesh_info |
mesh related information for this query
Referenced by log_rpz_apply(), mesh_attach_sub(), mesh_detach_subs(), mesh_detect_cycle_found(), mesh_report_reply(), mesh_state_create(), mesh_state_delete(), outnet_serviced_query(), and validate_suspend_timer_cb().
| time_t module_qstate::prefetch_leeway |
how many seconds before expiry is this prefetched (0 if not)
Referenced by dns64_inform_super(), error_response_cache(), generate_parentside_target_query(), handle_event_moddone(), mesh_state_create(), processFinished(), processFinished(), processInitRequest(), processQueryResponse(), processQueryTargets(), and storeQueryInCache().
| struct serve_expired_data* module_qstate::serve_expired_data |
serve expired data
Referenced by mesh_query_done(), mesh_respond_serve_expired(), mesh_serve_expired_callback(), mesh_serve_expired_init(), mesh_state_cleanup(), and mesh_state_create().
| struct edns_option* module_qstate::edns_opts_front_in |
incoming edns options from the front end
Referenced by mesh_continue(), mesh_new_callback(), mesh_new_client(), and mesh_state_create().
| struct edns_option* module_qstate::edns_opts_back_out |
outgoing edns options to the back end
Referenced by mesh_state_create(), and outnet_serviced_query().
| struct edns_option* module_qstate::edns_opts_back_in |
incoming edns options from the back end
Referenced by dns_error_reporting(), mesh_state_create(), and process_response().
| struct edns_option* module_qstate::edns_opts_front_out |
outgoing edns options to the front end
Referenced by inplace_cb_reply_servfail_call(), and mesh_state_create().
| int module_qstate::no_cache_lookup |
whether modules should answer from the cache
Referenced by mesh_serve_expired_callback(), mesh_state_create(), processInitRequest(), and processQueryTargets().
| int module_qstate::no_cache_store |
whether modules should store answer in the cache
Referenced by dns64_inform_super(), dns64_operate(), error_response_cache(), mesh_state_create(), processFinished(), processFinished(), processInitRequest(), processLastResort(), and processQueryResponse().
| int module_qstate::need_refetch |
whether to refetch a fresh answer on finishing this state
Referenced by mesh_continue(), and mesh_state_create().
| int module_qstate::was_ratelimited |
whether the query (or a subquery) was ratelimited
Referenced by mesh_do_callback(), mesh_state_create(), and processQueryTargets().
| time_t module_qstate::qstarttime |
time when query was started.
This is when the qstate is created. This is used so that type NS data cannot be overwritten by them expiring while the lookup is in progress, using data fetched from those servers. By comparing expiry time with qstarttime for type NS.
Referenced by dns64_inform_super(), error_response_cache(), handle_event_moddone(), mesh_state_create(), processFinished(), processFinished(), processQueryResponse(), and storeQueryInCache().
| int module_qstate::is_cachedb_answer |
whether a message from cachedb will be used for the reply
Referenced by mesh_query_done().
| int module_qstate::is_subnet_answer |
whether the reply is subnet specific
Referenced by dns64_inform_super(), and handle_event_moddone().
| int module_qstate::error_response_cache |
if the response as error is from error_response_cache, and is suitable for caching (briefly) the error response.
Set by the iterator when no_cache_store is enabled, and there is an error.
Referenced by error_response_cache(), and mesh_state_create().
| int module_qstate::fwd_stub_no_cache |
if the iterator sees that the forward/stub has no_cache set.
to signal to calling modules that their setting of no_cache for other reasons, has to take into account the fwd/stub no_cache.
Referenced by dns64_inform_super(), dns64_operate(), handle_event_moddone(), and processInitRequest().
| struct respip_client_info* module_qstate::client_info |
Attributes of clients that share the qstate that may affect IP-based actions.
Referenced by handle_ipv6_ptr(), mesh_area_find(), mesh_area_find_unique(), mesh_serve_expired_callback(), mesh_state_compare(), mesh_state_create(), respip_inform_super(), respip_operate(), rpz_callback_from_iterator_cname(), and rpz_callback_from_iterator_module().
| struct respip_action_info* module_qstate::respip_action_info |
Extended result of response-ip action processing, mainly for logging purposes.
Referenced by mesh_query_done(), and respip_operate().
| int module_qstate::rpz_applied |
if the query has been modified by rpz processing.
Referenced by dns64_inform_super(), handle_event_moddone(), process_dnskey_response(), process_ds_response(), rpz_callback_from_iterator_cname(), and val_operate().
| int module_qstate::rpz_passthru |
if the query is rpz passthru, no further rpz processing for it
Referenced by dns64_inform_super(), handle_event_moddone(), mesh_add_sub(), mesh_continue(), mesh_new_callback(), mesh_new_client(), respip_operate(), rpz_callback_from_iterator_cname(), and rpz_callback_from_iterator_module().
| int module_qstate::is_drop |
whether the reply should be dropped
Referenced by mesh_query_done(), mesh_serve_expired_callback(), respip_operate(), and rpz_callback_from_iterator_cname().
| int module_qstate::global_quota_reached |
the global quota that was reached, by one of the modules.
So that continued counting can go on from that point.
Referenced by generate_request(), target_count_create(), and val_inform_super().
| int module_qstate::global_quota_started |
the global quota that a query started with, it is a subquery, so that calling mesh states can see the increase.
Referenced by val_inform_super().