Date: Wed, 8 Aug 2001 19:12:42 +0300 From: Ruslan Ermilov <ru@FreeBSD.org> To: Jim Pirzyk <Jim.Pirzyk@disney.com> Cc: Sheldon Hearn <sheldonh@starjuice.net>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/lib/libc/net gethostbyname.3 Message-ID: <20010808191242.C10516@sunbay.com> In-Reply-To: <01080808322800.22597@snoopy>; from Jim.Pirzyk@disney.com on Wed, Aug 08, 2001 at 08:32:28AM -0700 References: <55998.997269012@axl.seasidesoftware.co.za> <01080808322800.22597@snoopy>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010808191242.C10516>