gethostbyname(my_name) and IL2-Sturmovik
juan_lang at yahoo.com
Tue Dec 13 13:14:59 CST 2005
> And on the other side, try to query a DNS server for "localhost".
> Every DNS server should immediately return 127.0.0.1, it's RFC
> compliance requirement.
Just to be clear, we're not talking about gethostbyname("localhost").
We're talking about gethostbyname(the_name_of_my_machine). In Windows,
this returns your external address. See the following sample code which
On Linux, at least for me, I get only 127.0.0.1 for my hostname (juandell,
when I'm running on this laptop.) If I were to have this name registered
with DNS, and if I were to ask a DNS server for the address of it, I
wouldn't get 127.0.0.1, of course.
But we're not talking about DNS anyway. We're talking about winsock's
gethostbyname function. Wine's implementation isn't correct, since it
doesn't match Windows. I still think David's patch could use some work,
but let's not argue about whether its behaviour is correct: matching
Windows is what we're obliged to do.
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
More information about the wine-devel