Date: Sun, 15 Sep 2002 14:14:22 +0300 From: Valentin Nechayev <netch@iv.nn.kiev.ua> To: Terry Lambert <tlambert2@mindspring.com> Cc: Jev <jev@ecad.org>, hackers@FreeBSD.ORG Subject: Re: gethostbyname_r() fbsd equiv? Message-ID: <20020915111422.GA1077@iv.nn.kiev.ua> In-Reply-To: <3D820DD0.985F9C66@mindspring.com> References: <20020913145830.GB41842@ecad.org> <3D820700.DB53B0F9@mindspring.com> <20020913160214.GB42538@ecad.org> <3D820DD0.985F9C66@mindspring.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Fri, Sep 13, 2002 at 09:09:52, tlambert2 (Terry Lambert) wrote about "Re: gethostbyname_r() fbsd equiv?": >> The "real" gethostbyname_r() that takes 3 params is what the code Im >> attempting to port uses. As I implied earlier, my C competence is far >> below par, so for me to write this code would be far for trivial for >> _me_ :) TL> This is the HP/UX or AIX version of the interface. SUSv3 doesn't know any gethostbyname_r. One can select either HP-UX/AIX or Solaris/Linux version of interface, but the more correct way is possibly to inplement getaddrinfo() in thread-safe way. getaddrinfo() is known even for Microsoft (latest versions). For now I can't understand why thread-safe resolver from BIND >= 8.2 wasn't imported. For applications where it is nesessary (e.g. milter filter with extended checking of sender validity), we had to compile libbind and link it in non-natural way.;( getaddrinfo/getnameinfo can be rewritten for thread-safe resolver mechanically, without advanced thinking. P.S. BIND source has version of gethostbyaddr_r and only it should be named as canonical. /netch To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020915111422.GA1077>