[Top][All Lists]

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

[Pnet-developers] [bugs #12168>] Cannot retreive the local hostname

From: Carl-Adam Brengesjo
Subject: [Pnet-developers] [bugs #12168>] Cannot retreive the local hostname
Date: Sun, 6 Mar 2005 22:07:23 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; sv-SE; rv:1.7.6) Gecko/20050226 Firefox/1.0.1

Update of bugs #12168> (project dotgnu-pnet):

                  Status:                    None => Invalid                
             Open/Closed:                    Open => Closed                 


Follow-up Comment #7:

Ah, now I understand what you're trying to do.

It's not a bug in pnet, but a configuration error by you.

"The domain name queries carried out by gethostbyname() and gethostbyaddr()
use a combination of any or all of the name server named(8), a broken out
line from /etc/hosts, and the Network Information Service (NIS or YP),
depending upon the contents of the order line in /etc/host.conf." -
gethostbyname(3), man page.

You see, even if the hostname is set to a certain value, you either need a
name server to resolve the name to an address, or if you have defined the
name in /etc/hosts to be able to actually resolve the name. It can't
magically be resolved unless something specifies the address for the name.

address@hidden:~$ cat /etc/hosts               localhost.localdomain   localhost
address@hidden:~$ ping bar
ping: unkown host bar
address@hidden:/home/ptah# echo localhost.localdomain bar >>
address@hidden:~$ ping bar
PING localhost.localdomain ( 56(84) bytes of data.
64 bytes from localhost.localdomain ( icmp_seq=1 ttl=64
time=0.443 ms

Don't think I can be clearer than that...
This bug is bogus, closed Sunday, 6 March.


This item URL is:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]