Internet Direct (Indy)
|
Creates resource records from raw data found in a DNS response.
function Add( Answer: TIdBytes; var APos: Integer ): TResultRecord;
Parameters |
Description |
Answer |
Raw data for the values found in the DNS response. |
APos |
Offset to data for the resource record |
TResultRecord - Resource record created to represent DNS response data.
Add is a TResultRecord function used to create instances of resource records based on raw data found in a DNS response. Add extracts the values used for Name, TTL, RData, RDataLength, RecType, and RecClass in the TResultRecord return value.
Add ensures that the proper TResultRecord descendant is created to represent the resource record based on the the value in RecType. Add can create instances of TResultRecord descendants like TARecord, TNSRecord, TMXRecord, TNAMERecord, TSOARecord, THINFORecord, TTextRecord, TWKSRecord, TPTRRecord, and TMINFORecord. When an unsupported resource record type is encountered, Add creates a generic TResultRecord instance.
If an unknown RecType value is returned in a DNS response, the corresponding value in the TResultRecord result will be omitted.
Add calls the TResultRecord.Parse method to read RData values in the resource record into their property counterparts.
Add updates the value in APos to indicate when values for the resource record have been read and processed.
Use Items for indexed access to resource records created for the query result.
Internet Direct (Indy) version 10.1.5
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved. Website http://www.indyproject.org. Post feedback to the Indy Documentation newsgroup. |