174462Salfred/*	$NetBSD: clnt_soc.h,v 1.1 2000/06/02 22:57:55 fvdl Exp $	*/
274462Salfred/*	$FreeBSD$ */
374462Salfred
4258578Shrs/*-
5258578Shrs * Copyright (c) 2009, Sun Microsystems, Inc.
6258578Shrs * All rights reserved.
7258578Shrs *
8258578Shrs * Redistribution and use in source and binary forms, with or without
9258578Shrs * modification, are permitted provided that the following conditions are met:
10258578Shrs * - Redistributions of source code must retain the above copyright notice,
11258578Shrs *   this list of conditions and the following disclaimer.
12258578Shrs * - Redistributions in binary form must reproduce the above copyright notice,
13258578Shrs *   this list of conditions and the following disclaimer in the documentation
14258578Shrs *   and/or other materials provided with the distribution.
15258578Shrs * - Neither the name of Sun Microsystems, Inc. nor the names of its
16258578Shrs *   contributors may be used to endorse or promote products derived
17258578Shrs *   from this software without specific prior written permission.
18258578Shrs *
19258578Shrs * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20258578Shrs * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21258578Shrs * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22258578Shrs * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
23258578Shrs * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24258578Shrs * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25258578Shrs * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26258578Shrs * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27258578Shrs * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28258578Shrs * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29258578Shrs * POSSIBILITY OF SUCH DAMAGE.
3074462Salfred */
3174462Salfred/*
3274462Salfred * Copyright (c) 1984 - 1991 by Sun Microsystems, Inc.
3374462Salfred */
3474462Salfred
3574462Salfred/*
3674462Salfred * clnt.h - Client side remote procedure call interface.
3774462Salfred */
3874462Salfred
3974462Salfred#ifndef _RPC_CLNT_SOC_H
4074462Salfred#define _RPC_CLNT_SOC_H
4174462Salfred
4274462Salfred/* derived from clnt_soc.h 1.3 88/12/17 SMI     */
4374462Salfred
4474462Salfred/*
4574462Salfred * All the following declarations are only for backward compatibility
4674462Salfred * with TS-RPC.
4774462Salfred */
4874462Salfred
4974462Salfred#include <sys/cdefs.h>
5074462Salfred
5174462Salfred#define UDPMSGSIZE      8800    /* rpc imposed limit on udp msg size */
5274462Salfred
5374462Salfred/*
5474462Salfred * TCP based rpc
5574462Salfred * CLIENT *
5674462Salfred * clnttcp_create(raddr, prog, vers, sockp, sendsz, recvsz)
5774462Salfred *	struct sockaddr_in *raddr;
5874462Salfred *	u_long prog;
5974462Salfred *	u_long version;
6074462Salfred *	register int *sockp;
6174462Salfred *	u_int sendsz;
6274462Salfred *	u_int recvsz;
6374462Salfred */
6474462Salfred__BEGIN_DECLS
6593032Simpextern CLIENT *clnttcp_create(struct sockaddr_in *, u_long, u_long, int *,
6693032Simp			      u_int, u_int);
6774462Salfred__END_DECLS
6874462Salfred
6974462Salfred/*
7074462Salfred * Raw (memory) rpc.
7174462Salfred */
7274462Salfred__BEGIN_DECLS
7393032Simpextern CLIENT *clntraw_create(u_long, u_long);
7474462Salfred__END_DECLS
7574462Salfred
7674462Salfred
7774462Salfred/*
7874462Salfred * UDP based rpc.
7974462Salfred * CLIENT *
8074462Salfred * clntudp_create(raddr, program, version, wait, sockp)
8174462Salfred *	struct sockaddr_in *raddr;
8274462Salfred *	u_long program;
8374462Salfred *	u_long version;
8474462Salfred *	struct timeval wait;
8574462Salfred *	int *sockp;
8674462Salfred *
8774462Salfred * Same as above, but you specify max packet sizes.
8874462Salfred * CLIENT *
8974462Salfred * clntudp_bufcreate(raddr, program, version, wait, sockp, sendsz, recvsz)
9074462Salfred *	struct sockaddr_in *raddr;
9174462Salfred *	u_long program;
9274462Salfred *	u_long version;
9374462Salfred *	struct timeval wait;
9474462Salfred *	int *sockp;
9574462Salfred *	u_int sendsz;
9674462Salfred *	u_int recvsz;
9774462Salfred */
9874462Salfred__BEGIN_DECLS
9993032Simpextern CLIENT *clntudp_create(struct sockaddr_in *, u_long, u_long,
10093032Simp			      struct timeval, int *);
10193032Simpextern CLIENT *clntudp_bufcreate(struct sockaddr_in *, u_long, u_long,
10293032Simp				 struct timeval, int *, u_int, u_int);
10374462Salfred__END_DECLS
10474462Salfred
10574462Salfred#endif /* _RPC_CLNT_SOC_H */
106