From owner-freebsd-doc Fri Jan 5 13:20: 6 2001 From owner-freebsd-doc@FreeBSD.ORG Fri Jan 5 13:20:02 2001 Return-Path: Delivered-To: freebsd-doc@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 8D0FD37B400 for ; Fri, 5 Jan 2001 13:20:02 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f05LK2x76018; Fri, 5 Jan 2001 13:20:02 -0800 (PST) (envelope-from gnats) Date: Fri, 5 Jan 2001 13:20:02 -0800 (PST) Message-Id: <200101052120.f05LK2x76018@freefall.freebsd.org> To: freebsd-doc@freebsd.org Cc: From: Andrew Arensburger Subject: Re: docs/23823: gethostbyname2 man page is inaccurate Reply-To: Andrew Arensburger Sender: gnats@FreeBSD.org Sender: owner-freebsd-doc@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR docs/23823; it has been noted by GNATS. From: Andrew Arensburger To: Alexander Langer Cc: , Subject: Re: docs/23823: gethostbyname2 man page is inaccurate Date: Fri, 5 Jan 2001 16:01:07 -0500 (EST) On Fri, 5 Jan 2001, Alexander Langer wrote: > Uhm - I'm just curious: > > What has _NIS_ to do with DNS issues???? Nothing directly. The gethost*() functions get the host information from either /etc/hosts, NIS, or DNS, as specified in /etc/host.conf . gethostbyname() is the classic "get host information" function, but it only handles IPv4 (AF_INET). gethostbyname2() is more generic and can handle IPv6 (AF_INET6). gethostbyname2("myhost.dom.ain", AF_INET6) works quite well for /etc/hosts and DNS. The only case in which it doesn't work, as far as I can tell, is with NIS. I don't know whether this is a limitation of NIS itself, or just FreeBSD's implementation of it. At any rate, the man page for gethostbyname2() implies that only AF_INET works. This doesn't appear to be true. -- Andrew Arensburger This message *does* represent the arensb@ooblick.com views of ooblick.com ACK and you shall receive. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message