Subject: Re: getaddrinfo() and PF_LOCAL
To: Stig Venaas <Stig.Venaas@uninett.no>
From: Assar Westerlund <email@example.com>
Date: 08/01/2001 13:51:21
Stig Venaas <Stig.Venaas@uninett.no> writes:
> It looks like getaddrinfo() doesn't support PF_LOCAL, are there any plans
> to implement it, or would you welcome a patch? As I understand the
> OpenGroup's latest Base Spec draft, getaddrinfo() should support all
> supported families.
Having getaddrinfo() return addresses for PF_LOCAL with
hints->ai_family == PF_UNSPEC (and especially with AI_PASSIVE) seems
like a bad idea to me.
Having it work for ai_family == PF_LOCAL might be good.
> Currently though the only implementations I've seen are by Craig
> Metz and Richard Stevens. The former is currently used in glibc.
Note that glibc just disabled the PF_LOCAL support in getaddrinfo (see
That getaddrinfo() would give you PF_LOCAL /tmp/4711 for AI_PASSIVE
NULL, 4711, without removing it, which means that repeating it you
would get EADDRINUSE. Bad idea.