From owner-freebsd-net Sat Oct 28 20: 8:14 2000 Delivered-To: freebsd-net@freebsd.org Received: from shuttle.wide.toshiba.co.jp (shuttle.wide.toshiba.co.jp [202.249.10.124]) by hub.freebsd.org (Postfix) with ESMTP id 033B237B4C5 for ; Sat, 28 Oct 2000 20:08:12 -0700 (PDT) Received: from localhost ([3ffe:501:100f:13ff::e]) by shuttle.wide.toshiba.co.jp (8.9.1+3.1W/8.9.1) with ESMTP id LAA10297; Sun, 29 Oct 2000 11:53:09 +0900 (JST) Date: Sun, 29 Oct 2000 12:07:35 +0900 Message-ID: From: JINMEI Tatuya / =?ISO-2022-JP?B?GyRCP0BMQEMjOkgbKEI=?= To: "Jacques A. Vidrine" Cc: freebsd-net@FreeBSD.ORG Subject: Re: getaddrinfo and the UNIX domain In-Reply-To: In your message of "Sat, 28 Oct 2000 16:39:10 -0500" <20001028163909.A77420@hamlet.nectar.com> References: <20001028163909.A77420@hamlet.nectar.com> User-Agent: Wanderlust/2.3.0 (Roam) Emacs/20.7 Mule/4.0 (HANANOEN) Organization: Research & Development Center, Toshiba Corp., Kawasaki, Japan. MIME-Version: 1.0 (generated by SEMI 1.13.7 - "Awazu") Content-Type: text/plain; charset=US-ASCII X-Dispatcher: imput version 980905(IM100) Lines: 35 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >>>>> On Sat, 28 Oct 2000 16:39:10 -0500, >>>>> "Jacques A. Vidrine" said: > 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. As far as I know, current implementation of getaddrinfo() supports PF_INET and PF_INET6 only. I'm not 100% sure about the situation of the latest FreeBSD implemenation, but this is the case at least for the latest one of KAME's implementation (on which FreeBSD one is based). By the way, in my understanding, if getaddrinfo supported PF_UNIX, it would take the filename as its 1st argument: getaddrinfo("/tmp/some-socket", NULL, &hints, &res); JINMEI, Tatuya Communication Platform Lab. Corporate R&D Center, Toshiba Corp. jinmei@isl.rdc.toshiba.co.jp To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message