One DNSEntry is allocated per outstanding request. More...
#include <P_DNSProcessor.h>
Inherits Continuation.
Public Member Functions | |
LINK (DNSEntry, dup_link) | |
Que (DNSEntry, dup_link) dups | |
int | mainEvent (int event, Event *e) |
Handle timeout events. | |
int | delayEvent (int event, Event *e) |
int | post (DNSHandler *h, HostEnt *ent) |
int | postEvent (int event, Event *e) |
void | init (const char *x, int len, int qtype_arg, Continuation *acont, DNSProcessor::Options const &opt) |
DNSEntry () | |
Data Fields | |
int | id [MAX_DNS_RETRIES] |
int | qtype |
Type of query to send. | |
HostResStyle | host_res_style |
Preferred IP address family. | |
int | retries |
int | which_ns |
ink_hrtime | submit_time |
ink_hrtime | send_time |
char | qname [MAXDNAME] |
int | qname_len |
int | orig_qname_len |
char ** | domains |
EThread * | submit_thread |
Action | action |
Event * | timeout |
Ptr< HostEnt > | result_ent |
DNSHandler * | dnsH |
bool | written_flag |
bool | once_written_flag |
bool | last |
One DNSEntry is allocated per outstanding request.
This continuation handles TIMEOUT events for the request as well as storing all information about the request and its status.
Definition at line 148 of file P_DNSProcessor.h.
DNSEntry::DNSEntry | ( | ) | [inline] |
Definition at line 178 of file P_DNSProcessor.h.
References qname.
int DNSEntry::delayEvent | ( | int | event, | |
Event * | e | |||
) |
Definition at line 1017 of file DNS.cc.
References DNS_DELAY_PERIOD, EVENT_IMMEDIATE, Continuation::handleEvent(), DNSProcessor::handler, mainEvent(), Event::schedule_in(), and SET_HANDLER.
Referenced by mainEvent().
void DNSEntry::init | ( | const char * | x, | |
int | len, | |||
int | qtype_arg, | |||
Continuation * | acont, | |||
DNSProcessor::Options const & | opt | |||
) |
Definition at line 350 of file DNS.cc.
References IpAddr::_addr, IpAddr::_ip4, IpAddr::_ip6, action, dnsH, SplitDNSConfig::gsplit_dns_enabled, DNSProcessor::handler, DNSProcessor::Options::handler, HOST_RES_IPV4, HOST_RES_IPV4_ONLY, HOST_RES_IPV6, HOST_RES_IPV6_ONLY, DNSProcessor::Options::host_res_style, host_res_style, ink_assert, ink_get_hrtime(), ink_strlcpy(), IpAddr::isIp4(), IpAddr::isIp6(), mainEvent(), make_ipv4_ptr(), make_ipv6_ptr(), memcpy, Continuation::mutex, orig_qname_len, qname, qname_len, qtype, SET_HANDLER, submit_thread, submit_time, DNSProcessor::Options::timeout, and DNSHandler::txn_lookup_timeout.
Referenced by DNSProcessor::getby().
DNSEntry::LINK | ( | DNSEntry | , | |
dup_link | ||||
) |
int DNSEntry::mainEvent | ( | int | event, | |
Event * | e | |||
) |
Handle timeout events.
Definition at line 1030 of file DNS.cc.
References Debug, delayEvent(), DNS_DECREMENT_DYN_STAT, dns_in_flight_stat, dns_result(), dns_search, dnsH, ts_imp_res_state::dnsrch, domains, Queue< C, L >::enqueue(), DNSHandler::entries, EVENT_IMMEDIATE, EVENT_INTERVAL, get_entry(), Continuation::handleEvent(), DNSProcessor::handler, DNSHandler::in_flight, ink_assert, ink_strlcpy(), DNSHandler::m_res, orig_qname_len, qname, qname_len, qtype, result_ent, SET_HANDLER, strnchr(), timeout, DNSHandler::txn_lookup_timeout, write_dns(), and written_flag.
Referenced by delayEvent(), and init().
int DNSEntry::post | ( | DNSHandler * | h, | |
HostEnt * | ent | |||
) |
Definition at line 1243 of file DNS.cc.
References action, Action::cancel(), Debug, Action::mutex, Continuation::mutex, MUTEX_TRY_LOCK, postEvent(), qname, result_ent, EThread::schedule_imm_signal(), SET_HANDLER, submit_thread, and timeout.
Referenced by dns_result().
int DNSEntry::postEvent | ( | int | event, | |
Event * | e | |||
) |
Definition at line 1266 of file DNS.cc.
References action, Action::cancelled, Action::continuation, Debug, DNS_EVENT_LOOKUP, dnsEntryAllocator, Continuation::handleEvent(), Continuation::mutex, Action::mutex, qname, and result_ent.
Referenced by dns_result(), and post().
DNSEntry::Que | ( | DNSEntry | , | |
dup_link | ||||
) |
Definition at line 162 of file P_DNSProcessor.h.
Referenced by dns_result(), DNSProcessor::getby(), init(), post(), and postEvent().
Definition at line 165 of file P_DNSProcessor.h.
Referenced by init(), and mainEvent().
char** DNSEntry::domains |
Definition at line 160 of file P_DNSProcessor.h.
Referenced by dns_result(), and mainEvent().
int DNSEntry::id[MAX_DNS_RETRIES] |
Definition at line 150 of file P_DNSProcessor.h.
Referenced by dns_result(), and write_dns_event().
bool DNSEntry::last |
Definition at line 168 of file P_DNSProcessor.h.
Referenced by dns_result().
Definition at line 167 of file P_DNSProcessor.h.
Referenced by write_dns_event().
Definition at line 159 of file P_DNSProcessor.h.
Referenced by dns_result(), init(), and mainEvent().
char DNSEntry::qname[MAXDNAME] |
Definition at line 157 of file P_DNSProcessor.h.
Referenced by dns_process(), dns_result(), DNSEntry(), init(), mainEvent(), post(), postEvent(), and write_dns_event().
Definition at line 158 of file P_DNSProcessor.h.
Referenced by dns_process(), dns_result(), init(), and mainEvent().
int DNSEntry::qtype |
Type of query to send.
Definition at line 151 of file P_DNSProcessor.h.
Referenced by dns_process(), dns_result(), init(), mainEvent(), and write_dns_event().
Definition at line 164 of file P_DNSProcessor.h.
Referenced by dns_result(), mainEvent(), post(), and postEvent().
Definition at line 153 of file P_DNSProcessor.h.
Referenced by dns_result(), DNSProcessor::getby(), and write_dns_event().
Definition at line 156 of file P_DNSProcessor.h.
Referenced by dns_process(), and write_dns_event().
Definition at line 161 of file P_DNSProcessor.h.
Referenced by dns_result(), init(), and post().
Definition at line 155 of file P_DNSProcessor.h.
Referenced by dns_result(), and init().
Definition at line 163 of file P_DNSProcessor.h.
Referenced by dns_result(), mainEvent(), post(), and write_dns_event().
Definition at line 154 of file P_DNSProcessor.h.
Referenced by write_dns_event().
Definition at line 166 of file P_DNSProcessor.h.
Referenced by dns_process(), mainEvent(), write_dns(), and write_dns_event().