Blame common-src/stream.h

Packit Service 392537
/*
Packit Service 392537
 * Amanda, The Advanced Maryland Automatic Network Disk Archiver
Packit Service 392537
 * Copyright (c) 1991-1998 University of Maryland at College Park
Packit Service 392537
 * Copyright (c) 2007-2012 Zmanda, Inc.  All Rights Reserved.
Packit Service 392537
 * Copyright (c) 2013-2016 Carbonite, Inc.  All Rights Reserved.
Packit Service 392537
 * All Rights Reserved.
Packit Service 392537
 *
Packit Service 392537
 * Permission to use, copy, modify, distribute, and sell this software and its
Packit Service 392537
 * documentation for any purpose is hereby granted without fee, provided that
Packit Service 392537
 * the above copyright notice appear in all copies and that both that
Packit Service 392537
 * copyright notice and this permission notice appear in supporting
Packit Service 392537
 * documentation, and that the name of U.M. not be used in advertising or
Packit Service 392537
 * publicity pertaining to distribution of the software without specific,
Packit Service 392537
 * written prior permission.  U.M. makes no representations about the
Packit Service 392537
 * suitability of this software for any purpose.  It is provided "as is"
Packit Service 392537
 * without express or implied warranty.
Packit Service 392537
 *
Packit Service 392537
 * U.M. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
Packit Service 392537
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL U.M.
Packit Service 392537
 * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
Packit Service 392537
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
Packit Service 392537
 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
Packit Service 392537
 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Packit Service 392537
 *
Packit Service 392537
 * Author: James da Silva, Systems Design and Analysis Group
Packit Service 392537
 *			   Computer Science Department
Packit Service 392537
 *			   University of Maryland at College Park
Packit Service 392537
 */
Packit Service 392537
/*
Packit Service 392537
 * $Id: stream.h,v 1.12 2006/06/01 14:44:05 martinea Exp $
Packit Service 392537
 *
Packit Service 392537
 * interface to stream module
Packit Service 392537
 */
Packit Service 392537
#ifndef STREAM_H
Packit Service 392537
#define STREAM_H
Packit Service 392537
Packit Service 392537
#include "amanda.h"
Packit Service 392537
Packit Service 392537
#define NETWORK_BLOCK_BYTES	DISK_BLOCK_BYTES
Packit Service 392537
#define STREAM_BUFSIZE		(NETWORK_BLOCK_BYTES * 4)
Packit Service 392537
Packit Service 392537
int stream_server(int family, in_port_t *port, size_t sendsize,
Packit Service 392537
		  size_t recvsize, int priv);
Packit Service 392537
int stream_accept(int sock, int timeout, size_t sendsize, size_t recvsize);
Packit Service 392537
int stream_client_addr(const char *src_ip,
Packit Service 392537
		       struct addrinfo *res,
Packit Service 392537
		       in_port_t port,
Packit Service 392537
		       size_t sendsize,
Packit Service 392537
		       size_t recvsize,
Packit Service 392537
		       in_port_t *localport,
Packit Service 392537
		       int nonblock,
Packit Service 392537
		       int priv,
Packit Service 392537
		       char **stream_msg);
Packit Service 392537
int stream_client_privileged(const char *src_ip,
Packit Service 392537
				const char *hostname,
Packit Service 392537
				in_port_t port,
Packit Service 392537
				size_t sendsize,
Packit Service 392537
				size_t recvsize,
Packit Service 392537
				in_port_t *localport,
Packit Service 392537
				int nonblock,
Packit Service 392537
				char **stream_msg);
Packit Service 392537
int stream_client(const char *src_ip,
Packit Service 392537
		     const char *hostname,
Packit Service 392537
		     in_port_t port,
Packit Service 392537
		     size_t sendsize,
Packit Service 392537
		     size_t recvsize,
Packit Service 392537
		     in_port_t *localport,
Packit Service 392537
		     int nonblock,
Packit Service 392537
		     char **stream_msg);
Packit Service 392537
Packit Service 392537
#endif