#include <I_DNSProcessor.h>
Inherits Processor.

| Data Structures | |
| struct | Options | 
| Options for host name resolution.  More... | |
| Public Member Functions | |
| Action * | gethostbyname (Continuation *cont, const char *name, Options const &opt) | 
| Action * | getSRVbyname (Continuation *cont, const char *name, Options const &opt) | 
| Action * | gethostbyname (Continuation *cont, const char *name, int len, Options const &opt) | 
| Action * | gethostbyaddr (Continuation *cont, IpAddr const *ip, Options const &opt) | 
| int | start (int no_of_extra_dns_threads=0, size_t stacksize=DEFAULT_STACKSIZE) | 
| Starts execution of the processor. | |
| void | open (sockaddr const *ns=0, int options=_res.options) | 
| DNSProcessor () | |
| Action * | getby (const char *x, int len, int type, Continuation *cont, Options const &opt) | 
| Internal implementation for all getXbyY methods. | |
| void | dns_init () | 
| Data Fields | |
| EThread * | thread | 
| DNSHandler * | handler | 
| ts_imp_res_state | l_res | 
| IpEndpoint | local_ipv6 | 
| IpEndpoint | local_ipv4 | 
Definition at line 66 of file I_DNSProcessor.h.
| DNSProcessor::DNSProcessor | ( | ) | 
Definition at line 341 of file DNS.cc.
References l_res, local_ipv4, and local_ipv6.
| void DNSProcessor::dns_init | ( | ) | 
Definition at line 236 of file DNS.cc.
References ats_free(), ats_ip_invalidate(), ats_ip_nptop(), ats_ip_port_cast(), ats_ip_pton(), ats_is_ip4(), ats_is_ip6(), ats_strdup, Debug, dns_local_ipv4, dns_local_ipv6, dns_ns_list, dns_ns_rr, dns_resolv_conf, ink_res_init(), l_res, local_ipv4, local_ipv6, IpEndpoint::sa, try_server_names, and Warning.
Referenced by start().
| Action * DNSProcessor::getby | ( | const char * | x, | |
| int | len, | |||
| int | type, | |||
| Continuation * | cont, | |||
| Options const & | opt | |||
| ) | 
Internal implementation for all getXbyY methods.
For host resolution queries pass T_A for type. It will be adjusted as needed based on opt.host_res_style.
For address resolution ( type is T_PTR ), x should be a sockaddr cast to char const* . 
Definition at line 1091 of file DNS.cc.
References DNSEntry::action, Debug, dns_retries, dnsEntryAllocator, EVENT_IMMEDIATE, Continuation::handleEvent(), DNSEntry::init(), Continuation::mutex, MUTEX_TRY_LOCK, DNSEntry::retries, EThread::schedule_imm(), this_ethread(), thread, and DNSProcessor::Options::timeout.
Referenced by gethostbyaddr(), gethostbyname(), and getSRVbyname().
| Action * DNSProcessor::gethostbyaddr | ( | Continuation * | cont, | |
| IpAddr const * | ip, | |||
| Options const & | opt | |||
| ) |  [inline] | 
Definition at line 178 of file I_DNSProcessor.h.
References getby().
Referenced by HostDBContinuation::do_dns().
| Action * DNSProcessor::gethostbyname | ( | Continuation * | cont, | |
| const char * | name, | |||
| Options const & | opt | |||
| ) |  [inline] | 
Definition at line 166 of file I_DNSProcessor.h.
References getby().
Referenced by HostDBContinuation::do_dns(), TestDnsStateMachine::processEvent(), and TestProxy::startEvent().
| Action * DNSProcessor::gethostbyname | ( | Continuation * | cont, | |
| const char * | name, | |||
| int | len, | |||
| Options const & | opt | |||
| ) |  [inline] | 
Definition at line 172 of file I_DNSProcessor.h.
References getby().
| Action * DNSProcessor::getSRVbyname | ( | Continuation * | cont, | |
| const char * | name, | |||
| Options const & | opt | |||
| ) |  [inline] | 
Definition at line 160 of file I_DNSProcessor.h.
References getby().
Referenced by HostDBContinuation::do_dns().
| void DNSProcessor::open | ( | sockaddr const * | ns = 0, | |
| int | options = _res.options | |||
| ) | 
Definition at line 210 of file DNS.cc.
References ats_ip_copy(), ats_ip_invalidate(), dns_handler_initialized, handler, DNSHandler::ip, l_res, local_ipv4, DNSHandler::local_ipv4, local_ipv6, DNSHandler::local_ipv6, DNSHandler::m_res, Thread::mutex, Continuation::mutex, DNSHandler::options, IpEndpoint::sa, EThread::schedule_imm(), SET_CONTINUATION_HANDLER, DNSHandler::startEvent(), and thread.
Referenced by start().
| int DNSProcessor::start | ( | int | number_of_threads = 0, | |
| size_t | stacksize = DEFAULT_STACKSIZE | |||
| ) |  [virtual] | 
Starts execution of the processor.
Attempts to start the number of threads specified for the processor, initializes their states and sets them running. On failure it returns a negative value.
| number_of_threads | Positive value indicating the number of threads to spawn for the processor. | |
| stacksize | The thread stack size to use for this processor. | 
Reimplemented from Processor.
Definition at line 167 of file DNS.cc.
References dns_failover_number, dns_failover_period, dns_failover_try_period, dns_init(), dns_local_ipv4, dns_local_ipv6, dns_max_dns_in_flight, dns_ns_list, dns_ns_rr, dns_resolv_conf, dns_retries, dns_search, dns_thread, dns_timeout, dns_validate_qname, ET_CALL, ET_DNS, eventProcessor, EventProcessor::eventthread, SplitDNSConfig::gsplit_dns_enabled, initialize_thread_for_net(), open(), REC_EstablishStaticConfigInt32, REC_ReadConfigStringAlloc, SplitDNSConfig::reconfigure(), EventProcessor::spawn_event_threads(), and thread.
Referenced by main().
Definition at line 132 of file I_DNSProcessor.h.
Referenced by DNSEntry::delayEvent(), DNSEntry::init(), DNSEntry::mainEvent(), and open().
Definition at line 133 of file I_DNSProcessor.h.
Referenced by dns_init(), DNSProcessor(), and open().
Definition at line 135 of file I_DNSProcessor.h.
Referenced by dns_init(), DNSProcessor(), and open().
Definition at line 134 of file I_DNSProcessor.h.
Referenced by dns_init(), DNSProcessor(), and open().
Definition at line 131 of file I_DNSProcessor.h.
Referenced by get_hostinfo_ClusterFunction(), getby(), HostDBProcessor::getSRVbyname_imm(), open(), DNSHandler::open_con(), put_hostinfo_ClusterFunction(), and start().
 1.7.1
 1.7.1