Difference between revisions of "TDNSClient"
From Ultibo.org
								
												
				 (Created page with "Return to Unit DNS   __TOC__  === Description === ----  ''To be documented''  === Class definitions === ----   <div class="toccolours mw-collapsible mw-collapsed"...")  | 
				|||
| Line 40: | Line 40: | ||
|colspan="2"|   | |colspan="2"|   | ||
|-  | |-  | ||
| − | | <code>function   | + | | <code>function GetLastAddrInfo(AAddrInfo:PAddrInfo):PAddrInfo;</code>  | 
|    | |    | ||
|-  | |-  | ||
| − | | <code>function   | + | |colspan="2"|   | 
| + | |-  | ||
| + | | <code>function AddressEntryToHostEnt(AddressEntry:TAddressEntry; const AName:String; ACount:Integer):PHostEnt;</code>  | ||
|    | |    | ||
|-  | |-  | ||
| − | | <code>function   | + | | <code>function HostEntryToHostEnt(HostEntry:THostEntry):PHostEnt;</code>  | 
|    | |    | ||
|-  | |-  | ||
| − | | <code>function   | + | | <code>function NetworkEntryToNetEnt(NetworkEntry:TNetworkEntry):PNetEnt;</code>  | 
|    | |    | ||
|-  | |-  | ||
| − | | <code>function ProtoEntryToProtoEnt(ProtoEntry:  | + | | <code>function ServEntryToServEnt(ServEntry:TServEntry):PServEnt;</code>  | 
| + | |    | ||
| + | |-  | ||
| + | | <code>function ProtoEntryToProtoEnt(ProtoEntry:TProtoEntry):PProtoEnt;</code>  | ||
| + | |    | ||
| + | |-  | ||
| + | |colspan="2"|   | ||
| + | |-  | ||
| + | | <code>function AddressEntryToAddrInfo(AddressEntry:TAddressEntry; AFlags,AFamily,AProtocol,ASocketType:LongInt; APort:Word; AFirst:Boolean):PAddrInfo;</code>  | ||
| + | |    | ||
| + | |-  | ||
| + | | <code>function HostEntryToAddrInfo(HostEntry:THostEntry; AFlags,AFamily,AProtocol,ASocketType:LongInt; APort:Word; AFirst:Boolean):PAddrInfo;</code>  | ||
| + | |    | ||
| + | |-  | ||
| + | |colspan="2"|   | ||
| + | |-  | ||
| + | | <code>function ResolveLocalAddrInfo(AFlags,AFamily,AProtocol,ASocketType:LongInt; APort:Word):PAddrInfo;</code>  | ||
| + | |    | ||
| + | |-  | ||
| + | | <code>function ResolveLoopbackAddrInfo(AFlags,AFamily,AProtocol,ASocketType:LongInt; APort:Word):PAddrInfo;</code>  | ||
| + | |    | ||
| + | |-  | ||
| + | |colspan="2"|   | ||
| + | |-  | ||
| + | | <code>function ResolveHostByName(const AName:String; AFamily:Integer):THostEntry;</code>  | ||
| + | |    | ||
| + | |-  | ||
| + | | <code>function ResolveHostByAddress(AAddress:Pointer; ALength,AFamily:Integer):THostEntry;</code>  | ||
| + | |    | ||
| + | |-  | ||
| + | |colspan="2"|   | ||
| + | |-  | ||
| + | | <code>function ResolveHostName:String;</code>  | ||
| + | |    | ||
| + | |-  | ||
| + | |colspan="2"|   | ||
| + | |-  | ||
| + | | <code>function ResolveServByName(const AName,AProto:String):TServEntry;</code>  | ||
| + | |    | ||
| + | |-  | ||
| + | | <code>function ResolveServByPort(APort:Integer; const AProto:String):TServEntry;</code>  | ||
| + | |    | ||
| + | |-  | ||
| + | | <code>function ResolveProtoByName(const AName:String):TProtoEntry;</code>  | ||
| + | |    | ||
| + | |-  | ||
| + | | <code>function ResolveProtoByNumber(AProto:Integer):TProtoEntry;</code>  | ||
| + | |    | ||
| + | |-  | ||
| + | |colspan="2"|   | ||
| + | |-  | ||
| + | | <code>function ResolveNetworkByName(const AName:String; AFamily:Integer):TNetworkEntry;</code>  | ||
| + | |    | ||
| + | |-  | ||
| + | | <code>function ResolveNetworkByAddress(AAddress:Pointer; ALength,AFamily:Integer):TNetworkEntry;</code>  | ||
|    | |    | ||
|-  | |-  | ||
| Line 109: | Line 165: | ||
|    | |    | ||
|-  | |-  | ||
| − | | <code>function HandleDNSResponse(AMessage:PDNSMessage; AIdentifier:Word):Boolean;</code>  | + | | <code>function HandleDNSResponse(AMessage:PDNSMessage; AFamily,AIdentifier:Word):Boolean;</code>  | 
| + | |    | ||
| + | |-  | ||
| + | |colspan="2"|   | ||
| + | |-  | ||
| + | | <code>function PerformDNSRequest(AData:Pointer; ALength,AFamily,AType,AClass:Word):Boolean;</code>  | ||
|    | |    | ||
|-  | |-  | ||
|colspan="2"|   | |colspan="2"|   | ||
|-  | |-  | ||
| − | | <code>function SendDNSQuery(ASocket:TProtocolSocket;   | + | | <code>function SendDNSQuery(ASocket:TProtocolSocket; AServer:PSockAddr; AServerLength:Integer; AData:Pointer; ALength,AFamily,AType,AClass,AIdentifier:Word):Boolean;</code>  | 
|    | |    | ||
|-  | |-  | ||
| − | | <code>function RecvDNSResponse(ASocket:TProtocolSocket; AType,AClass,AIdentifier:Word):Boolean;</code>  | + | | <code>function RecvDNSResponse(ASocket:TProtocolSocket; AFamily,AType,AClass,AIdentifier:Word):Boolean;</code>  | 
|    | |    | ||
|-  | |-  | ||
| Line 133: | Line 194: | ||
|colspan="2"|   | |colspan="2"|   | ||
|-  | |-  | ||
| − | | <code>function InsertDNSQuestion(AMessage:PDNSMessage; ACount:Word; AData:Pointer; ALength,AType,AClass:Word):Boolean;</code>  | + | | <code>function InsertDNSQuestion(AMessage:PDNSMessage; ACount:Word; AData:Pointer; ALength,AFamily,AType,AClass:Word):Boolean;</code>  | 
|    | |    | ||
|-  | |-  | ||
| − | | <code>function ExtractDNSAnswer(AMessage:PDNSMessage; ACount:Word; AName,AData:Pointer; var ANameLength,ADataLength  | + | | <code>function ExtractDNSAnswer(AMessage:PDNSMessage; ACount:Word; AName,AData:Pointer; var ANameLength,ADataLength:Word; AFamily:Word; var AType,AClass:Word; var ATtl:LongWord):Boolean;</code>  | 
|    | |    | ||
|-  | |-  | ||
| − | | <code>function ExtractDNSAuthority(AMessage:PDNSMessage; ACount:Word; AName,AData:Pointer; var ANameLength,ADataLength  | + | | <code>function ExtractDNSAuthority(AMessage:PDNSMessage; ACount:Word; AName,AData:Pointer; var ANameLength,ADataLength:Word; AFamily:Word; var AType,AClass:Word; var ATtl:LongWord):Boolean;</code>  | 
|    | |    | ||
|-  | |-  | ||
| − | | <code>function ExtractDNSAdditional(AMessage:PDNSMessage; ACount:Word; AName,AData:Pointer; var ANameLength,ADataLength  | + | | <code>function ExtractDNSAdditional(AMessage:PDNSMessage; ACount:Word; AName,AData:Pointer; var ANameLength,ADataLength:Word; AFamily:Word; var AType,AClass:Word; var ATtl:LongWord):Boolean;</code>  | 
|    | |    | ||
|-  | |-  | ||
| Line 150: | Line 211: | ||
|    | |    | ||
|-  | |-  | ||
| − | | <code>function GetHostByName(AName:PChar):PHostEnt;</code>  | + | | <code>function GetHostByName(AName:PChar; AFamily:Integer):PHostEnt;</code>  | 
|    | |    | ||
|-  | |-  | ||
| Line 174: | Line 235: | ||
|colspan="2"|   | |colspan="2"|   | ||
|-  | |-  | ||
| − | | <code>function GetNetByAddr(AAddr:Pointer; ALength,  | + | | <code>function GetNetByAddr(AAddr:Pointer; ALength,AFamily:Integer):PNetEnt;</code>  | 
|    | |    | ||
|-  | |-  | ||
| − | | <code>function GetNetByName(AName:PChar):PNetEnt;</code>  | + | | <code>function GetNetByName(AName:PChar; AFamily:Integer):PNetEnt;</code>  | 
| + | |    | ||
| + | |-  | ||
| + | |colspan="2"|   | ||
| + | |-  | ||
| + | | <code>function GetAddrInfo(ANodeName,AServName:PChar; AHints:PAddrInfo; var AAddrInfo:PAddrInfo):Integer;</code>  | ||
| + | |    | ||
| + | |-  | ||
| + | | <code>function GetNameInfo(AAddr:PSockAddr; AAddrLength:Integer; AHost:PChar; AHostLength:Integer; AServ:PChar; AServLength:Integer; AFlags:LongWord):Integer;</code>  | ||
| + | |    | ||
| + | |-  | ||
| + | | <code>procedure FreeAddrInfo(AAddrInfo:PAddrInfo);</code>  | ||
|    | |    | ||
|-  | |-  | ||
| Line 245: | Line 317: | ||
<br />  | <br />  | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">  | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">  | ||
| − | <pre style="border: 0; padding-bottom:0px;">function TDNSClient.AddressEntryToHostEnt(AddressEntry:  | + | <pre style="border: 0; padding-bottom:0px;">function TDNSClient.GetLastAddrInfo(AAddrInfo:PAddrInfo):PAddrInfo;</pre>  | 
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>  | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;"  | ||
| + | |-  | ||
| + | ! Note  | ||
| + | | None documented  | ||
| + | |-  | ||
| + | |}  | ||
| + | </div></div>  | ||
| + | <br />  | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">  | ||
| + | <pre style="border: 0; padding-bottom:0px;">function TDNSClient.AddressEntryToHostEnt(AddressEntry:TAddressEntry; const AName:String; ACount:Integer):PHostEnt;</pre>  | ||
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>  | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>  | ||
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | ||
| Line 257: | Line 341: | ||
<br />  | <br />  | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">  | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">  | ||
| − | <pre style="border: 0; padding-bottom:0px;">function TDNSClient.HostEntryToHostEnt(HostEntry:  | + | <pre style="border: 0; padding-bottom:0px;">function TDNSClient.HostEntryToHostEnt(HostEntry:THostEntry):PHostEnt;</pre>  | 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>  | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>  | ||
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | ||
| Line 269: | Line 353: | ||
<br />  | <br />  | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">  | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">  | ||
| − | <pre style="border: 0; padding-bottom:0px;">function TDNSClient.NetworkEntryToNetEnt(NetworkEntry:  | + | <pre style="border: 0; padding-bottom:0px;">function TDNSClient.NetworkEntryToNetEnt(NetworkEntry:TNetworkEntry):PNetEnt;</pre>  | 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>  | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>  | ||
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | ||
| Line 281: | Line 365: | ||
<br />  | <br />  | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">  | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">  | ||
| − | <pre style="border: 0; padding-bottom:0px;">function TDNSClient.ServEntryToServEnt(ServEntry:  | + | <pre style="border: 0; padding-bottom:0px;">function TDNSClient.ServEntryToServEnt(ServEntry:TServEntry):PServEnt;</pre>  | 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>  | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>  | ||
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | ||
| Line 293: | Line 377: | ||
<br />  | <br />  | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">  | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">  | ||
| − | <pre style="border: 0; padding-bottom:0px;">function TDNSClient.ProtoEntryToProtoEnt(ProtoEntry:  | + | <pre style="border: 0; padding-bottom:0px;">function TDNSClient.ProtoEntryToProtoEnt(ProtoEntry:TProtoEntry):PProtoEnt;</pre>  | 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>  | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>  | ||
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | ||
| Line 300: | Line 384: | ||
! Note  | ! Note  | ||
| Caller must hold Proto entry lock  | | Caller must hold Proto entry lock  | ||
| + | |-  | ||
| + | |}  | ||
| + | </div></div>  | ||
| + | <br />  | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">  | ||
| + | <pre style="border: 0; padding-bottom:0px;">function TDNSClient.AddressEntryToAddrInfo(AddressEntry:TAddressEntry; AFlags,AFamily,AProtocol,ASocketType:LongInt; APort:Word; AFirst:Boolean):PAddrInfo;</pre>  | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>  | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;"  | ||
| + | |-  | ||
| + | ! Note  | ||
| + | | Caller must hold Address entry lock  | ||
| + | |-  | ||
| + | |}  | ||
| + | </div></div>  | ||
| + | <br />  | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">  | ||
| + | <pre style="border: 0; padding-bottom:0px;">function TDNSClient.HostEntryToAddrInfo(HostEntry:THostEntry; AFlags,AFamily,AProtocol,ASocketType:LongInt; APort:Word; AFirst:Boolean):PAddrInfo;</pre>  | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>  | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;"  | ||
| + | |-  | ||
| + | ! Note  | ||
| + | | Caller must hold Host entry lock  | ||
| + | |-  | ||
| + | |}  | ||
| + | </div></div>  | ||
| + | <br />  | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">  | ||
| + | <pre style="border: 0; padding-bottom:0px;">function TDNSClient.ResolveLocalAddrInfo(AFlags,AFamily,AProtocol,ASocketType:LongInt; APort:Word):PAddrInfo;</pre>  | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>  | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;"  | ||
| + | |-  | ||
| + | ! Note  | ||
| + | | None documented  | ||
| + | |-  | ||
| + | |}  | ||
| + | </div></div>  | ||
| + | <br />  | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">  | ||
| + | <pre style="border: 0; padding-bottom:0px;">function TDNSClient.ResolveLoopbackAddrInfo(AFlags,AFamily,AProtocol,ASocketType:LongInt; APort:Word):PAddrInfo;</pre>  | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>  | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;"  | ||
| + | |-  | ||
| + | ! Note  | ||
| + | | None documented  | ||
| + | |-  | ||
| + | |}  | ||
| + | </div></div>  | ||
| + | <br />  | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">  | ||
| + | <pre style="border: 0; padding-bottom:0px;">function TDNSClient.ResolveHostByName(const AName:String; AFamily:Integer):THostEntry;</pre>  | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Performs a DNS_TYPE_A or DNS_TYPE_AAAA Query for the Address of the Domain name supplied</div>  | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;"  | ||
| + | |-  | ||
| + | ! Note  | ||
| + | | Caller must check if name is blank or 'localhost' and get the appropriate local addresses  | ||
| + | Will lock the returned host entry for read access, caller must unlock when finished.  | ||
| + | |-  | ||
| + | |}  | ||
| + | </div></div>  | ||
| + | <br />  | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">  | ||
| + | <pre style="border: 0; padding-bottom:0px;">function TDNSClient.ResolveHostByAddress(AAddress:Pointer; ALength,AFamily:Integer):THostEntry;</pre>  | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Performs a DNS_TYPE_PTR Query for the Domain name of the Address supplied</div>  | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;"  | ||
| + | |-  | ||
| + | ! Note  | ||
| + | | Address will be in network order where applicable  | ||
| + | Will lock the returned host entry for read access, caller must unlock when finished.  | ||
| + | |-  | ||
| + | |}  | ||
| + | </div></div>  | ||
| + | <br />  | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">  | ||
| + | <pre style="border: 0; padding-bottom:0px;">function TDNSClient.ResolveHostName:String;</pre>  | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>  | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;"  | ||
| + | |-  | ||
| + | ! Note  | ||
| + | | None documented  | ||
| + | |-  | ||
| + | |}  | ||
| + | </div></div>  | ||
| + | <br />  | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">  | ||
| + | <pre style="border: 0; padding-bottom:0px;">function TDNSClient.ResolveServByName(const AName,AProto:String):TServEntry;</pre>  | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>  | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;"  | ||
| + | |-  | ||
| + | ! Note  | ||
| + | | Will lock the returned service entry for read access, caller must unlock when finished.  | ||
| + | |-  | ||
| + | |}  | ||
| + | </div></div>  | ||
| + | <br />  | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">  | ||
| + | <pre style="border: 0; padding-bottom:0px;">function TDNSClient.ResolveServByPort(APort:Integer; const AProto:String):TServEntry;</pre>  | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>  | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;"  | ||
| + | |-  | ||
| + | ! Note  | ||
| + | | Port will be in network order  | ||
| + | Will lock the returned service entry for read access, caller must unlock when finished.  | ||
| + | |-  | ||
| + | |}  | ||
| + | </div></div>  | ||
| + | <br />  | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">  | ||
| + | <pre style="border: 0; padding-bottom:0px;">function TDNSClient.ResolveProtoByName(const AName:String):TProtoEntry;</pre>  | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>  | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;"  | ||
| + | |-  | ||
| + | ! Note  | ||
| + | | Will lock the returned protocol entry for read access, caller must unlock when finished.  | ||
| + | |-  | ||
| + | |}  | ||
| + | </div></div>  | ||
| + | <br />  | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">  | ||
| + | <pre style="border: 0; padding-bottom:0px;">function TDNSClient.ResolveProtoByNumber(AProto:Integer):TProtoEntry;</pre>  | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>  | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;"  | ||
| + | |-  | ||
| + | ! Note  | ||
| + | | Protocol will be in host order  | ||
| + | Will lock the returned protocol entry for read access, caller must unlock when finished.  | ||
| + | |-  | ||
| + | |}  | ||
| + | </div></div>  | ||
| + | <br />  | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">  | ||
| + | <pre style="border: 0; padding-bottom:0px;">function TDNSClient.ResolveNetworkByName(const AName:String; AFamily:Integer):TNetworkEntry;</pre>  | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>  | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;"  | ||
| + | |-  | ||
| + | ! Note  | ||
| + | | Will lock the returned network entry for read access, caller must unlock when finished.  | ||
| + | |-  | ||
| + | |}  | ||
| + | </div></div>  | ||
| + | <br />  | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">  | ||
| + | <pre style="border: 0; padding-bottom:0px;">function TDNSClient.ResolveNetworkByAddress(AAddress:Pointer; ALength,AFamily:Integer):TNetworkEntry;</pre>  | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>  | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;"  | ||
| + | |-  | ||
| + | ! Note  | ||
| + | | Address will be in network order where applicable  | ||
| + | Will lock the returned network entry for read access, caller must unlock when finished.  | ||
|-  | |-  | ||
|}  | |}  | ||
| Line 473: | Line 718: | ||
<br />  | <br />  | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">  | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">  | ||
| − | <pre style="border: 0; padding-bottom:0px;">function TDNSClient.HandleDNSResponse(AMessage:PDNSMessage; AIdentifier:Word):Boolean;</pre>  | + | <pre style="border: 0; padding-bottom:0px;">function TDNSClient.HandleDNSResponse(AMessage:PDNSMessage; AFamily,AIdentifier:Word):Boolean;</pre>  | 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>  | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>  | ||
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | ||
| Line 485: | Line 730: | ||
<br />  | <br />  | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">  | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">  | ||
| − | <pre style="border: 0; padding-bottom:0px;">function TDNSClient.SendDNSQuery(ASocket:TProtocolSocket;   | + | <pre style="border: 0; padding-bottom:0px;">function TDNSClient.PerformDNSRequest(AData:Pointer; ALength,AFamily,AType,AClass:Word):Boolean;</pre>  | 
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>  | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;"  | ||
| + | |-  | ||
| + | ! Note  | ||
| + | | Caller must confirm that the data and length are valid  | ||
| + | |-  | ||
| + | |}  | ||
| + | </div></div>  | ||
| + | <br />  | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">  | ||
| + | <pre style="border: 0; padding-bottom:0px;">function TDNSClient.SendDNSQuery(ASocket:TProtocolSocket; AServer:PSockAddr; AServerLength:Integer; AData:Pointer;  ALength,AFamily,AType,AClass,AIdentifier:Word):Boolean;</pre>  | ||
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>  | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>  | ||
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | ||
| Line 497: | Line 754: | ||
<br />  | <br />  | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">  | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">  | ||
| − | <pre style="border: 0; padding-bottom:0px;">function TDNSClient.RecvDNSResponse(ASocket:TProtocolSocket; AType,AClass,AIdentifier:Word):Boolean;</pre>  | + | <pre style="border: 0; padding-bottom:0px;">function TDNSClient.RecvDNSResponse(ASocket:TProtocolSocket; AFamily,AType,AClass,AIdentifier:Word):Boolean;</pre>  | 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>  | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>  | ||
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | ||
| Line 554: | Line 811: | ||
<br />  | <br />  | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">  | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">  | ||
| − | <pre style="border: 0; padding-bottom:0px;">function TDNSClient.InsertDNSQuestion(AMessage:PDNSMessage; ACount:Word; AData:Pointer; ALength,AType,AClass:Word):Boolean;</pre>  | + | <pre style="border: 0; padding-bottom:0px;">function TDNSClient.InsertDNSQuestion(AMessage:PDNSMessage; ACount:Word; AData:Pointer; ALength,AFamily,AType,AClass:Word):Boolean;</pre>  | 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>  | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>  | ||
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | ||
| Line 566: | Line 823: | ||
<br />  | <br />  | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">  | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">  | ||
| − | <pre style="border: 0; padding-bottom:0px;">function TDNSClient.ExtractDNSAnswer(AMessage:PDNSMessage; ACount:Word; AName,AData:Pointer; var ANameLength,ADataLength  | + | <pre style="border: 0; padding-bottom:0px;">function TDNSClient.ExtractDNSAnswer(AMessage:PDNSMessage; ACount:Word; AName,AData:Pointer; var ANameLength,ADataLength:Word; AFamily:Word; var AType,AClass:Word; var ATtl:LongWord):Boolean;</pre>  | 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>  | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>  | ||
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | ||
| Line 578: | Line 835: | ||
<br />  | <br />  | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">  | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">  | ||
| − | <pre style="border: 0; padding-bottom:0px;">function TDNSClient.ExtractDNSAuthority(AMessage:PDNSMessage; ACount:Word; AName,AData:Pointer; var ANameLength,ADataLength  | + | <pre style="border: 0; padding-bottom:0px;">function TDNSClient.ExtractDNSAuthority(AMessage:PDNSMessage; ACount:Word; AName,AData:Pointer; var ANameLength,ADataLength:Word; AFamily:Word; var AType,AClass:Word; var ATtl:LongWord):Boolean;</pre>  | 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>  | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>  | ||
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | ||
| Line 590: | Line 847: | ||
<br />  | <br />  | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">  | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">  | ||
| − | <pre style="border: 0; padding-bottom:0px;">function TDNSClient.ExtractDNSAdditional(AMessage:PDNSMessage; ACount:Word; AName,AData:Pointer; var ANameLength,ADataLength  | + | <pre style="border: 0; padding-bottom:0px;">function TDNSClient.ExtractDNSAdditional(AMessage:PDNSMessage; ACount:Word; AName,AData:Pointer; var ANameLength,ADataLength:Word; AFamily:Word; var AType,AClass:Word; var ATtl:LongWord):Boolean;</pre>  | 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>  | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>  | ||
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | ||
| Line 614: | Line 871: | ||
<br />  | <br />  | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">  | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">  | ||
| − | <pre style="border: 0; padding-bottom:0px;">function TDNSClient.GetHostByName(AName:PChar):PHostEnt;</pre>  | + | <pre style="border: 0; padding-bottom:0px;">function TDNSClient.GetHostByName(AName:PChar; AFamily:Integer):PHostEnt;</pre>  | 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Performs a DNS_TYPE_A or DNS_TYPE_AAAA Query for the Address of the Domain name supplied</div>  | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Performs a DNS_TYPE_A or DNS_TYPE_AAAA Query for the Address of the Domain name supplied</div>  | ||
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | ||
| Line 687: | Line 944: | ||
<br />  | <br />  | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">  | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">  | ||
| − | <pre style="border: 0; padding-bottom:0px;">function TDNSClient.GetNetByAddr(AAddr:Pointer; ALength,  | + | <pre style="border: 0; padding-bottom:0px;">function TDNSClient.GetNetByAddr(AAddr:Pointer; ALength,AFamily:Integer):PNetEnt;</pre>  | 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>  | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>  | ||
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | ||
| Line 699: | Line 956: | ||
<br />  | <br />  | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">  | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">  | ||
| − | <pre style="border: 0; padding-bottom:0px;">function TDNSClient.GetNetByName(AName:PChar):PNetEnt;</pre>  | + | <pre style="border: 0; padding-bottom:0px;">function TDNSClient.GetNetByName(AName:PChar; AFamily:Integer):PNetEnt;</pre>  | 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>  | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>  | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;"  | ||
| + | |-  | ||
| + | ! Note  | ||
| + | | None documented  | ||
| + | |-  | ||
| + | |}  | ||
| + | </div></div>  | ||
| + | <br />  | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">  | ||
| + | <pre style="border: 0; padding-bottom:0px;">function TDNSClient.GetAddrInfo(ANodeName,AServName:PChar; AHints:PAddrInfo; var AAddrInfo:PAddrInfo):Integer;</pre>  | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' RFC 3493 protocol-independent translation from a host name to an address</div>  | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;"  | ||
| + | |-  | ||
| + | ! Note  | ||
| + | | None documented  | ||
| + | |-  | ||
| + | |}  | ||
| + | </div></div>  | ||
| + | <br />  | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">  | ||
| + | <pre style="border: 0; padding-bottom:0px;">function TDNSClient.GetNameInfo(AAddr:PSockAddr; AAddrLength:Integer; AHost:PChar; AHostLength:Integer; AServ:PChar; AServLength:Integer; AFlags:LongWord):Integer;</pre>  | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' RFC 3493 protocol-independent name resolution from an address to a host name and a port number to a service name}</div>  | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;"  | ||
| + | |-  | ||
| + | ! Note  | ||
| + | | None documented  | ||
| + | |-  | ||
| + | |}  | ||
| + | </div></div>  | ||
| + | <br />  | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">  | ||
| + | <pre style="border: 0; padding-bottom:0px;">function TDNSClient.FreeAddrInfo(AAddrInfo:PAddrInfo);</pre>  | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Free address information that GetAddrInfo dynamically allocates in TAddrInfo structures</div>  | ||
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | ||
{| class="wikitable" style="font-size: 14px; background: white;"  | {| class="wikitable" style="font-size: 14px; background: white;"  | ||
Latest revision as of 02:32, 6 March 2025
Return to Unit DNS
Description
To be documented
Class definitions
TDNSClient = class(TNetworkClient)
 constructor Create(AProtocol:TNetworkProtocol);
 | 
|
 destructor Destroy; override;
 | 
|
private 
 | |
 FTlsIndex:LongWord;
 | 
|
 function GetClientData:PDNSClientData;
 | 
|
 function CreateClientData:Boolean;
 | 
|
 function GetLastAddrInfo(AAddrInfo:PAddrInfo):PAddrInfo;
 | 
|
 function AddressEntryToHostEnt(AddressEntry:TAddressEntry; const AName:String; ACount:Integer):PHostEnt;
 | 
|
 function HostEntryToHostEnt(HostEntry:THostEntry):PHostEnt;
 | 
|
 function NetworkEntryToNetEnt(NetworkEntry:TNetworkEntry):PNetEnt;
 | 
|
 function ServEntryToServEnt(ServEntry:TServEntry):PServEnt;
 | 
|
 function ProtoEntryToProtoEnt(ProtoEntry:TProtoEntry):PProtoEnt;
 | 
|
 function AddressEntryToAddrInfo(AddressEntry:TAddressEntry; AFlags,AFamily,AProtocol,ASocketType:LongInt; APort:Word; AFirst:Boolean):PAddrInfo;
 | 
|
 function HostEntryToAddrInfo(HostEntry:THostEntry; AFlags,AFamily,AProtocol,ASocketType:LongInt; APort:Word; AFirst:Boolean):PAddrInfo;
 | 
|
 function ResolveLocalAddrInfo(AFlags,AFamily,AProtocol,ASocketType:LongInt; APort:Word):PAddrInfo;
 | 
|
 function ResolveLoopbackAddrInfo(AFlags,AFamily,AProtocol,ASocketType:LongInt; APort:Word):PAddrInfo;
 | 
|
 function ResolveHostByName(const AName:String; AFamily:Integer):THostEntry;
 | 
|
 function ResolveHostByAddress(AAddress:Pointer; ALength,AFamily:Integer):THostEntry;
 | 
|
 function ResolveHostName:String;
 | 
|
 function ResolveServByName(const AName,AProto:String):TServEntry;
 | 
|
 function ResolveServByPort(APort:Integer; const AProto:String):TServEntry;
 | 
|
 function ResolveProtoByName(const AName:String):TProtoEntry;
 | 
|
 function ResolveProtoByNumber(AProto:Integer):TProtoEntry;
 | 
|
 function ResolveNetworkByName(const AName:String; AFamily:Integer):TNetworkEntry;
 | 
|
 function ResolveNetworkByAddress(AAddress:Pointer; ALength,AFamily:Integer):TNetworkEntry;
 | 
|
 function InAddrToName(const AAddress:TInAddr):String;
 | 
|
 function NameToInAddr(const AName:String):TInAddr;
 | 
|
 function In6AddrToName(const AAddress:TIn6Addr):String;
 | 
|
 function NameToIn6Addr(const AName:String):TIn6Addr;
 | 
|
 function GetDNSMessageSize(AMessage:PDNSMessage):Integer;
 | 
|
 function GetDNSNameSize(AMessage:PDNSMessage; AOffset:Word):Word;
 | 
|
 function GetDNSQuestionSize(AMessage:PDNSMessage; AOffset:Word):Word;
 | 
|
 function GetDNSResourceSize(AMessage:PDNSMessage; AOffset:Word):Word;
 | 
|
 function GetDNSQuestionOffset(AMessage:PDNSMessage; ACount:Word):Word;
 | 
|
 function GetDNSAnswerOffset(AMessage:PDNSMessage; ACount:Word):Word;
 | 
|
 function GetDNSAuthorityOffset(AMessage:PDNSMessage; ACount:Word):Word;
 | 
|
 function GetDNSAdditionalOffset(AMessage:PDNSMessage; ACount:Word):Word;
 | 
|
 function CreateDNSQuery(AMessage:PDNSMessage; AIdentifier:Word):Boolean;
 | 
|
 function CheckDNSResponse(AMessage:PDNSMessage; AIdentifier:Word):Boolean;
 | 
|
 function HandleDNSResponse(AMessage:PDNSMessage; AFamily,AIdentifier:Word):Boolean;
 | 
|
 function PerformDNSRequest(AData:Pointer; ALength,AFamily,AType,AClass:Word):Boolean;
 | 
|
 function SendDNSQuery(ASocket:TProtocolSocket; AServer:PSockAddr; AServerLength:Integer; AData:Pointer; ALength,AFamily,AType,AClass,AIdentifier:Word):Boolean;
 | 
|
 function RecvDNSResponse(ASocket:TProtocolSocket; AFamily,AType,AClass,AIdentifier:Word):Boolean;
 | 
|
 function InsertDNSName(AMessage:PDNSMessage; AOffset:Word; AName:Pointer; ALength:Word):Boolean;
 | 
|
 function ExtractDNSName(AMessage:PDNSMessage; AOffset:Word; AName:Pointer; var ALength:Word):Boolean;
 | 
|
 function ExtractDNSRData(AMessage:PDNSMessage; AOffset:Word; AData:Pointer; var ALength:Word; AType,AClass:Word):Boolean;
 | 
|
 function InsertDNSQuestion(AMessage:PDNSMessage; ACount:Word; AData:Pointer; ALength,AFamily,AType,AClass:Word):Boolean;
 | 
|
 function ExtractDNSAnswer(AMessage:PDNSMessage; ACount:Word; AName,AData:Pointer; var ANameLength,ADataLength:Word; AFamily:Word; var AType,AClass:Word; var ATtl:LongWord):Boolean;
 | 
|
 function ExtractDNSAuthority(AMessage:PDNSMessage; ACount:Word; AName,AData:Pointer; var ANameLength,ADataLength:Word; AFamily:Word; var AType,AClass:Word; var ATtl:LongWord):Boolean;
 | 
|
 function ExtractDNSAdditional(AMessage:PDNSMessage; ACount:Word; AName,AData:Pointer; var ANameLength,ADataLength:Word; AFamily:Word; var AType,AClass:Word; var ATtl:LongWord):Boolean;
 | 
|
public 
 | |
 function GetHostByAddr(AAddr:Pointer; ALength,AFamily:Integer):PHostEnt;
 | 
|
 function GetHostByName(AName:PChar; AFamily:Integer):PHostEnt;
 | 
|
 function GetHostName(AName:PChar; ALength:Integer):Integer;
 | 
|
 function GetServByPort(APort:Integer; AProto:PChar):PServEnt;
 | 
|
 function GetServByName(AName,AProto:PChar):PServEnt;
 | 
|
 function GetProtoByNumber(AProto:Integer):PProtoEnt;
 | 
|
 function GetProtoByName(AName:PChar):PProtoEnt;
 | 
|
 function GetNetByAddr(AAddr:Pointer; ALength,AFamily:Integer):PNetEnt;
 | 
|
 function GetNetByName(AName:PChar; AFamily:Integer):PNetEnt;
 | 
|
 function GetAddrInfo(ANodeName,AServName:PChar; AHints:PAddrInfo; var AAddrInfo:PAddrInfo):Integer;
 | 
|
 function GetNameInfo(AAddr:PSockAddr; AAddrLength:Integer; AHost:PChar; AHostLength:Integer; AServ:PChar; AServLength:Integer; AFlags:LongWord):Integer;
 | 
|
 procedure FreeAddrInfo(AAddrInfo:PAddrInfo);
 | 
|
 function StartClient:Boolean; override;
 | 
|
 function StopClient:Boolean; override;
 | 
|
Function declarations
constructor TDNSClient.Create(AProtocol:TNetworkProtocol);
Description: To be documented
| Note | None documented | 
|---|
destructor TDNSClient.Destroy;
Description: To be documented
| Note | None documented | 
|---|
function TDNSClient.GetClientData:PDNSClientData;
Description: Get the DNS client data for the current thread
| Note | None documented | 
|---|
function TDNSClient.CreateClientData:Boolean;
Description: Allocate the DNS client data for the current thread
| Note | None documented | 
|---|
function TDNSClient.GetLastAddrInfo(AAddrInfo:PAddrInfo):PAddrInfo;
Description: To be documented
| Note | None documented | 
|---|
function TDNSClient.AddressEntryToHostEnt(AddressEntry:TAddressEntry; const AName:String; ACount:Integer):PHostEnt;
Description: To be documented
| Note | Caller must hold Address entry lock | 
|---|
function TDNSClient.HostEntryToHostEnt(HostEntry:THostEntry):PHostEnt;
Description: To be documented
| Note | Caller must hold Host entry lock | 
|---|
function TDNSClient.NetworkEntryToNetEnt(NetworkEntry:TNetworkEntry):PNetEnt;
Description: To be documented
| Note | Caller must hold Network entry lock | 
|---|
function TDNSClient.ServEntryToServEnt(ServEntry:TServEntry):PServEnt;
Description: To be documented
| Note | Caller must hold Serv entry lock | 
|---|
function TDNSClient.ProtoEntryToProtoEnt(ProtoEntry:TProtoEntry):PProtoEnt;
Description: To be documented
| Note | Caller must hold Proto entry lock | 
|---|
function TDNSClient.AddressEntryToAddrInfo(AddressEntry:TAddressEntry; AFlags,AFamily,AProtocol,ASocketType:LongInt; APort:Word; AFirst:Boolean):PAddrInfo;
Description: To be documented
| Note | Caller must hold Address entry lock | 
|---|
function TDNSClient.HostEntryToAddrInfo(HostEntry:THostEntry; AFlags,AFamily,AProtocol,ASocketType:LongInt; APort:Word; AFirst:Boolean):PAddrInfo;
Description: To be documented
| Note | Caller must hold Host entry lock | 
|---|
function TDNSClient.ResolveLocalAddrInfo(AFlags,AFamily,AProtocol,ASocketType:LongInt; APort:Word):PAddrInfo;
Description: To be documented
| Note | None documented | 
|---|
function TDNSClient.ResolveLoopbackAddrInfo(AFlags,AFamily,AProtocol,ASocketType:LongInt; APort:Word):PAddrInfo;
Description: To be documented
| Note | None documented | 
|---|
function TDNSClient.ResolveHostByName(const AName:String; AFamily:Integer):THostEntry;
Description: Performs a DNS_TYPE_A or DNS_TYPE_AAAA Query for the Address of the Domain name supplied
| Note |  Caller must check if name is blank or 'localhost' and get the appropriate local addresses
 Will lock the returned host entry for read access, caller must unlock when finished.  | 
|---|
function TDNSClient.ResolveHostByAddress(AAddress:Pointer; ALength,AFamily:Integer):THostEntry;
Description: Performs a DNS_TYPE_PTR Query for the Domain name of the Address supplied
| Note |  Address will be in network order where applicable
 Will lock the returned host entry for read access, caller must unlock when finished.  | 
|---|
function TDNSClient.ResolveHostName:String;
Description: To be documented
| Note | None documented | 
|---|
function TDNSClient.ResolveServByName(const AName,AProto:String):TServEntry;
Description: To be documented
| Note | Will lock the returned service entry for read access, caller must unlock when finished. | 
|---|
function TDNSClient.ResolveServByPort(APort:Integer; const AProto:String):TServEntry;
Description: To be documented
| Note |  Port will be in network order
 Will lock the returned service entry for read access, caller must unlock when finished.  | 
|---|
function TDNSClient.ResolveProtoByName(const AName:String):TProtoEntry;
Description: To be documented
| Note | Will lock the returned protocol entry for read access, caller must unlock when finished. | 
|---|
function TDNSClient.ResolveProtoByNumber(AProto:Integer):TProtoEntry;
Description: To be documented
| Note |  Protocol will be in host order
 Will lock the returned protocol entry for read access, caller must unlock when finished.  | 
|---|
function TDNSClient.ResolveNetworkByName(const AName:String; AFamily:Integer):TNetworkEntry;
Description: To be documented
| Note | Will lock the returned network entry for read access, caller must unlock when finished. | 
|---|
function TDNSClient.ResolveNetworkByAddress(AAddress:Pointer; ALength,AFamily:Integer):TNetworkEntry;
Description: To be documented
| Note |  Address will be in network order where applicable
 Will lock the returned network entry for read access, caller must unlock when finished.  | 
|---|
function TDNSClient.InAddrToName(const AAddress:TInAddr):String;
Description: Converts an Address to a Name in IN-ADDR.ARPA format
| Note | Expects Address to be in Host order | 
|---|
function TDNSClient.NameToInAddr(const AName:String):TInAddr;
Description: Converts a Name in IN-ADDR.ARPA format to an Address
| Note | Returns Address in Host order | 
|---|
function TDNSClient.In6AddrToName(const AAddress:TIn6Addr):String;
Description: Converts an Address to a Name in IP6.ARPA format
| Note | None documented | 
|---|
function TDNSClient.NameToIn6Addr(const AName:String):TIn6Addr;
Description: Converts a Name in IN-IP6.ARPA format to an Address
| Note | None documented | 
|---|
function TDNSClient.GetDNSMessageSize(AMessage:PDNSMessage):Integer;
Description: Return size of DNS Header plus Questions and Resource Records
| Note | None documented | 
|---|
function TDNSClient.GetDNSNameSize(AMessage:PDNSMessage; AOffset:Word):Word;
Description: Returns the actual size of the Name pointed to by Offset
| Note | Compressed Names will return the compressed size not the full size | 
|---|
function TDNSClient.GetDNSQuestionSize(AMessage:PDNSMessage; AOffset:Word):Word;
Description: Returns the actual size of the Question pointed to by Offset
| Note | Compressed Names will return the compressed size not the full size | 
|---|
function TDNSClient.GetDNSResourceSize(AMessage:PDNSMessage; AOffset:Word):Word;
Description: Returns the actual size of the Resource pointed to by Offset
| Note | Compressed Names will return the compressed size not the full size | 
|---|
function TDNSClient.GetDNSQuestionOffset(AMessage:PDNSMessage; ACount:Word):Word;
Description: Return the offset to the DNS Question number Count
| Note | Question numbers start at 1, if Count is higher than the current number of questions returns the offset for next Question. | 
|---|
function TDNSClient.GetDNSAnswerOffset(AMessage:PDNSMessage; ACount:Word):Word;
Description: Return the offset to the DNS Answer number Count
| Note | Answer numbers start at 1, if Count is higher than the current number of answers returns the offset for next Answer | 
|---|
function TDNSClient.GetDNSAuthorityOffset(AMessage:PDNSMessage; ACount:Word):Word;
Description: Return the offset to the DNS Authority number Count
| Note | Authority numbers start at 1, if Count is higher than the current number of authoritys returns the offset for next Authority. | 
|---|
function TDNSClient.GetDNSAdditionalOffset(AMessage:PDNSMessage; ACount:Word):Word;
Description: Return the offset to the DNS Additional number Count
| Note | Additional numbers start at 1, if Count is higher than the current number of additionals returns the offset for next Additional. | 
|---|
function TDNSClient.CreateDNSQuery(AMessage:PDNSMessage; AIdentifier:Word):Boolean;
Description: To be documented
| Note | None documented | 
|---|
function TDNSClient.CheckDNSResponse(AMessage:PDNSMessage; AIdentifier:Word):Boolean;
Description: To be documented
| Note | None documented | 
|---|
function TDNSClient.HandleDNSResponse(AMessage:PDNSMessage; AFamily,AIdentifier:Word):Boolean;
Description: To be documented
| Note | None documented | 
|---|
function TDNSClient.PerformDNSRequest(AData:Pointer; ALength,AFamily,AType,AClass:Word):Boolean;
Description: To be documented
| Note | Caller must confirm that the data and length are valid | 
|---|
function TDNSClient.SendDNSQuery(ASocket:TProtocolSocket; AServer:PSockAddr; AServerLength:Integer; AData:Pointer; ALength,AFamily,AType,AClass,AIdentifier:Word):Boolean;
Description: To be documented
| Note | Caller must hold the Socket lock | 
|---|
function TDNSClient.RecvDNSResponse(ASocket:TProtocolSocket; AFamily,AType,AClass,AIdentifier:Word):Boolean;
Description: To be documented
| Note | Caller must hold the Socket lock | 
|---|
function TDNSClient.InsertDNSName(AMessage:PDNSMessage; AOffset:Word; AName:Pointer; ALength:Word):Boolean;
Description: Inserts the Name into the Message
| Length | Length contains the length of the Name | 
|---|---|
| Note | Converts name into DNS encoded format from ASCII string | 
function TDNSClient.ExtractDNSName(AMessage:PDNSMessage; AOffset:Word; AName:Pointer; var ALength:Word):Boolean;
Description: Extracts the Name from the Message
| Length | Length returns the length of the Name | 
|---|---|
| Note | Converts name into ASCII string from DNS encoded format | 
function TDNSClient.ExtractDNSRData(AMessage:PDNSMessage; AOffset:Word; AData:Pointer; var ALength:Word; AType,AClass:Word):Boolean;
Description: Extracts the Resource Data from the Message
| Length | Length returns the length of the Data | 
|---|---|
| Type | For Types that are a Name simply calls ExtractDNSName to unformat the Data | 
function TDNSClient.InsertDNSQuestion(AMessage:PDNSMessage; ACount:Word; AData:Pointer; ALength,AFamily,AType,AClass:Word):Boolean;
Description: To be documented
| Note | None documented | 
|---|
function TDNSClient.ExtractDNSAnswer(AMessage:PDNSMessage; ACount:Word; AName,AData:Pointer; var ANameLength,ADataLength:Word; AFamily:Word; var AType,AClass:Word; var ATtl:LongWord):Boolean;
Description: To be documented
| Note | None documented | 
|---|
function TDNSClient.ExtractDNSAuthority(AMessage:PDNSMessage; ACount:Word; AName,AData:Pointer; var ANameLength,ADataLength:Word; AFamily:Word; var AType,AClass:Word; var ATtl:LongWord):Boolean;
Description: To be documented
| Note | None documented | 
|---|
function TDNSClient.ExtractDNSAdditional(AMessage:PDNSMessage; ACount:Word; AName,AData:Pointer; var ANameLength,ADataLength:Word; AFamily:Word; var AType,AClass:Word; var ATtl:LongWord):Boolean;
Description: To be documented
| Note | None documented | 
|---|
function TDNSClient.GetHostByAddr(AAddr:Pointer; ALength,AFamily:Integer):PHostEnt;
Description: Performs a DNS_TYPE_PTR Query for the Domain name of the Address supplied
| Note | Address will be in network order where applicable | 
|---|
function TDNSClient.GetHostByName(AName:PChar; AFamily:Integer):PHostEnt;
Description: Performs a DNS_TYPE_A or DNS_TYPE_AAAA Query for the Address of the Domain name supplied
| Name |  If Name is blank then get the addresses for the local machine
 If Name is 'localhost' then get the loopback addresses for the local machine  | 
|---|
function TDNSClient.GetHostName(AName:PChar; ALength:Integer):Integer;
Description: To be documented
| Note | None documented | 
|---|
function TDNSClient.GetServByPort(APort:Integer; AProto:PChar):PServEnt;
Description: To be documented
| Note | Port will be in network order | 
|---|
function TDNSClient.GetServByName(AName,AProto:PChar):PServEnt;
Description: To be documented
| Note | None documented | 
|---|
function TDNSClient.GetProtoByNumber(AProto:Integer):PProtoEnt;
Description: To be documented
| Proto | Protocol will be in host order | 
|---|
function TDNSClient.GetProtoByName(AName:PChar):PProtoEnt;
Description: To be documented
| Note | None documented | 
|---|
function TDNSClient.GetNetByAddr(AAddr:Pointer; ALength,AFamily:Integer):PNetEnt;
Description: To be documented
| Address | Address will be in network order where applicable | 
|---|
function TDNSClient.GetNetByName(AName:PChar; AFamily:Integer):PNetEnt;
Description: To be documented
| Note | None documented | 
|---|
function TDNSClient.GetAddrInfo(ANodeName,AServName:PChar; AHints:PAddrInfo; var AAddrInfo:PAddrInfo):Integer;
Description: RFC 3493 protocol-independent translation from a host name to an address
| Note | None documented | 
|---|
function TDNSClient.GetNameInfo(AAddr:PSockAddr; AAddrLength:Integer; AHost:PChar; AHostLength:Integer; AServ:PChar; AServLength:Integer; AFlags:LongWord):Integer;
Description: RFC 3493 protocol-independent name resolution from an address to a host name and a port number to a service name}
| Note | None documented | 
|---|
function TDNSClient.FreeAddrInfo(AAddrInfo:PAddrInfo);
Description: Free address information that GetAddrInfo dynamically allocates in TAddrInfo structures
| Note | None documented | 
|---|
function TDNSClient.StartClient:Boolean;
Description: To be documented
| Note | None documented | 
|---|
function TDNSClient.StopClient:Boolean;
Description: To be documented
| Note | None documented | 
|---|
Return to Unit Reference