\r
//convert a name to an IP\r
//will return v4 or v6 depending on what seems favorable, or manual preference setting\r
\r
//convert a name to an IP\r
//will return v4 or v6 depending on what seems favorable, or manual preference setting\r
function forwardlookup(name:ansistring;timeout:integer):tbinip;\r
\r
//convert a name to a list of all IP's returned\r
function forwardlookup(name:ansistring;timeout:integer):tbinip;\r
\r
//convert a name to a list of all IP's returned\r
b := 0;\r
for socknum := numsockused-1 downto 0 do if fd[socknum] > b then b := fd[socknum];\r
selectresult := select(b+1,@fds,nil,nil,@selecttimeout);\r
b := 0;\r
for socknum := numsockused-1 downto 0 do if fd[socknum] > b then b := fd[socknum];\r
selectresult := select(b+1,@fds,nil,nil,@selecttimeout);\r
if (useaf = useaf_v4) then a := af_inet else if (useaf = useaf_v6) then a := af_inet6 else a := 0;\r
result := winforwardlookuplist(name,a,dummy);\r
{$ifdef ipv6}\r
if (useaf = useaf_v4) then a := af_inet else if (useaf = useaf_v6) then a := af_inet6 else a := 0;\r
result := winforwardlookuplist(name,a,dummy);\r
{$ifdef ipv6}\r