1300829Sgrehan/*- 2300829Sgrehan * Copyright (c) 2015 Nahanni Systems, Inc. 3300829Sgrehan * All rights reserved. 4300829Sgrehan * 5300829Sgrehan * Redistribution and use in source and binary forms, with or without 6300829Sgrehan * modification, are permitted provided that the following conditions 7300829Sgrehan * are met: 8300829Sgrehan * 1. Redistributions of source code must retain the above copyright 9300829Sgrehan * notice, this list of conditions and the following disclaimer. 10300829Sgrehan * 2. Redistributions in binary form must reproduce the above copyright 11300829Sgrehan * notice, this list of conditions and the following disclaimer in the 12300829Sgrehan * documentation and/or other materials provided with the distribution. 13300829Sgrehan * 14300829Sgrehan * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND 15300829Sgrehan * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16300829Sgrehan * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17300829Sgrehan * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18300829Sgrehan * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19300829Sgrehan * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20300829Sgrehan * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21300829Sgrehan * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22300829Sgrehan * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23300829Sgrehan * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24300829Sgrehan * SUCH DAMAGE. 25300829Sgrehan * 26300829Sgrehan * $FreeBSD: releng/11.0/usr.sbin/bhyve/sockstream.h 302408 2016-07-08 00:04:57Z gjb $ 27300829Sgrehan */ 28300829Sgrehan 29300829Sgrehan#include <sys/types.h> 30300829Sgrehan#include <unistd.h> 31300829Sgrehan 32300829Sgrehanssize_t stream_read(int fd, void *buf, ssize_t nbytes); 33300829Sgrehanssize_t stream_write(int fd, const void *buf, ssize_t nbytes); 34