1185377Ssam/* 2187831Ssam * Copyright (C) 2008 Edwin Groothuis. All rights reserved. 3185377Ssam * 4185377Ssam * Redistribution and use in source and binary forms, with or without 5185377Ssam * modification, are permitted provided that the following conditions 6185377Ssam * are met: 7185377Ssam * 1. Redistributions of source code must retain the above copyright 8185377Ssam * notice, this list of conditions and the following disclaimer. 9185377Ssam * 2. Redistributions in binary form must reproduce the above copyright 10185377Ssam * notice, this list of conditions and the following disclaimer in the 11185377Ssam * documentation and/or other materials provided with the distribution. 12185377Ssam * 13185377Ssam * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND 14185377Ssam * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15185377Ssam * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16185377Ssam * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE 17187831Ssam * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18185377Ssam * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19185377Ssam * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20185377Ssam * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21185377Ssam * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22185377Ssam * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23185377Ssam * SUCH DAMAGE. 24185377Ssam */ 25185377Ssam 26185377Ssam#include <sys/cdefs.h> 27185377Ssam__FBSDID("$FreeBSD$"); 28185377Ssam 29185377Ssamint write_init(int fd, FILE *f, const char *mode); 30185377Ssamsize_t write_file(char *buffer, int count); 31185377Ssamint write_close(void); 32185377Ssam 33185377Ssamint read_init(int fd, FILE *f, const char *mode); 34185377Ssamsize_t read_file(char *buffer, int count); 35185377Ssamint read_close(void); 36185377Ssam 37185377Ssamint synchnet(int peer); 38185377Ssam