From owner-freebsd-net Sun Oct 29 0:54:25 2000 Delivered-To: freebsd-net@freebsd.org Received: from coconut.itojun.org (coconut.itojun.org [210.160.95.97]) by hub.freebsd.org (Postfix) with ESMTP id 6520437B479 for ; Sun, 29 Oct 2000 00:54:22 -0700 (PDT) Received: from kiwi.itojun.org (localhost.itojun.org [127.0.0.1]) by coconut.itojun.org (8.9.3+3.2W/3.7W) with ESMTP id QAA25906; Sun, 29 Oct 2000 16:54:07 +0900 (JST) To: "Jacques A. Vidrine" Cc: freebsd-net@freebsd.org In-reply-to: n's message of Sat, 28 Oct 2000 16:39:10 EST. <20001028163909.A77420@hamlet.nectar.com> X-Template-Reply-To: itojun@itojun.org X-Template-Return-Receipt-To: itojun@itojun.org X-PGP-Fingerprint: F8 24 B4 2C 8C 98 57 FD 90 5F B4 60 79 54 16 E2 Subject: Re: getaddrinfo and the UNIX domain From: itojun@iijlab.net Date: Sun, 29 Oct 2000 16:54:07 +0900 Message-ID: <25904.972806047@coconut.itojun.org> Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >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