Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 09 Aug 2000 14:36:40 EDT
From:      "Greg Thompson" <johnnyteardrop@hotmail.com>
To:        crandall@matchlogic.com
Cc:        freebsd-hackers@FreeBSD.ORG, freebsd-net@FreeBSD.ORG
Subject:   RE: threadsafe name resolution
Message-ID:  <F39VkR7CBRnarL6ypUL000031b0@hotmail.com>

next in thread | raw e-mail | index | archive | help
>From: Charles Randall <crandall@matchlogic.com>
>
>Is there a reason that ADNS won't work for this?
>
>http://www.chiark.greenend.org.uk/~ian/adns/

in addition to the other reasons mentioned, it won't work for me because 
it's not a part of the os.  as an application developer, i'd expect the 
basic services to work without me having to grab random packages to solve 
already solved problems.

someone else pointed out that the old gethostbyname/addr pair isn't 
threadsafe.  i realize this.  what i was suggesting is that someone could 
perhaps implement gethostbyname_r and gethostbyaddr_r.  call these a hack if 
you will, but they solve the problem just fine on other platforms.

as long as nothing other than getipnodebyname and byaddr share resources 
with those two, i'm safe if i just throw a mutex around my calls to 
byname/addr.  unfortuantely, this solution gets the "big suck" rating.  if 
the operating system ships with mechanisms that are documented as being 
thread-safe, they should be.  if they're not, it should be clearly stated in 
a bug report somewhere that this is the case.  i have submitted a bug with 
KAME.  i hope they fix it soon.  in the meantime, it'd be nice if freebsd 
had an alternative.

________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F39VkR7CBRnarL6ypUL000031b0>