Re: gethostbyname(my_name) and IL2-Sturmovik

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Ok, I've just checked doing the same thing under windows.
> 
> The test(ripdaveno is the name of the Computer I tested on):
> 
> {
> ...
> hostent* h = gethostbyname("ripdaveno"); 
> char* str = inet_ntoa(*((in_addr*)h->h_addr_list[0]));
> ...
> }
> 
> The string in str was "192.168.2.75" which is my Network IP-Adress.  With 
> wine(under Linux), as far as I've tested it, exactly the same code always 
> generates "127.0.0.1".
> 
> Since Wine tries to simulate Windows as exactly as possible, this is wrong. 
> So, in my opinion this Patch is necessary. :-)
Hi!
  It's strange but there is no patch in this mail I can look at...
  However, even more strange is that wine returns localhost address to you...
Why ? I just tested Your testing code (just slightly modified to get it to
compile) on both plain linux as well as in wine and in both cases it returns my
real public IP. Isn't your Linux networking setup (/etc/hosts table) a bit
wrong ? My one contains (arcus is my machine name)

127.0.0.1	localhost
195.39.17.7	arcus.sinus.cz arcus

  I have already seen broken setups containing things like

127.0.0.1	localhost arcus

  which is of course wrong.
  
                         Regards, Pavel Troller

_______________________________________________
wine-users mailing list
wine-users@xxxxxxxxxx
http://www.winehq.org/mailman/listinfo/wine-users

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux