Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 01 Jun 2002 14:48:38 -0700
From:      Terry Lambert <tlambert2@mindspring.com>
To:        Dag-Erling Smorgrav <des@ofug.org>
Cc:        Peter Haight <peterh@sapros.com>, hackers@freebsd.org
Subject:   Re: Is gethostbyname2() reentrant?
Message-ID:  <3CF94136.93E2E568@mindspring.com>
References:  <200205312050.g4VKofvj057191@wartch.sapros.com> <xzpznye6g8q.fsf@flood.ping.uio.no>

next in thread | previous in thread | raw e-mail | index | archive | help
Dag-Erling Smorgrav wrote:
> Peter Haight <peterh@sapros.com> writes:
> > If I link with libc_r can I use gethostbyname2() at the same time in two
> > different threads?
> 
> Use getaddrinfo() instead.

You can't unambiguously treat IP addresses (rather than domain names)
preferentially and correctly with getaddrinfo().  It would work, but
you would lose a common functionality for certain name translations
that things like Akami's content rewrite depend upon.

Personally, I think Akamai's approach is bogus (e.g. all EarthLink
customers appear to be colocated with their DNS forwarders on the
East coast, regardless of their real location on the network), and
would not be sad to see it broken, but there are probably other
people who would object to that... ;^).

-- Terry

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?3CF94136.93E2E568>