X-Git-Url: http://www.lcore.org/git/lcore.git/blobdiff_plain/0ac6b47e810e6efaebcdbf3075b633e9b4109341..d63fdd677fc6ab221d92999630627bd1a0b8afd4:/dnssync.pas diff --git a/dnssync.pas b/dnssync.pas old mode 100755 new mode 100644 index d75f54e..7d6631c --- a/dnssync.pas +++ b/dnssync.pas @@ -26,7 +26,7 @@ interface fd_utils, {$endif} lcorernd, - sysutils, + sysutils, ltimevalstuff; //convert a name to an IP @@ -34,17 +34,17 @@ interface //on error the binip will have a family of 0 (other fiels are also currently //zeroed out but may be used for further error information in future) //timeout is in miliseconds, it is ignored when using windows dns -function forwardlookup(name:string;timeout:integer):tbinip; +function forwardlookup(name:ansistring;timeout:integer):tbinip; //convert a name to a list of all IP's returned //this returns both v4 and v6 IP's, or possibly only v4 or v6, depending on settings //on error, returns an empty list -function forwardlookuplist(name:string;timeout:integer):tbiniplist; +function forwardlookuplist(name:ansistring;timeout:integer):tbiniplist; //convert an IP to a name, on error a null string will be returned, other //details as above -function reverselookup(ip:tbinip;timeout:integer):string; +function reverselookup(ip:tbinip;timeout:integer):ansistring; @@ -110,8 +110,8 @@ end; function sendquery(socknum:integer;const packet:tdnspacket;len:integer):boolean; var a:integer; - addr : string; - port : string; + addr : ansistring; + port : ansistring; inaddr : TInetSockAddrV; begin { writeln('sendquery ',decodename(state.packet,state.packetlen,12,0,a),' ',state.requesttype);} @@ -138,7 +138,7 @@ var inAddrtemp : TInetSockAddrV; a:integer; biniptemp:tbinip; - addr:string; + addr:ansistring; begin //init both sockets smultaneously, always, so they get succesive fd's if fd[0] > 0 then exit; @@ -188,7 +188,7 @@ var Srcx : {$ifdef win32}sockaddr_in{$else}TInetSockAddrV{$endif} absolute Src; SrcLen : Integer; fromip:tbinip; - fromport:string; + fromport:ansistring; begin if timeout < mintimeout then timeout := defaulttimeout; @@ -296,7 +296,7 @@ end; -function forwardlookuplist(name:string;timeout:integer):tbiniplist; +function forwardlookuplist(name:ansistring;timeout:integer):tbiniplist; var dummy : integer; a,b:integer; @@ -367,7 +367,7 @@ begin end; end; -function forwardlookup(name:string;timeout:integer):tbinip; +function forwardlookup(name:ansistring;timeout:integer):tbinip; var listtemp:tbiniplist; begin @@ -375,7 +375,7 @@ begin result := biniplist_get(listtemp,0); end; -function reverselookup(ip:tbinip;timeout:integer):string; +function reverselookup(ip:tbinip;timeout:integer):ansistring; var dummy : integer; begin