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

Represents a resource record in a DNS response that contains a Host name.

TNAMERecord = class(TResultRecord);

TNAMERecord is a TResultRecord descendant that represents a resource record returned in the results for a DNS query. TNAMERecord is a collection item created to represent a resource record returned when the RData portion of the response contains data that can recognized as a Host name. 

TNAMERecord is the ancestor for other resource record classes that implement a Host name property in the specific context of the resource record type, including TNSRecord, TNSRecord, and TPTRRecord

TNAMERecord resource record definitions are likely to occur in any DNS response. Because their RData format is known, all host or domain names in the RData section of these resource records may be compressed. 

The host name is represented in RData as a series of labels, and terminated by a label with zero length. The first label is a single octet that indicates the length of the host name, and is followed by that number of characters. The length octet is treated as binary information, and the host anme can be up to 256 characters in length (including the length octet). 

TNameRecord extends TResultRecord to implement the specifics of accessing RData values as properties, including HostName

TNameRecord also overrides the Parse method to read the values in RData into their property counterparts.

TResultRecord TQueryResult TIdDNSResolver.QueryRecords

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