From owner-svn-src-all@FreeBSD.ORG Fri Feb 1 15:32:21 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id AE49DE70; Fri, 1 Feb 2013 15:32:21 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 86CEBDAF; Fri, 1 Feb 2013 15:32:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r11FWLND064677; Fri, 1 Feb 2013 15:32:21 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r11FWKZf064670; Fri, 1 Feb 2013 15:32:20 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201302011532.r11FWKZf064670@svn.freebsd.org> From: John Baldwin Date: Fri, 1 Feb 2013 15:32:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r246210 - in head/sys: netinet 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.14 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: Fri, 01 Feb 2013 15:32:21 -0000 Author: jhb Date: Fri Feb 1 15:32:20 2013 New Revision: 246210 URL: http://svnweb.freebsd.org/changeset/base/246210 Log: Add placeholder constants to reserve a portion of the socket option name space for use by downstream vendors to add custom options. MFC after: 2 weeks Modified: head/sys/netinet/tcp.h head/sys/netinet/udp.h head/sys/sys/socket.h head/sys/sys/un.h Modified: head/sys/netinet/tcp.h ============================================================================== --- head/sys/netinet/tcp.h Fri Feb 1 14:26:54 2013 (r246209) +++ head/sys/netinet/tcp.h Fri Feb 1 15:32:20 2013 (r246210) @@ -166,6 +166,9 @@ struct tcphdr { #define TCP_KEEPINTVL 512 /* L,N interval between keepalives */ #define TCP_KEEPCNT 1024 /* L,N number of keepalives before close */ +/* Start of reserved space for third-party user-settable options. */ +#define TCP_VENDOR SO_VENDOR + #define TCP_CA_NAME_MAX 16 /* max congestion control name length */ #define TCPI_OPT_TIMESTAMPS 0x01 Modified: head/sys/netinet/udp.h ============================================================================== --- head/sys/netinet/udp.h Fri Feb 1 14:26:54 2013 (r246209) +++ head/sys/netinet/udp.h Fri Feb 1 15:32:20 2013 (r246210) @@ -50,6 +50,8 @@ struct udphdr { */ #define UDP_ENCAP 1 +/* Start of reserved space for third-party user-settable options. */ +#define UDP_VENDOR SO_VENDOR /* * UDP Encapsulation of IPsec Packets options. Modified: head/sys/sys/socket.h ============================================================================== --- head/sys/sys/socket.h Fri Feb 1 14:26:54 2013 (r246209) +++ head/sys/sys/socket.h Fri Feb 1 15:32:20 2013 (r246210) @@ -143,6 +143,15 @@ typedef __uid_t uid_t; #endif /* + * Space reserved for new socket options added by third-party vendors. + * This range applies to all socket option levels. New socket options + * in FreeBSD should always use an option value less than SO_VENDOR. + */ +#if __BSD_VISIBLE +#define SO_VENDOR 0x80000000 +#endif + +/* * Structure used for manipulating linger option. */ struct linger { Modified: head/sys/sys/un.h ============================================================================== --- head/sys/sys/un.h Fri Feb 1 14:26:54 2013 (r246209) +++ head/sys/sys/un.h Fri Feb 1 15:32:20 2013 (r246210) @@ -57,6 +57,9 @@ struct sockaddr_un { #define LOCAL_CREDS 2 /* pass credentials to receiver */ #define LOCAL_CONNWAIT 4 /* connects block until accepted */ +/* Start of reserved space for third-party socket options. */ +#define LOCAL_VENDOR SO_VENDOR + #ifndef _KERNEL /* actual length of an initialized sockaddr_un */