From owner-svn-src-all@freebsd.org Thu Oct 19 18:04:18 2017 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 2DD8EE430EB; Thu, 19 Oct 2017 18:04:18 +0000 (UTC) (envelope-from glebius@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 EFA1F757C5; Thu, 19 Oct 2017 18:04:17 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v9JI4HkZ076708; Thu, 19 Oct 2017 18:04:17 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v9JI4Hps076707; Thu, 19 Oct 2017 18:04:17 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201710191804.v9JI4Hps076707@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 19 Oct 2017 18:04:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r324767 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 324767 X-SVN-Commit-Repository: base 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.23 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: Thu, 19 Oct 2017 18:04:18 -0000 Author: glebius Date: Thu Oct 19 18:04:16 2017 New Revision: 324767 URL: https://svnweb.freebsd.org/changeset/base/324767 Log: Hide struct sockbuf from userland. PR: 222917 (exp-run) Modified: head/sys/sys/sockbuf.h Modified: head/sys/sys/sockbuf.h ============================================================================== --- head/sys/sys/sockbuf.h Thu Oct 19 17:57:38 2017 (r324766) +++ head/sys/sys/sockbuf.h Thu Oct 19 18:04:16 2017 (r324767) @@ -32,15 +32,9 @@ */ #ifndef _SYS_SOCKBUF_H_ #define _SYS_SOCKBUF_H_ -#include -#include -#include -#include -#define SB_MAX (2*1024*1024) /* default for max chars in sockbuf */ - /* - * Constants for sb_flags field of struct sockbuf. + * Constants for sb_flags field of struct sockbuf/xsockbuf. */ #define SB_WAIT 0x04 /* someone is waiting for data/space */ #define SB_SEL 0x08 /* someone is selecting */ @@ -59,6 +53,14 @@ #define SBS_CANTRCVMORE 0x0020 /* can't receive more data from peer */ #define SBS_RCVATMARK 0x0040 /* at mark on input */ +#if defined(_KERNEL) || defined(_WANT_SOCKET) +#include +#include +#include +#include + +#define SB_MAX (2*1024*1024) /* default for max chars in sockbuf */ + struct mbuf; struct sockaddr; struct socket; @@ -101,6 +103,7 @@ struct sockbuf { struct task sb_aiotask; /* AIO task */ }; +#endif /* defined(_KERNEL) || defined(_WANT_SOCKET) */ #ifdef _KERNEL /*