Topic Path: Symbol Reference > Classes > TIdDNSResolver Class
ContentsIndexHome
PreviousUpNext
TIdDNSResolver Class

Implements a resolver for DNS queries.

File
TIdDNSResolver = class(TIdTCPConnection);

TIdDNSResolver is a TIdTCPClient descendant that provides an implementation of a resolver for DNS (Domain Name Server) queries using the DNS protocol. The DNS protocol is described in the Internet Standards documents: 

RFC 1034 - Domain Names Concepts and Facilities  

RFC 1035 - Domain Names Implementation and Specification  

RFC 1591 - Domain Name System Structure and Delegation  

RFC 1183 - New DNS RR Definitions  

RFC 1884 - IP Version 6 Addressing Architecture  

RFC 1886 - DNS Extensions to support IP version 6  

RFC 1995 - Incremental Zone Transfer in DNS  

RFC 2181 - Clarifications to the DNS Specification.  

TIdDNSResolver provides facilities for accessing the Domain Name Space and Resource Records retrieved from a DNS Server using queries for specified domain names, resource types, and resource classes. 

TIdDNSResolver provides properties and methods that simplify the process of creating a valid DNS query, and accessing the resource records returned in the query results. 

Use QueryType to indicate the DNS Resource Record types to be returned by the DNS Query. QueryType must contain on or more of the values from TQueryRecordTypes

Set AllowRecursiveQueries to the value to be used in the DNS Query header. AllowRecursiveQueries permits a DNS server to pursue the query for DNS resource records on another name server. AllowRecursiveQueries has no effect if the DNS server does not implement recursive queries. 

Use the Resolve method to peform a DNS Query for the specified domain name. Resolve creates the DNS Query packet, including the DNS header, transmits the request to the DNS host, and captures and parses the query results. 

Use QueryResult to determine the number of resource records returned by the QueryClass, QueryType, and DomainName in the DNS Query, and to access the TResultRecord object instances containing the data for the resource records. Items in QueryResults may also be cast to an instance of a TResultRecord descendant class to access additional properties and methods based on its resource record type and class. 

TIdDNSResolver normally use UDP for resolving DNS queries, unless a Zone Transfer is indicated using the XFRType and QueryType properties. In this situation, TCP is used resolve the DNS query. 

Currently, the TIdDNSResolver implementation does not support all aspects of the DNS protocol, and includes the following limitations: 

  • The DNS query type is limited to standard queries, where the DNS Header OPCODE is 0.
  • Inverse queries (OPCODE=1) and Status queries (OPCODE=2) are not supported at this time.
  • The DNS query class field is limited to examing resource records for the IN (Internet) class only. CS (CSNet), CH (CHAOS), and HS (Hesiod) are not supported at this time.
 

Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.