From nobody@FreeBSD.org  Thu Mar  3 11:49:40 2005
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 5665716A4CE
	for <freebsd-gnats-submit@FreeBSD.org>; Thu,  3 Mar 2005 11:49:40 +0000 (GMT)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 2D6FD43D5E
	for <freebsd-gnats-submit@FreeBSD.org>; Thu,  3 Mar 2005 11:49:40 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j23Bndit040666
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 3 Mar 2005 11:49:39 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id j23BndAG040665;
	Thu, 3 Mar 2005 11:49:39 GMT
	(envelope-from nobody)
Message-Id: <200503031149.j23BndAG040665@www.freebsd.org>
Date: Thu, 3 Mar 2005 11:49:39 GMT
From: Matthias Andree <matthias.andree@gmx.de>
To: freebsd-gnats-submit@FreeBSD.org
Subject: getaddrinfo() doesn't appear to support AI_ADDRCONFIG
X-Send-Pr-Version: www-2.3

>Number:         78357
>Category:       docs
>Synopsis:       [patch] getaddrinfo(3)'s AI_ADDRCONFIG not documented
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    remko
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Mar 03 11:50:13 GMT 2005
>Closed-Date:    Sun Nov 11 11:57:29 UTC 2007
>Last-Modified:  Sun Nov 11 12:00:10 UTC 2007
>Originator:     Matthias Andree
>Release:        5.3
>Organization:
>Environment:
>Description:
IEEE Std 1003.1-2001 specifies several ai_flags for the getaddrinfo
hints that FreeBSD doesn't appear to support, among them AI_ADDRCONFIG.

>How-To-Repeat:
      
>Fix:

>Release-Note:
>Audit-Trail:

From: Matthias Andree <matthias.andree@gmx.de>
To: FreeBSD-gnats-submit@FreeBSD.org, freebsd-standards@FreeBSD.org
Cc:  
Subject: Re: standards/78357: getaddrinfo() doesn't appear to support AI_ADDRCONFIG
Date: Thu, 3 Mar 2005 23:29:45 +0100

 This problem appears to be in fact a documentation bug, netdb.h defines
 AI_ADDRCONFIG, but the manual page of getaddrinfo doesn't document it.
Responsible-Changed-From-To: freebsd-standards->docs 
Responsible-Changed-By: stefanf 
Responsible-Changed-When: Mon Aug 22 20:05:55 GMT 2005 
Responsible-Changed-Why:  
Adjust synopsis and assign to docs. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=78357 
Responsible-Changed-From-To: docs->freebsd-doc 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Wed Aug 31 06:17:08 GMT 2005 
Responsible-Changed-Why:  
Canonicalize assignment. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=78357 
Responsible-Changed-From-To: freebsd-doc->lawrance 
Responsible-Changed-By: lawrance 
Responsible-Changed-When: Sat Nov 4 10:19:13 UTC 2006 
Responsible-Changed-Why:  
This is something I can look into. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=78357 
Responsible-Changed-From-To: lawrance->freebsd-doc 
Responsible-Changed-By: lawrance 
Responsible-Changed-When: Wed Feb 21 11:11:57 UTC 2007 
Responsible-Changed-Why:  
Release; I'm not working on it 

http://www.freebsd.org/cgi/query-pr.cgi?pr=78357 

From: Jeroen Ruigrok van der Werven <asmodai@in-nomine.org>
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(-at-)in-nomine.org> / 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--
Responsible-Changed-From-To: freebsd-doc->remko 
Responsible-Changed-By: remko 
Responsible-Changed-When: Thu May 17 10:43:57 UTC 2007 
Responsible-Changed-Why:  
I'll handle this 

http://www.freebsd.org/cgi/query-pr.cgi?pr=78357 
State-Changed-From-To: open->patched 
State-Changed-By: remko 
State-Changed-When: Wed Jun 6 19:24:22 UTC 2007 
State-Changed-Why:  
Committed to -HEAD, MFC in a week (or so) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=78357 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: docs/78357: commit references a PR
Date: Wed,  6 Jun 2007 19:24:09 +0000 (UTC)

 remko       2007-06-06 19:24:02 UTC
 
   FreeBSD src repository
 
   Modified files:
     lib/libc/net         getaddrinfo.3 
   Log:
   Document getaddrinfo(3)'s AI_ADDRCONFIG
   
   PR:             docs/78357
   Submitted by:   Matthias Andree <matthias dot andree at gmx dot de>
   Patch by:       asmodai
   MFC after:      1 week
   
   Revision  Changes    Path
   1.33      +67 -6     src/lib/libc/net/getaddrinfo.3
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: patched->closed 
State-Changed-By: remko 
State-Changed-When: Sun Nov 11 11:57:28 UTC 2007 
State-Changed-Why:  
This is now in RELENG_6, RELENG_7 and CURRENT, thanks for the submission 

http://www.freebsd.org/cgi/query-pr.cgi?pr=78357 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: docs/78357: commit references a PR
Date: Sun, 11 Nov 2007 11:57:28 +0000 (UTC)

 remko       2007-11-11 11:57:11 UTC
 
   FreeBSD src repository
 
   Modified files:        (Branch: RELENG_6)
     lib/libc/net         getaddrinfo.3 
   Log:
   MFC rev 1.33 getaddrinfo.3
   
     Document getaddrinfo(3)'s AI_ADDRCONFIG
   
     PR: docs/78357
     Submitted by: Matthias Andree <matthias dot andree at gmx dot de>
     Patch by: asmodai
   
   Revision  Changes    Path
   1.32.2.1  +67 -6     src/lib/libc/net/getaddrinfo.3
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
