Description | Hierarchy | Fields | Methods | Properties |
type TDNSSend = class(TSynaClient)
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!
constructor Create; |
|
destructor Destroy; override; |
|
function DNSQuery(Name: AnsiString; QType: Integer; const Reply: TStrings): Boolean; |
property Sock: TUDPBlockSocket read FSock; |
|
property TCPSock: TTCPBlockSocket read FTCPSock; |
|
property UseTCP: Boolean read FUseTCP Write FUseTCP; |
|
property RCode: Integer read FRCode; |
|
property Authoritative: Boolean read FAuthoritative; |
|
property Truncated: Boolean read FTRuncated; |
|
property AnswerInfo: TStringList read FAnswerInfo; |
|
property NameserverInfo: TStringList read FNameserverInfo; |
|
property AdditionalInfo: TStringList read FAdditionalInfo; |
constructor Create; |
destructor Destroy; override; |
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.
property Sock: TUDPBlockSocket read FSock; |
Socket object used for UDP operation. Good for seting OnStatus hook, etc.
property TCPSock: TTCPBlockSocket read FTCPSock; |
Socket object used for TCP operation. Good for seting OnStatus hook, etc.
property UseTCP: Boolean read FUseTCP Write FUseTCP; |
if True
, then is used TCP protocol instead UDP. It is needed for zone transfers, etc.
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.
property Authoritative: Boolean read FAuthoritative; |
True
, if answer is authoritative.
property Truncated: Boolean read FTRuncated; |
True
, if answer is truncated to 512 bytes.
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.
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.
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.