when a packet is received the application should put the packet in\r
recvbuf/recvbuflen , set state.parsepacket and call state_process again\r
\r
when a packet is received the application should put the packet in\r
recvbuf/recvbuflen , set state.parsepacket and call state_process again\r
\r
//function buildrequest(const name:string;var packet:tdnspacket;requesttype:word):integer;\r
\r
//returns the DNS name used to reverse look up an IP, such as 4.3.2.1.in-addr.arpa for 1.2.3.4\r
//function buildrequest(const name:string;var packet:tdnspacket;requesttype:word):integer;\r
\r
//returns the DNS name used to reverse look up an IP, such as 4.3.2.1.in-addr.arpa for 1.2.3.4\r
\r
//set up state for a foward lookup. A family value of AF_INET6 will give only\r
//ipv6 results. Any other value will give only ipv4 results\r
\r
//set up state for a foward lookup. A family value of AF_INET6 will give only\r
//ipv6 results. Any other value will give only ipv4 results\r
\r
procedure setstate_reverse(const binip:tbinip;var state:tdnsstate);\r
procedure setstate_failure(var state:tdnsstate);\r
//procedure setstate_return(const rrp:trrpointer;len:integer;var state:tdnsstate);\r
\r
//for custom raw lookups such as TXT, as desired by the user\r
\r
procedure setstate_reverse(const binip:tbinip;var state:tdnsstate);\r
procedure setstate_failure(var state:tdnsstate);\r
//procedure setstate_return(const rrp:trrpointer;len:integer;var state:tdnsstate);\r
\r
//for custom raw lookups such as TXT, as desired by the user\r
//getcurrentsystemnameserver returns the nameserver the app should use and sets\r
//id to the id of that nameserver. id should later be used to report how laggy\r
//the servers response was and if it was timed out.\r
//getcurrentsystemnameserver returns the nameserver the app should use and sets\r
//id to the id of that nameserver. id should later be used to report how laggy\r
//the servers response was and if it was timed out.\r
arr:array[0..sizeof(packet)-1] of byte absolute packet;\r
begin\r
{ writeln('buildrequest: name: ',name);}\r
arr:array[0..sizeof(packet)-1] of byte absolute packet;\r
begin\r
{ writeln('buildrequest: name: ',name);}\r
-function decodename(const packet:tdnspacket;len,start,recursion:integer;var numread:integer):string;\r
+function decodename(const packet:tdnspacket;len,start,recursion:integer;var numread:integer):ansistring;\r
begin\r
setstate_request_init(name,state);\r
state.forwardfamily := family;\r
begin\r
setstate_request_init(name,state);\r
state.forwardfamily := family;\r
begin\r
setstate_request_init(name,state);\r
state.requesttype := requesttype;\r
begin\r
setstate_request_init(name,state);\r
state.requesttype := requesttype;\r
- HostName : array[0..MAX_HOSTNAME_LEN-1] of char;\r
- DomainName : array[0..MAX_DOMAIN_NAME_LEN-1] of char;\r
+ HostName : array[0..MAX_HOSTNAME_LEN-1] of ansichar;\r
+ DomainName : array[0..MAX_DOMAIN_NAME_LEN-1] of ansichar;\r