From owner-svn-src-all@freebsd.org Sun Dec 20 15:18:52 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 65859A4CAF3; Sun, 20 Dec 2015 15:18:52 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 19B4C11D9; Sun, 20 Dec 2015 15:18:52 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tBKFIp9R070571; Sun, 20 Dec 2015 15:18:51 GMT (envelope-from ume@FreeBSD.org) Received: (from ume@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tBKFIpDc070569; Sun, 20 Dec 2015 15:18:51 GMT (envelope-from ume@FreeBSD.org) Message-Id: <201512201518.tBKFIpDc070569@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ume set sender to ume@FreeBSD.org using -f From: Hajimu UMEMOTO Date: Sun, 20 Dec 2015 15:18:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r292514 - in head: include lib/libc/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Dec 2015 15:18:52 -0000 Author: ume Date: Sun Dec 20 15:18:50 2015 New Revision: 292514 URL: https://svnweb.freebsd.org/changeset/base/292514 Log: addrinfo.ai_family is an address family, not a protocol family. PR: 162434 MFC after: 1 week Modified: head/include/netdb.h head/lib/libc/net/getaddrinfo.3 Modified: head/include/netdb.h ============================================================================== --- head/include/netdb.h Sun Dec 20 15:11:11 2015 (r292513) +++ head/include/netdb.h Sun Dec 20 15:18:50 2015 (r292514) @@ -122,7 +122,7 @@ struct protoent { struct addrinfo { int ai_flags; /* AI_PASSIVE, AI_CANONNAME, AI_NUMERICHOST */ - int ai_family; /* PF_xxx */ + int ai_family; /* AF_xxx */ int ai_socktype; /* SOCK_xxx */ int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */ socklen_t ai_addrlen; /* length of ai_addr */ Modified: head/lib/libc/net/getaddrinfo.3 ============================================================================== --- head/lib/libc/net/getaddrinfo.3 Sun Dec 20 15:11:11 2015 (r292513) +++ head/lib/libc/net/getaddrinfo.3 Sun Dec 20 15:18:50 2015 (r292514) @@ -18,7 +18,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 19, 2015 +.Dd December 21, 2015 .Dt GETADDRINFO 3 .Os .Sh NAME @@ -79,7 +79,7 @@ as defined by .Bd -literal struct addrinfo { int ai_flags; /* input flags */ - int ai_family; /* protocol family for socket */ + int ai_family; /* address family for socket */ int ai_socktype; /* socket type */ int ai_protocol; /* protocol for socket */ socklen_t ai_addrlen; /* length of socket-address */ @@ -95,12 +95,12 @@ The caller can supply the following stru .Fa hints : .Bl -tag -width "ai_socktypeXX" .It Fa ai_family -The protocol family that should be used. +The address family that should be used. When .Fa ai_family is set to -.Dv PF_UNSPEC , -it means the caller will accept any protocol family supported by the +.Dv AF_UNSPEC , +it means the caller will accept any address family supported by the operating system. .It Fa ai_socktype Denotes the type of socket that is wanted: @@ -268,7 +268,7 @@ behaves as if the caller provided a with .Fa ai_family set to -.Dv PF_UNSPEC +.Dv AF_UNSPEC and all other elements set to zero or .Dv NULL . .Pp @@ -380,7 +380,7 @@ int s; const char *cause = NULL; memset(&hints, 0, sizeof(hints)); -hints.ai_family = PF_UNSPEC; +hints.ai_family = AF_UNSPEC; hints.ai_socktype = SOCK_STREAM; error = getaddrinfo("www.kame.net", "http", &hints, &res0); if (error) { @@ -423,7 +423,7 @@ int nsock; const char *cause = NULL; memset(&hints, 0, sizeof(hints)); -hints.ai_family = PF_UNSPEC; +hints.ai_family = AF_UNSPEC; hints.ai_socktype = SOCK_STREAM; hints.ai_flags = AI_PASSIVE; error = getaddrinfo(NULL, "http", &hints, &res0);