This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: AF_LOCAL support in getnameinfo
- From: Florian Weimer <fweimer at redhat dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Date: Thu, 10 Mar 2016 14:15:26 +0100
- Subject: Re: AF_LOCAL support in getnameinfo
- Authentication-results: sourceware.org; auth=none
- References: <56E04A68 dot 8030600 at redhat dot com> <mvma8m7oc37 dot fsf at hawking dot suse dot de> <56E07068 dot 8060001 at redhat dot com>
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