From owner-cvs-all Wed Aug 8 9:13:56 2001 Delivered-To: cvs-all@freebsd.org Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by hub.freebsd.org (Postfix) with ESMTP id 9BFB037B41A; Wed, 8 Aug 2001 09:13:32 -0700 (PDT) (envelope-from ru@whale.sunbay.crimea.ua) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.11.2/8.11.2) id f78GCg215884; Wed, 8 Aug 2001 19:12:42 +0300 (EEST) (envelope-from ru) Date: Wed, 8 Aug 2001 19:12:42 +0300 From: Ruslan Ermilov To: Jim Pirzyk Cc: Sheldon Hearn , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/lib/libc/net gethostbyname.3 Message-ID: <20010808191242.C10516@sunbay.com> Mail-Followup-To: Jim Pirzyk , Sheldon Hearn , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org References: <55998.997269012@axl.seasidesoftware.co.za> <01080808322800.22597@snoopy> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <01080808322800.22597@snoopy>; from Jim.Pirzyk@disney.com on Wed, Aug 08, 2001 at 08:32:28AM -0700 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, Aug 08, 2001 at 08:32:28AM -0700, Jim Pirzyk wrote: > On Wednesday 08 August 2001 04:10 am, Sheldon Hearn wrote: > > On Wed, 08 Aug 2001 04:05:47 MST, Ruslan Ermilov wrote: > > > Modified files: > > > lib/libc/net gethostbyname.3 > > > Log: > > > Urge the reader to start using getaddrinfo(3) and getnameinfo(3) > > > protocol-independant functions that don't use static memory area. > > > > And which _rock_! > > Err, not quite. They do not use the DNS sortlist functionallity, > nor do they check to see what subnet the host and remote host > has in common to use that address first. > This would be the #1 reason I would not use them. See PR bin/27939. > This is the implementation bug that should ideally be fixed. But this does not mean that this interface is bad, because DNS is one of the possible back ends, and the latest POSIX draft says: : The gethostbyaddr() and gethostbyname() functions may return pointers : to static data, which may be overwritten by subsequent calls to any of : these functions. The getaddrinfo() and getnameinfo() functions are : preferred over the gethostbyaddr() and gethostbyname() functions. And later on: : The gethostbyaddr() and gethostbyname() functions may be withdrawn in : a future version. Cheers, -- Ruslan Ermilov Oracle Developer/DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message