From owner-svn-src-all@FreeBSD.ORG Tue Jun 24 20:23:19 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 482F315B; Tue, 24 Jun 2014 20:23:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 34F05297F; Tue, 24 Jun 2014 20:23:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5OKNJsG028447; Tue, 24 Jun 2014 20:23:19 GMT (envelope-from wollman@svn.freebsd.org) Received: (from wollman@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5OKNJCi028446; Tue, 24 Jun 2014 20:23:19 GMT (envelope-from wollman@svn.freebsd.org) Message-Id: <201406242023.s5OKNJCi028446@svn.freebsd.org> From: Garrett Wollman Date: Tue, 24 Jun 2014 20:23:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r267840 - head/lib/libc/sys 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.18 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: Tue, 24 Jun 2014 20:23:19 -0000 Author: wollman Date: Tue Jun 24 20:23:18 2014 New Revision: 267840 URL: http://svnweb.freebsd.org/changeset/base/267840 Log: Catch up with many years of changes: o Document PF_LOCAL as being an alias for PF_UNIX o Document POSIX standardization of this interface using AF_* constants rather than PF_* constants, and note the three particular families which POSIX standardizes. o Note anticipated POSIX standardization of SOCK_CLOEXEC. o Delete from listing protocol families that FreeBSD doesn't support (in some cases, like PF_PUP, has never supported). o Add to listing some current protocol families that have been introduced in the last decade or so. o Document the correspondence of PF_* and AF_* constants. We should probably change the documentation to make the AF_* constants primary, but this commit does not do so. Reviewed by: kevlo@ MFC after: 1 month Modified: head/lib/libc/sys/socket.2 Modified: head/lib/libc/sys/socket.2 ============================================================================== --- head/lib/libc/sys/socket.2 Tue Jun 24 20:11:22 2014 (r267839) +++ head/lib/libc/sys/socket.2 Tue Jun 24 20:23:18 2014 (r267840) @@ -57,24 +57,30 @@ These families are defined in the includ The currently understood formats are: .Pp .Bd -literal -offset indent -compact -PF_LOCAL Host-internal protocols, formerly called PF_UNIX, -PF_UNIX Host-internal protocols, deprecated, use PF_LOCAL, +PF_LOCAL Host-internal protocols (alias for PF_UNIX), +PF_UNIX Host-internal protocols, PF_INET Internet version 4 protocols, -PF_PUP PUP protocols, like BSP, -PF_APPLETALK AppleTalk protocols, -PF_ROUTE Internal Routing protocol, +PF_INET6 Internet version 6 protocols, +PF_ROUTE Internal routing protocol, PF_LINK Link layer interface, -PF_IPX Novell Internet Packet eXchange protocol, -PF_RTIP Help Identify RTIP packets, -PF_PIP Help Identify PIP packets, -PF_ISDN Integrated Services Digital Network, PF_KEY Internal key-management function, -PF_INET6 Internet version 6 protocols, -PF_NATM Native ATM access, -PF_ATM ATM, -PF_NETGRAPH Netgraph sockets +PF_NATM Asynchronous transfer mode protocols, +PF_NETGRAPH Netgraph sockets, +PF_IEEE80211 IEEE 802.11 wireless link-layer protocols (WiFi), +PF_BLUETOOTH Bluetooth protocols, +PF_INET_SDP OFED socket direct protocol (IPv4), +PF_INET6_SDP OFED socket direct protocol (IPv6) .Ed .Pp +Each protocol family is connected to an address family, which has the +same name except that the prefix is +.Dq Dv AF_ +in place of +.Dq Dv PF_ . +Other protocol families may be also defined, beginning with +.Dq Dv PF_ , +with corresponding address families. +.Pp The socket has the indicated .Fa type , which specifies the semantics of communication. @@ -307,6 +313,37 @@ The socket type is not supported by the .%B PS1 .%N 8 .Re +.Sh STANDARDS +The +.Fn socket +function conforms to +.St -p1003.1-2008 . +The +.Tn POSIX +standard specifies only the +.Dv AF_INET , +.Dv AF_INET6 , +and +.Dv AF_UNIX +constants for address families, and requires the use of +.Dv AF_* +constants for the +.Fa domain +argument of +.Fn socket . +The +.Dv SOCK_CLOEXEC +flag is expected to conform to the next revision of the +.Tn POSIX +standard. +The +.Dv SOCK_RDM +.Fa type , +the +.Dv PF_* +constants, and other address families are +.Fx +extensions. .Sh HISTORY The .Fn socket