Subject: lib/28667: no description about the case gethostbyname(3) takes an IP address
To: None <lib-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: Ryo HAYASAKA <ryoh@jaist.ac.jp>
List: netbsd-bugs
Date: 12/15/2004 13:48:00
>Number:         28667
>Category:       lib
>Synopsis:       no description about the case gethostbyname(3) takes IP address
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    lib-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 15 13:48:00 +0000 2004
>Originator:     Ryo HAYASAKA
>Release:        NetBSD 2.99.11
>Organization:
Japan Advanced Institute of Science and Technology (JAIST)
>Environment:
System: NetBSD bonnie.jaist.ac.jp 2.99.11 NetBSD 2.99.11 (BONNIE) #528: Tue Dec 14 06:14:53 JST 2004 ryoh@bonnie.jaist.ac.jp:/sys/arch/i386/compile/BONNIE i386
Architecture: i386
Machine: i386
>Description:
The man page of gethostbyname(3) does not contain a description of the
case that gethostbyname takes IPv4 or IPv6 address, not a host name.

Linux (Fedora Core release 2) has the following description:

       The gethostbyname() function returns a structure of type  hostent  for
       the  given  host  name.   Here  name is either a host name, or an IPv4
       address in standard dot notation, or an IPv6  address  in  colon  (and
       possibly  dot)  notation.  (See  RFC  1884 for the description of IPv6
       addresses.)  If name is an IPv4 or IPv6 address,  no  lookup  is  per-
       formed  and  gethostbyname()  simply copies name into the h_name field
       and its struct in_addr equivalent into the h_addr_list[0] field of the
       returned  hostent  structure.
	
>How-To-Repeat:
man gethostbyname
	
>Fix:
Describe it.