#include "services/outbound_list.h"
#include "util/data/msgreply.h"
#include "util/module.h"
Data Structures | |
struct | iter_env |
Global state for the iterator. More... | |
struct | iter_qstate |
Per query state for the iterator module. More... | |
struct | iter_prep_list |
List of prepend items. More... | |
Defines | |
#define | MAX_RESTART_COUNT 8 |
max number of query restarts. | |
#define | MAX_REFERRAL_COUNT 30 |
max number of referrals. | |
#define | UNKNOWN_SERVER_NICENESS 376 |
how nice is a server without further information, in msec Equals rtt initial timeout value. | |
#define | USEFUL_SERVER_TOP_TIMEOUT 120000 |
maximum timeout before a host is deemed unsuitable, in msec. | |
#define | OUTBOUND_MSG_RETRY 5 |
number of retries on outgoing queries | |
#define | RTT_BAND 400 |
RTT band, within this amount from the best, servers are chosen randomly. | |
Enumerations | |
enum | iter_state { INIT_REQUEST_STATE = 0, INIT_REQUEST_2_STATE, INIT_REQUEST_3_STATE, QUERYTARGETS_STATE, QUERY_RESP_STATE, PRIME_RESP_STATE, FINISHED_STATE } |
State of the iterator for a query. More... | |
Functions | |
struct module_func_block * | iter_get_funcblock () |
Get the iterator function block. | |
const char * | iter_state_to_string (enum iter_state state) |
Get iterator state as a string. | |
int | iter_state_is_responsestate (enum iter_state s) |
See if iterator state is a response state. | |
int | iter_init (struct module_env *env, int id) |
iterator init | |
void | iter_deinit (struct module_env *env, int id) |
iterator deinit | |
void | iter_operate (struct module_qstate *qstate, enum module_ev event, int id, struct outbound_entry *outbound) |
iterator operate on a query | |
void | iter_inform_super (struct module_qstate *qstate, int id, struct module_qstate *super) |
Return priming query results to interestes super querystates. | |
void | iter_clear (struct module_qstate *qstate, int id) |
iterator cleanup query state | |
size_t | iter_get_mem (struct module_env *env, int id) |
iterator alloc size routine |
#define MAX_RESTART_COUNT 8 |
max number of query restarts.
Determines max number of CNAME chain.
Referenced by processInitRequest().
#define MAX_REFERRAL_COUNT 30 |
#define USEFUL_SERVER_TOP_TIMEOUT 120000 |
maximum timeout before a host is deemed unsuitable, in msec.
After host_ttl this will be timed out and the host will be tried again. Equals RTT_MAX_TIMEOUT
Referenced by iter_filter_order(), iter_filter_unsuitable(), and iter_server_selection().
#define RTT_BAND 400 |
RTT band, within this amount from the best, servers are chosen randomly.
Chosen so that the UNKNOWN_SERVER_NICENESS falls within the band of a fast server, this causes server exploration as a side benefit. msec.
Referenced by iter_filter_order().
enum iter_state |
State of the iterator for a query.
struct module_func_block* iter_get_funcblock | ( | ) | [read] |
Get the iterator function block.
Referenced by checkconf(), and module_factory().
const char* iter_state_to_string | ( | enum iter_state | state | ) |
Get iterator state as a string.
state,: | to convert |
References FINISHED_STATE, INIT_REQUEST_2_STATE, INIT_REQUEST_3_STATE, INIT_REQUEST_STATE, PRIME_RESP_STATE, QUERY_RESP_STATE, and QUERYTARGETS_STATE.
Referenced by iter_handle().
int iter_state_is_responsestate | ( | enum iter_state | s | ) |
See if iterator state is a response state.
s,: | to inspect |
References INIT_REQUEST_2_STATE, INIT_REQUEST_3_STATE, INIT_REQUEST_STATE, and QUERYTARGETS_STATE.
Referenced by next_state().
void iter_inform_super | ( | struct module_qstate * | qstate, | |
int | id, | |||
struct module_qstate * | super | |||
) |
Return priming query results to interestes super querystates.
Sets the delegation point and delegation message (not nonRD queries). This is a callback from walk_supers.
qstate,: | query state that finished. | |
id,: | module id. | |
super,: | the qstate to inform. |
References error_supers(), module_qstate::is_priming, prime_supers(), processTargetResponse(), and module_qstate::return_rcode.
Referenced by fptr_whitelist_mod_inform_super().