//on error the binip will have a family of 0 (other fiels are also currently\r
//zeroed out but may be used for further error information in future)\r
//timeout is in miliseconds, it is ignored when using windows dns\r
-function forwardlookup(name:string;timeout:integer):tbinip;\r
+function forwardlookup(name:ansistring;timeout:integer):tbinip;\r
\r
//convert a name to a list of all IP's returned\r
//this returns both v4 and v6 IP's, or possibly only v4 or v6, depending on settings\r
//on error, returns an empty list\r
-function forwardlookuplist(name:string;timeout:integer):tbiniplist;\r
+function forwardlookuplist(name:ansistring;timeout:integer):tbiniplist;\r
\r
\r
//convert an IP to a name, on error a null string will be returned, other\r
//details as above\r
-function reverselookup(ip:tbinip;timeout:integer):string;\r
+function reverselookup(ip:tbinip;timeout:integer):ansistring;\r
\r
\r
\r
\r
{$i unixstuff.inc}\r
\r
+\r
+{$ifdef syncdnscore}\r
var\r
numsockused:integer;\r
fd:array[0..numsock-1] of integer;\r
state:array[0..numsock-1] of tdnsstate;\r
toaddr:array[0..numsock-1] of tbinip;\r
\r
-{$ifdef syncdnscore}\r
-\r
{$ifdef win32}\r
const\r
winsocket = 'wsock32.dll';\r
\r
function sendquery(socknum:integer;const packet:tdnspacket;len:integer):boolean;\r
var\r
- a:integer;\r
- addr : string;\r
- port : string;\r
+ addr : ansistring;\r
+ port : ansistring;\r
inaddr : TInetSockAddrV;\r
begin\r
{ writeln('sendquery ',decodename(state.packet,state.packetlen,12,0,a),' ',state.requesttype);}\r
inAddrtemp : TInetSockAddrV;\r
a:integer;\r
biniptemp:tbinip;\r
- addr:string;\r
+ addr:ansistring;\r
begin\r
//init both sockets smultaneously, always, so they get succesive fd's\r
if fd[0] > 0 then exit;\r
currenttime : integer;\r
\r
lag : ttimeval;\r
- currenttimeout : ttimeval;\r
selecttimeout : ttimeval;\r
socknum:integer;\r
needprocessing:array[0..numsock-1] of boolean;\r
Srcx : {$ifdef win32}sockaddr_in{$else}TInetSockAddrV{$endif} absolute Src;\r
SrcLen : Integer;\r
fromip:tbinip;\r
- fromport:string;\r
+ fromport:ansistring;\r
\r
begin\r
if timeout < mintimeout then timeout := defaulttimeout;\r
\r
\r
\r
-function forwardlookuplist(name:string;timeout:integer):tbiniplist;\r
+function forwardlookuplist(name:ansistring;timeout:integer):tbiniplist;\r
var\r
dummy : integer;\r
- a,b:integer;\r
+ a:integer;\r
biniptemp:tbinip;\r
l:tbiniplist;\r
begin\r
end;\r
end;\r
\r
-function forwardlookup(name:string;timeout:integer):tbinip;\r
+function forwardlookup(name:ansistring;timeout:integer):tbinip;\r
var\r
listtemp:tbiniplist;\r
begin\r
result := biniplist_get(listtemp,0);\r
end;\r
\r
-function reverselookup(ip:tbinip;timeout:integer):string;\r
+function reverselookup(ip:tbinip;timeout:integer):ansistring;\r
var\r
dummy : integer;\r
begin\r