gethostbyname() and localhost
Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance
If I call gethostbyname with a parameter of "localhost" I see:
Name= qawin2k
Aliases=
Addrtype= 2
Length= 4
Address=127.0.0.1
On every Unix system I've tried I see:
Name= localhost
Aliases=
Addrtype= 2
Length= 4
Address=127.0.0.1
Any way I can get the Unix behaviour, i.e. name=localhost?
Thanks,
Steve.
.
Relevant Pages
- Re: Dumb??? Dept.: host alias listings?
... how do I remove/edit the host alias lists from my ... What I could see was a comparatively long-ish list of aliases that I ... software that's added certain domains to localhost aliases. ... (Ubuntu) - Re: Two Different Formats for hosts File?
... >>I can find two descriptions on the web for the hosts file that appear to be ... >>127.0.0.1 localhost ... So you're saying that if the FQDN appears, then the aliases follow it, and if there ... (comp.os.linux.networking) - Re: /etc/hosts
... >>hostnames, or generic hostnames. ... >>The man page specifically lists localhost as a candidate for an alias. ... >>Many systems do use aliases on the 127.0.0.1 address for names like ... convention the address 127.0.0.1 is assigned to the loopback interface. ... (comp.os.linux.networking) - Re: /etc/hosts
... >> loopback is desired for some other name, it can be done with any ... >hostnames, or generic hostnames. ... >The man page specifically lists localhost as a candidate for an alias. ... >Many systems do use aliases on the 127.0.0.1 address for names like ... (comp.os.linux.networking) |
|