AF_LOCAL support in getnameinfo

Florian Weimer fweimer@redhat.com
Wed Mar 9 18:50:00 GMT 2016


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.

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



More information about the Libc-alpha mailing list