in reply to Re^5: gethostbyname returns reverse order of ipaddress expected
in thread gethostbyname returns reverse order of ipaddress expected

You are right. .NET gethostbyname actually calls getaddrinfo in some cases. getaddrinfo returns the addresses in "correct" order which gethostbyname does not on Windows. Hence the discrepancy. tried a native app which calls both and confirmed the difference. Thanks everyone.
  • Comment on Re^6: gethostbyname returns reverse order of ipaddress expected