174462Salfred/*	$NetBSD: svc_soc.h,v 1.1 2000/06/02 22:57:57 fvdl Exp $	*/
274462Salfred/*	$FreeBSD$ */
374462Salfred
474462Salfred/*
574462Salfred * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
674462Salfred * unrestricted use provided that this legend is included on all tape
774462Salfred * media and as a part of the software program in whole or part.  Users
874462Salfred * may copy or modify Sun RPC without charge, but are not authorized
974462Salfred * to license or distribute it to anyone else except as part of a product or
1074462Salfred * program developed by the user.
1174462Salfred *
1274462Salfred * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
1374462Salfred * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
1474462Salfred * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
1574462Salfred *
1674462Salfred * Sun RPC is provided with no support and without any obligation on the
1774462Salfred * part of Sun Microsystems, Inc. to assist in its use, correction,
1874462Salfred * modification or enhancement.
1974462Salfred *
2074462Salfred * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
2174462Salfred * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
2274462Salfred * OR ANY PART THEREOF.
2374462Salfred *
2474462Salfred * In no event will Sun Microsystems, Inc. be liable for any lost revenue
2574462Salfred * or profits or other special, indirect and consequential damages, even if
2674462Salfred * Sun has been advised of the possibility of such damages.
2774462Salfred *
2874462Salfred * Sun Microsystems, Inc.
2974462Salfred * 2550 Garcia Avenue
3074462Salfred * Mountain View, California  94043
3174462Salfred */
3274462Salfred/*
3374462Salfred * Copyright (c) 1986 - 1991 by Sun Microsystems, Inc.
3474462Salfred */
3574462Salfred
3674462Salfred/*
3774462Salfred * svc.h, Server-side remote procedure call interface.
3874462Salfred */
3974462Salfred
4074462Salfred#ifndef _RPC_SVC_SOC_H
4174462Salfred#define _RPC_SVC_SOC_H
4274462Salfred#include <sys/cdefs.h>
4374462Salfred
4474462Salfred/* #pragma ident   "@(#)svc_soc.h  1.11    94/04/25 SMI" */
4574462Salfred/*      svc_soc.h 1.8 89/05/01 SMI      */
4674462Salfred
4774462Salfred/*
4874462Salfred * All the following declarations are only for backward compatibility
4974462Salfred * with TS-RPC
5074462Salfred */
5174462Salfred
5274462Salfred/*
5374462Salfred *  Approved way of getting address of caller
5474462Salfred */
5574462Salfred#define svc_getcaller(x) (&(x)->xp_raddr)
5674462Salfred
5774462Salfred/*
5874462Salfred * Service registration
5974462Salfred *
6074462Salfred * svc_register(xprt, prog, vers, dispatch, protocol)
6174462Salfred *	SVCXPRT *xprt;
6274462Salfred *	u_long prog;
6374462Salfred *	u_long vers;
6474462Salfred *	void (*dispatch)();
6574462Salfred *	int protocol;    like TCP or UDP, zero means do not register
6674462Salfred */
6774462Salfred__BEGIN_DECLS
6893032Simpextern bool_t	svc_register(SVCXPRT *, u_long, u_long,
6993032Simp		    void (*)(struct svc_req *, SVCXPRT *), int);
7074462Salfred__END_DECLS
7174462Salfred
7274462Salfred/*
7374462Salfred * Service un-registration
7474462Salfred *
7574462Salfred * svc_unregister(prog, vers)
7674462Salfred *	u_long prog;
7774462Salfred *	u_long vers;
7874462Salfred */
7974462Salfred__BEGIN_DECLS
8093032Simpextern void	svc_unregister(u_long, u_long);
8174462Salfred__END_DECLS
8274462Salfred
8374462Salfred
8474462Salfred/*
8574462Salfred * Memory based rpc for testing and timing.
8674462Salfred */
8774462Salfred__BEGIN_DECLS
8893032Simpextern SVCXPRT *svcraw_create(void);
8974462Salfred__END_DECLS
9074462Salfred
9174462Salfred
9274462Salfred/*
9374462Salfred * Udp based rpc.
9474462Salfred */
9574462Salfred__BEGIN_DECLS
9693032Simpextern SVCXPRT *svcudp_create(int);
9793032Simpextern SVCXPRT *svcudp_bufcreate(int, u_int, u_int);
9893032Simpextern int svcudp_enablecache(SVCXPRT *, u_long);
9974462Salfred__END_DECLS
10074462Salfred
10174462Salfred
10274462Salfred/*
10374462Salfred * Tcp based rpc.
10474462Salfred */
10574462Salfred__BEGIN_DECLS
10693032Simpextern SVCXPRT *svctcp_create(int, u_int, u_int);
10774462Salfred__END_DECLS
10874462Salfred
10974462Salfred/*
11074462Salfred * Fd based rpc.
11174462Salfred */
11274462Salfred__BEGIN_DECLS
11393032Simpextern SVCXPRT *svcfd_create(int, u_int, u_int);
11474462Salfred__END_DECLS
11574462Salfred
11674462Salfred#endif /* !_RPC_SVC_SOC_H */
117