> The problem is that the boolean IsNewApi in ssWin32 is set to True if the
> three IPv6-specific functions (getaddrinfo, freeaddrinfo and getnameinfo)
> are found in 'ws2_32.dll' . However, the fact that these functions are
> found
> does not reflect if Ipv6 support has been enabled.
Sorry, but I may have got this all wrong.
What if this is NOT the problem afterall, and the above behaviour is
correct, ie calling the new functions even if Ipv6 support is not enabled.
In that case, should we test the results of ResolveIPToName and ResolveName?
Here are the results of the function calls with Ipv6 enabled and disabled:
In my /etc/hosts file:
fec0::fa3:2aa:ff:fe9f:2a40 webv6.central.example.com
Ipv6 enabled
ResolveIPToName('fec0::fa3:2aa:ff:fe9f:2a40') >
webv6.central.example.com
ResolveName('webv6.central.example.com') >
fec0::fa3:2aa:ff:fe9f:2a40
Ipv6 disabled
ResolveIPToName('fec0::fa3:2aa:ff:fe9f:2a40') > LocalName (ie
computer name)
ResolveName('webv6.central.example.com') > 0.0.0.0
The ResolveIPToName Help says "If IP not have domain name, then is returned
original IP" which does not happen. I think this is caused by the if
statement in the function:
function TBlockSocket.ResolveIPToName(IP: string): string;
begin
if not IsIP(IP) or not IsIp6(IP) then
IP := ResolveName(IP);
Result := synsock.ResolveIPToName(IP, FamilyToAF(FFamily),
GetSocketProtocol, GetSocketType);
end;
Perhaps this should be
if not IsIP(IP) AND not IsIp6(IP) then
which would stop ResolveName(IP) being called, which it is at the moment
because an Ipv6 address fails the first test (IsIP). With the above
modification the original IP address is returned on failure, as per the
Help.
ResolveName returns cAnyHost (0.0.0.0) when getaddrinfo has failed with
WSAHOST_NOT_FOUND, so this explains why the 'fec0::fa3:2aa:ff:fe9f:2a40'
ends up as LocalName and 'webv6.central.example.com' resolves to 0.0.0.0.
Incidentally, why does it do this? So should we test for 0.0.0.0 (Ip4
address) to discover a ResolveName Ip6 failure?
Regards
John Stevenson
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
synalist-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synalist-public