Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Oct 2000 16:54:07 +0900
From:      itojun@iijlab.net
To:        "Jacques A. Vidrine" <n@nectar.com>
Cc:        freebsd-net@freebsd.org
Subject:   Re: getaddrinfo and the UNIX domain
Message-ID:  <25904.972806047@coconut.itojun.org>
In-Reply-To: n's message of Sat, 28 Oct 2000 16:39:10 EST. <20001028163909.A77420@hamlet.nectar.com>

next in thread | previous in thread | raw e-mail | index | archive | help

>Calling getaddrinfo like the following:
>        memset(&hints, 0, sizeof(hints));
>        hints.ai_flags    = AI_PASSIVE;
>        hints.ai_family   = PF_UNSPEC;
>        hints.ai_socktype = SOCK_STREAM;
>        getaddrinfo(NULL, "/tmp/some-socket", &hints, &res);
>will result in `servname not supported for ai_socktype'.
>How should this work?
>OpenLDAP 2.x uses getaddrinfo in this fashion.
>I note that calling getaddrinfo with ai_family = PF_UNIX also fails.

	NRL getaddrinfo supports PF_UNIX (= PF_LOCAL) family.  as NRL
	getaddrinfo is in linux distributions, i belive openldap guys are
	assuming that linux behavior is correct.

	from standardization standpoint, all documents are silent about which
	address family are mandatory to be supported.  as getaddrinfo is an
	"address family independent service address/name lookup" function, one
	can claim that everything has to be supported.  however, we have some
	limit in supports.  for example, if we try to support PF_UNIX, it is
	not very compatible with current definition of getaddrinfo flags (like
	NI_NUMERICSERV).  i don't think we can convert /tmp/some-socket into
	some numeric.

	how critical is it for openldap?

itojun


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?25904.972806047>