Topic Path: Symbol Reference > Classes > TIdDNSServer Class
TIdDNSServer Class

Implements a server for the DNS (Domain Name Server) protocol.

TIdDNSServer = class(TIdComponent);

TIdDNSServer is a TIdComponent descendant that implements a server for the DNS (Domain Name Server) protocol, as 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.  

TIdDNSServer is not like most typical server implementations in the Indy library. The DNS protocol requires that the server be able to respond to both TCP-based and UDP-based requests, so TIdDNSServer does not follow the convention of inheriting from a TIdTCPServer or TIdUDPServer ancestor class. Instead, it implements the TCPTunnel and UDPTunnel properties that act as the server(s) used in its implementation. 

UDPTunnel is, in essence, the DNS server and responds to all DNS queries issued by clients. 

TCPTunnel is used primarily to perform updates and receive notifications of updates for zone tranfer information when ServerType contains the value stSecondary indicating a secondary DNS server implementation. TCPTunnel is activated only in this scenrio, and uses a TIdDomainExpireCheckThread instance to determine when expired Domain information needs to be reloaded from the primary DNS server. 

Use the Bindings property to define one or more socket handles used for listener threads (for both TCPTunnel and UDPTunnel). 

Set ServerType to indicate if the DNS server is the primary Domain Name Service server or a secondary server dependent on updates from the primary DNS server. 

Use AccessList to specify IP addresses allowed to announce notifications of updated Zone information in the TCPTunnel server when ServerType is stSecondary and TCPACLActive contains True. 

Use Active to start the UDP-based server in UDPTunnel, and optionally the TCP-based server used to exchange zone transfer information with the primary DNS server. 

Use properties, methods, and events in TIdDNS_UDPServer to control operation of the server using UDPTunnel for DNS queries issued by clients. This includes the ability to setup options like: 

  • Root DNS servers
  • Build and maintain the DNS tree for the server
  • Specify and load Master Zone files for the server
  • Assign event handlers execute before and after the DNS response

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