This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: AF_LOCAL support in getnameinfo


On 03/09/2016 07:50 PM, Florian Weimer wrote:
> On 03/09/2016 05:22 PM, Andreas Schwab wrote:
>> Florian Weimer <fweimer@redhat.com> writes:
>>
>>> I'm leaning towards removal of the AF_LOCAL support from getnameinfo.
>>
>> What are the BSDs doing?
> 
> FreeBSD: Return sun_path in the host name, service is empty.
> NetBSD: Likewise.
> OpenSD: Returns EAI_SYSTEM with errno == EINVAL, or EAI_FAMILY.

I for got to mention: They also support the reverse conversion in
getaddrinfo (with AF_LOCAL).  This makes this functionality marginally
more useful.

> Based on product documentation:
> 
> MacOS: AF_LOCAL is not supported.
> Solaris: AF_LOCAL is not supported.
> 
> So our current approach (sun_path in the service field) is not
> compatible with anything else.
> 
> Putting sun_path into the host field makes more sense because it is
> larger.  (Our NI_MAXSERV is just 32, and NI_MAXHOST is 1025.)
> 
> Florian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]