Subject: Re: gethostbyname & gethostbyaddr in libc thread-safe yet?
To: Christos Zoulas <christos@zoulas.com>
From: Alicia da Conceicao <alicia@engine.ca>
List: tech-net
Date: 05/26/2004 12:50:17
> | When I have time, I will likely end up coding my own cross-platform, thread-
> | safe DNS resolver client library from scratch, or if I am lazy, I will just
> | rip out the tiny DNS resolver client from uClibc.

Hi Christos:

Actually I am only using the "getaddrinfo" & "getnameinfo" routines,
and don't use any YP (Yellow Pages) or PWD entries directly in my
code.  (There may be indirect YP code embedded within libc, that I
may be calling indirectly when I use the "getaddrinfo" & "getnameinfo"
routines, but that is a different story.)

I only need to resolve text strings containing domain names into IPv4
IP addresses, and reverse lookup IPv4 addresses into text strings
containing domain names.  Just fully qualified DNS stuff, no YP, no PWD,
etc.

> I you using YP? If you are not, you should be ok. If you are, drop me a note
> and I will fix it.

If I only do DNS resolving with "getaddrinfo" & "getnameinfo", would they
be thread-safe in NetBSD-current, in that no one thread can block, clobber,
or corrupt the data of another thread when they are both resolving DNS?
Again, I am not using any YP or PWD directly in my code.

Thanks in advance.
Alicia.