From owner-freebsd-doc@FreeBSD.ORG Thu May 17 09:50:08 2007 Return-Path: X-Original-To: freebsd-doc@hub.freebsd.org Delivered-To: freebsd-doc@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 853E416A401 for ; Thu, 17 May 2007 09:50:08 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id 74DE513C468 for ; Thu, 17 May 2007 09:50:08 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l4H9o8Y2015421 for ; Thu, 17 May 2007 09:50:08 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l4H9o8BC015417; Thu, 17 May 2007 09:50:08 GMT (envelope-from gnats) Date: Thu, 17 May 2007 09:50:08 GMT Message-Id: <200705170950.l4H9o8BC015417@freefall.freebsd.org> To: freebsd-doc@FreeBSD.org From: Jeroen Ruigrok van der Werven Cc: Subject: Re: docs/78357: getaddrinfo(3)'s AI_ADDRCONFIG not documented X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Jeroen Ruigrok van der Werven List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2007 09:50:08 -0000 The following reply was made to PR docs/78357; it has been noted by GNATS. From: Jeroen Ruigrok van der Werven To: bug-followup@FreeBSD.org Cc: Subject: Re: docs/78357: getaddrinfo(3)'s AI_ADDRCONFIG not documented Date: Thu, 17 May 2007 11:47:37 +0200 --OwLcNYc0lM97+oe1 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit Attached a patch to document the missing ai_flags. I verified this against the current code in CURRENT and it seems to match up. Updated the standards section to point to POSIX.1:2004. For the text of the added AI_* ai_flags I used the standards' text, adjusted in some places to fit the use of the current text (bit instead of flag). The manual page needs more work, but this is a start at least. Please prefix [patch] for the PR's synopsis. -- Jeroen Ruigrok van der Werven / asmodai イェルーン ラウフロック ヴァン デル ウェルヴェン http://www.in-nomine.org/ | http://www.rangaku.org/ The Wheels of Life, they turn, ..., without me... --OwLcNYc0lM97+oe1 Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="libc-net-getaddrinfo.3.diff" Index: getaddrinfo.3 =================================================================== RCS file: /usr/ncvs/FreeBSD/src/lib/libc/net/getaddrinfo.3,v retrieving revision 1.32 diff -u -r1.32 getaddrinfo.3 --- getaddrinfo.3 15 Jun 2005 19:04:03 -0000 1.32 +++ getaddrinfo.3 17 May 2007 09:42:11 -0000 @@ -119,11 +119,41 @@ .Fa ai_protocol is zero the caller will accept any protocol. .It Fa ai_flags +The .Fa ai_flags -is formed by -.Tn OR Ns 'ing -the following values: +field to which the +.Fa hints +parameter points shall be set to zero +or be the bitwise-inclusive OR of one or more of the values +.Dv AI_ADDRCONFIG , +.Dv AI_ALL , +.Dv AI_CANONNAME , +.Dv AI_NUMERICHOST , +.Dv AI_NUMERICSERV , +.Dv AI_PASSIVE , +and +.Dv AI_V4MAPPED . .Bl -tag -width "AI_CANONNAMEXX" +.It Dv AI_ADDRCONFIG +If the +.Dv AI_ADDRCONFIG +bit is set, IPv4 addresses shall be returned only if +an IPv4 address is configured on the local system, +and IPv6 addresses shall be returned only if +an IPv6 address is configured on the local system. +.It Dv AI_ALL +If the +.Dv AI_ALL +bit is set with the +.Dv AI_V4MAPPED +bit, then +.Fn getaddrinfo +shall return all matching IPv6 and IPv4 addresses. +The +.Dv AI_ALL +bit without the +.Dv AI_V4MAPPED +bit is ignored. .It Dv AI_CANONNAME If the .Dv AI_CANONNAME @@ -142,6 +172,18 @@ .Fa hostname should be treated as a numeric string defining an IPv4 or IPv6 address and no name resolution should be attempted. +.It Dv AI_NUMERICSERV +If the +.Dv AI_NUMERICSERV +bit is set, +then a non-null +.Fa servname +string supplied shall be a numeric port string. +Otherwise, an +.Dv EAI_NONAME +error shall be returned. +This bit shall prevent any type of name resolution service +(for example, NIS+) from being invoked. .It Dv AI_PASSIVE If the .Dv AI_PASSIVE @@ -176,6 +218,25 @@ is the null pointer and .Dv AI_PASSIVE is not set. +.It Dv AI_V4MAPPED +If the +.Dv AI_V4MAPPED +flag is specified along with an +.Fa ai_family +of +.Dv AF_INET6 , +then +.Fn getaddrinfo +shall return IPv4-mapped IPv6 addresses +on finding no matching IPv6 addresses ( +.Fa ai_addrlen +shall be 16). +The +.Dv AI_V4MAPPED +flag shall be ignored unless +.Fa ai_family +equals +.Dv AF_INET6 . .El .El .Pp @@ -428,7 +489,7 @@ The .Fn getaddrinfo function is defined by the -.St -p1003.1g-2000 -draft specification and documented in +.St -p1003.1-2004 +specification and documented in .Dv "RFC 3493" , .Dq Basic Socket Interface Extensions for IPv6 . --OwLcNYc0lM97+oe1--