diff options
author | Gleb Smirnoff <glebius@FreeBSD.org> | 2017-10-19 18:04:16 +0000 |
---|---|---|
committer | Gleb Smirnoff <glebius@FreeBSD.org> | 2017-10-19 18:04:16 +0000 |
commit | 87165bf858efc96b1ce868993be06ea61a1944e1 (patch) | |
tree | 6a0bae8d86a2a800400b209ac2c9f8aeb7f0b37d | |
parent | 3fcbb8c0a9966ef9bd4fc7f5cdf85106427c29c5 (diff) | |
download | src-87165bf858efc96b1ce868993be06ea61a1944e1.tar.gz src-87165bf858efc96b1ce868993be06ea61a1944e1.zip |
Hide struct sockbuf from userland.
PR: 222917 (exp-run)
Notes
Notes:
svn path=/head/; revision=324767
-rw-r--r-- | sys/sys/sockbuf.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/sys/sys/sockbuf.h b/sys/sys/sockbuf.h index c864937f0002..ad675b360aae 100644 --- a/sys/sys/sockbuf.h +++ b/sys/sys/sockbuf.h @@ -32,15 +32,9 @@ */ #ifndef _SYS_SOCKBUF_H_ #define _SYS_SOCKBUF_H_ -#include <sys/_lock.h> -#include <sys/_mutex.h> -#include <sys/_sx.h> -#include <sys/_task.h> - -#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 <sys/_lock.h> +#include <sys/_mutex.h> +#include <sys/_sx.h> +#include <sys/_task.h> + +#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 /* |