Class TDNSSend

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TDNSSend = class(TSynaClient)

Description

Implementation of DNS protocol by UDP or TCP protocol.

Note: Are you missing properties for specify server address and port? Look to parent TSynaClient too!

Hierarchy

Overview

Methods

Public constructor Create;
Public destructor Destroy; override;
Public function DNSQuery(Name: AnsiString; QType: Integer; const Reply: TStrings): Boolean;

Properties

Published property Sock: TUDPBlockSocket read FSock;
Published property TCPSock: TTCPBlockSocket read FTCPSock;
Published property UseTCP: Boolean read FUseTCP Write FUseTCP;
Published property RCode: Integer read FRCode;
Published property Authoritative: Boolean read FAuthoritative;
Published property Truncated: Boolean read FTRuncated;
Published property AnswerInfo: TStringList read FAnswerInfo;
Published property NameserverInfo: TStringList read FNameserverInfo;
Published property AdditionalInfo: TStringList read FAdditionalInfo;

Description

Methods

Public constructor Create;
 
Public destructor Destroy; override;
 
Public function DNSQuery(Name: AnsiString; QType: Integer; const Reply: TStrings): Boolean;

Query a DNSHost for QType resources correspond to a name. Supported QType values are: Qtype_A, Qtype_NS, Qtype_MD, Qtype_MF, Qtype_CNAME, Qtype_SOA, Qtype_MB, Qtype_MG, Qtype_MR, Qtype_NULL, Qtype_PTR, Qtype_HINFO, Qtype_MINFO, Qtype_MX, Qtype_TXT, Qtype_RP, Qtype_AFSDB, Qtype_X25, Qtype_ISDN, Qtype_RT, Qtype_NSAP, Qtype_NSAPPTR, Qtype_PX, Qtype_GPOS, Qtype_KX.

Type for zone transfers QTYPE_AXFR is supported too, but only in TCP mode!

"Name" is domain name or host name for queried resource. If "name" is IP address, automatically convert to reverse domain form (.in-addr.arpa).

If result is True, Reply contains resource records. One record on one line. If Resource record have multiple fields, they are stored on line divided by comma. (example: MX record contains value 'rs.cesnet.cz' with preference number 10, string in Reply is: '10,rs.cesnet.cz'). All numbers or IP address in resource are converted to string form.

Properties

Published property Sock: TUDPBlockSocket read FSock;

Socket object used for UDP operation. Good for seting OnStatus hook, etc.

Published property TCPSock: TTCPBlockSocket read FTCPSock;

Socket object used for TCP operation. Good for seting OnStatus hook, etc.

Published property UseTCP: Boolean read FUseTCP Write FUseTCP;

if True, then is used TCP protocol instead UDP. It is needed for zone transfers, etc.

Published property RCode: Integer read FRCode;

After DNS operation contains ResultCode of DNS operation. Values are: 0-no error, 1-format error, 2-server failure, 3-name error, 4-not implemented, 5-refused.

Published property Authoritative: Boolean read FAuthoritative;

True, if answer is authoritative.

Published property Truncated: Boolean read FTRuncated;

True, if answer is truncated to 512 bytes.

Published property AnswerInfo: TStringList read FAnswerInfo;

Detailed informations from name server reply. One record per line. Record have comma delimited entries with type number, TTL and data filelds. This information contains detailed information about query reply.

Published property NameserverInfo: TStringList read FNameserverInfo;

Detailed informations from name server reply. One record per line. Record have comma delimited entries with type number, TTL and data filelds. This information contains detailed information about nameserver.

Published property AdditionalInfo: TStringList read FAdditionalInfo;

Detailed informations from name server reply. One record per line. Record have comma delimited entries with type number, TTL and data filelds. This information contains detailed additional information.


Generated by PasDoc 0.9.0 on 2012-04-23 21:38:57