174462Salfred/*	$NetBSD: svc.h,v 1.17 2000/06/02 22:57:56 fvdl Exp $	*/
274462Salfred
3258578Shrs/*-
4258578Shrs * Copyright (c) 2009, Sun Microsystems, Inc.
5258578Shrs * All rights reserved.
68858Srgrimes *
7258578Shrs * Redistribution and use in source and binary forms, with or without
8258578Shrs * modification, are permitted provided that the following conditions are met:
9258578Shrs * - Redistributions of source code must retain the above copyright notice,
10258578Shrs *   this list of conditions and the following disclaimer.
11258578Shrs * - Redistributions in binary form must reproduce the above copyright notice,
12258578Shrs *   this list of conditions and the following disclaimer in the documentation
13258578Shrs *   and/or other materials provided with the distribution.
14258578Shrs * - Neither the name of Sun Microsystems, Inc. nor the names of its
15258578Shrs *   contributors may be used to endorse or promote products derived
16258578Shrs *   from this software without specific prior written permission.
178858Srgrimes *
18258578Shrs * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19258578Shrs * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20258578Shrs * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21258578Shrs * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
22258578Shrs * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23258578Shrs * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24258578Shrs * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25258578Shrs * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26258578Shrs * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27258578Shrs * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28258578Shrs * POSSIBILITY OF SUCH DAMAGE.
298858Srgrimes *
3074462Salfred *	from: @(#)svc.h 1.35 88/12/17 SMI
3174462Salfred *	from: @(#)svc.h      1.27    94/04/25 SMI
3250473Speter * $FreeBSD$
331839Swollman */
341839Swollman
351839Swollman/*
361839Swollman * svc.h, Server-side remote procedure call interface.
371839Swollman *
3874462Salfred * Copyright (C) 1986-1993 by Sun Microsystems, Inc.
391839Swollman */
401839Swollman
411903Swollman#ifndef _RPC_SVC_H
421903Swollman#define _RPC_SVC_H
431903Swollman#include <sys/cdefs.h>
441839Swollman
451839Swollman/*
461839Swollman * This interface must manage two items concerning remote procedure calling:
471839Swollman *
481839Swollman * 1) An arbitrary number of transport connections upon which rpc requests
491839Swollman * are received.  The two most notable transports are TCP and UDP;  they are
501839Swollman * created and registered by routines in svc_tcp.c and svc_udp.c, respectively;
511839Swollman * they in turn call xprt_register and xprt_unregister.
521839Swollman *
531839Swollman * 2) An arbitrary number of locally registered services.  Services are
541839Swollman * described by the following four data: program number, version number,
551839Swollman * "service dispatch" function, a transport handle, and a boolean that
561839Swollman * indicates whether or not the exported program should be registered with a
571839Swollman * local binder service;  if true the program's number and version and the
581839Swollman * port number from the transport handle are registered with the binder.
591839Swollman * These data are registered with the rpc svc system via svc_register.
601839Swollman *
611839Swollman * A service's dispatch function is called whenever an rpc request comes in
621839Swollman * on a transport.  The request's program and version numbers must match
631839Swollman * those of the registered service.  The dispatch function is passed two
641839Swollman * parameters, struct svc_req * and SVCXPRT *, defined below.
651839Swollman */
661839Swollman
6774462Salfred/*
6874462Salfred *      Service control requests
6974462Salfred */
7074462Salfred#define SVCGET_VERSQUIET	1
7174462Salfred#define SVCSET_VERSQUIET	2
72109359Smbr#define SVCGET_CONNMAXREC	3
73109359Smbr#define SVCSET_CONNMAXREC	4
7474462Salfred
75109359Smbr/*
76109359Smbr * Operations for rpc_control().
77109359Smbr */
78109359Smbr#define RPC_SVC_CONNMAXREC_SET  0	/* set max rec size, enable nonblock */
79109359Smbr#define RPC_SVC_CONNMAXREC_GET  1
8074462Salfred
811839Swollmanenum xprt_stat {
821839Swollman	XPRT_DIED,
831839Swollman	XPRT_MOREREQS,
841839Swollman	XPRT_IDLE
851839Swollman};
861839Swollman
871839Swollman/*
881839Swollman * Server side transport handle
891839Swollman */
9021059Spetertypedef struct __rpc_svcxprt {
9174462Salfred	int		xp_fd;
92296349Spfg#define	xp_sock		xp_fd
931839Swollman	u_short		xp_port;	 /* associated port number */
9474462Salfred	const struct xp_ops {
9521059Speter	    /* receive incoming requests */
9693032Simp	    bool_t	(*xp_recv)(struct __rpc_svcxprt *, struct rpc_msg *);
9721059Speter	    /* get transport status */
9893032Simp	    enum xprt_stat (*xp_stat)(struct __rpc_svcxprt *);
9921059Speter	    /* get arguments */
10093032Simp	    bool_t	(*xp_getargs)(struct __rpc_svcxprt *, xdrproc_t,
10195658Sdes				void *);
10221059Speter	    /* send reply */
10393032Simp	    bool_t	(*xp_reply)(struct __rpc_svcxprt *, struct rpc_msg *);
10421059Speter	    /* free mem allocated for args */
10593032Simp	    bool_t	(*xp_freeargs)(struct __rpc_svcxprt *, xdrproc_t,
10695658Sdes				void *);
10721059Speter	    /* destroy this struct */
10893032Simp	    void	(*xp_destroy)(struct __rpc_svcxprt *);
1091839Swollman	} *xp_ops;
1101839Swollman	int		xp_addrlen;	 /* length of remote address */
11174462Salfred	struct sockaddr_in xp_raddr;	 /* remote addr. (backward ABI compat) */
11274462Salfred	/* XXX - fvdl stick this here for ABI backward compat reasons */
11374462Salfred	const struct xp_ops2 {
11474462Salfred		/* catch-all function */
11593032Simp		bool_t  (*xp_control)(struct __rpc_svcxprt *, const u_int,
11693032Simp				void *);
11774462Salfred	} *xp_ops2;
11874462Salfred	char		*xp_tp;		 /* transport provider device name */
11974462Salfred	char		*xp_netid;	 /* network token */
12074462Salfred	struct netbuf	xp_ltaddr;	 /* local transport address */
12174462Salfred	struct netbuf	xp_rtaddr;	 /* remote transport address */
1221839Swollman	struct opaque_auth xp_verf;	 /* raw response verifier */
12374462Salfred	void		*xp_p1;		 /* private: for use by svc ops */
12474462Salfred	void		*xp_p2;		 /* private: for use by svc ops */
12574462Salfred	void		*xp_p3;		 /* private: for use by svc lib */
12674462Salfred	int		xp_type;	 /* transport type */
1271839Swollman} SVCXPRT;
1281839Swollman
1291839Swollman/*
130181344Sdfr * Interface to server-side authentication flavors.
131181344Sdfr */
132181344Sdfrtypedef struct __rpc_svcauth {
133181344Sdfr	struct svc_auth_ops {
134181344Sdfr		int   (*svc_ah_wrap)(struct __rpc_svcauth *, XDR *,
135181344Sdfr		    xdrproc_t, caddr_t);
136181344Sdfr		int   (*svc_ah_unwrap)(struct __rpc_svcauth *, XDR *,
137181344Sdfr		    xdrproc_t, caddr_t);
138181344Sdfr	} *svc_ah_ops;
139181344Sdfr	void *svc_ah_private;
140181344Sdfr} SVCAUTH;
141181344Sdfr
142181344Sdfr/*
143181344Sdfr * Server transport extensions (accessed via xp_p3).
144181344Sdfr */
145181344Sdfrtypedef struct __rpc_svcxprt_ext {
146181344Sdfr	int		xp_flags;	/* versquiet */
147181344Sdfr	SVCAUTH		xp_auth;	/* interface to auth methods */
148181344Sdfr} SVCXPRT_EXT;
149181344Sdfr
150181344Sdfr/*
15174462Salfred * Service request
15274462Salfred */
15374462Salfredstruct svc_req {
15474462Salfred	u_int32_t	rq_prog;	/* service program number */
15574462Salfred	u_int32_t	rq_vers;	/* service protocol version */
15674462Salfred	u_int32_t	rq_proc;	/* the desired procedure */
15774462Salfred	struct opaque_auth rq_cred;	/* raw creds from the wire */
15874462Salfred	void		*rq_clntcred;	/* read only cooked cred */
15974462Salfred	SVCXPRT		*rq_xprt;	/* associated transport */
16074462Salfred};
16174462Salfred
16274462Salfred/*
1631839Swollman *  Approved way of getting address of caller
1641839Swollman */
16574462Salfred#define svc_getrpccaller(x) (&(x)->xp_rtaddr)
1661839Swollman
1671839Swollman/*
1681839Swollman * Operations defined on an SVCXPRT handle
1691839Swollman *
1701839Swollman * SVCXPRT		*xprt;
1711839Swollman * struct rpc_msg	*msg;
1721839Swollman * xdrproc_t		 xargs;
17395658Sdes * void *		 argsp;
1741839Swollman */
1751839Swollman#define SVC_RECV(xprt, msg)				\
1761839Swollman	(*(xprt)->xp_ops->xp_recv)((xprt), (msg))
1771839Swollman#define svc_recv(xprt, msg)				\
1781839Swollman	(*(xprt)->xp_ops->xp_recv)((xprt), (msg))
1791839Swollman
1801839Swollman#define SVC_STAT(xprt)					\
1811839Swollman	(*(xprt)->xp_ops->xp_stat)(xprt)
1821839Swollman#define svc_stat(xprt)					\
1831839Swollman	(*(xprt)->xp_ops->xp_stat)(xprt)
1841839Swollman
1851839Swollman#define SVC_GETARGS(xprt, xargs, argsp)			\
1861839Swollman	(*(xprt)->xp_ops->xp_getargs)((xprt), (xargs), (argsp))
1871839Swollman#define svc_getargs(xprt, xargs, argsp)			\
1881839Swollman	(*(xprt)->xp_ops->xp_getargs)((xprt), (xargs), (argsp))
1891839Swollman
1901839Swollman#define SVC_REPLY(xprt, msg)				\
1911839Swollman	(*(xprt)->xp_ops->xp_reply) ((xprt), (msg))
1921839Swollman#define svc_reply(xprt, msg)				\
1931839Swollman	(*(xprt)->xp_ops->xp_reply) ((xprt), (msg))
1941839Swollman
1951839Swollman#define SVC_FREEARGS(xprt, xargs, argsp)		\
1961839Swollman	(*(xprt)->xp_ops->xp_freeargs)((xprt), (xargs), (argsp))
1971839Swollman#define svc_freeargs(xprt, xargs, argsp)		\
1981839Swollman	(*(xprt)->xp_ops->xp_freeargs)((xprt), (xargs), (argsp))
1991839Swollman
2001839Swollman#define SVC_DESTROY(xprt)				\
2011839Swollman	(*(xprt)->xp_ops->xp_destroy)(xprt)
2021839Swollman#define svc_destroy(xprt)				\
2031839Swollman	(*(xprt)->xp_ops->xp_destroy)(xprt)
2041839Swollman
20574462Salfred#define SVC_CONTROL(xprt, rq, in)			\
20674462Salfred	(*(xprt)->xp_ops2->xp_control)((xprt), (rq), (in))
2071839Swollman
208181344Sdfr#define SVC_EXT(xprt)					\
209181344Sdfr	((SVCXPRT_EXT *) xprt->xp_p3)
210181344Sdfr
211181344Sdfr#define SVC_AUTH(xprt)					\
212181344Sdfr	(SVC_EXT(xprt)->xp_auth)
213181344Sdfr
2141839Swollman/*
215181344Sdfr * Operations defined on an SVCAUTH handle
216181344Sdfr */
217181344Sdfr#define SVCAUTH_WRAP(auth, xdrs, xfunc, xwhere)		\
218181344Sdfr	((auth)->svc_ah_ops->svc_ah_wrap(auth, xdrs, xfunc, xwhere))
219181344Sdfr#define SVCAUTH_UNWRAP(auth, xdrs, xfunc, xwhere)	\
220181344Sdfr	((auth)->svc_ah_ops->svc_ah_unwrap(auth, xdrs, xfunc, xwhere))
221181344Sdfr
222181344Sdfr/*
2231839Swollman * Service registration
2241839Swollman *
22574462Salfred * svc_reg(xprt, prog, vers, dispatch, nconf)
22674462Salfred *	const SVCXPRT *xprt;
22774462Salfred *	const rpcprog_t prog;
22874462Salfred *	const rpcvers_t vers;
229231678Stijl *	const void (*dispatch)(struct svc_req *, SVCXPRT *);
23074462Salfred *	const struct netconfig *nconf;
2311839Swollman */
23274462Salfred
2331903Swollman__BEGIN_DECLS
23493032Simpextern bool_t	svc_reg(SVCXPRT *, const rpcprog_t, const rpcvers_t,
23593032Simp			void (*)(struct svc_req *, SVCXPRT *),
23693032Simp			const struct netconfig *);
2371903Swollman__END_DECLS
2381839Swollman
2391839Swollman/*
2401839Swollman * Service un-registration
2411839Swollman *
24274462Salfred * svc_unreg(prog, vers)
24374462Salfred *	const rpcprog_t prog;
24474462Salfred *	const rpcvers_t vers;
2451839Swollman */
24674462Salfred
2471903Swollman__BEGIN_DECLS
24893032Simpextern void	svc_unreg(const rpcprog_t, const rpcvers_t);
2491903Swollman__END_DECLS
2501839Swollman
2511839Swollman/*
2521839Swollman * Transport registration.
2531839Swollman *
2541839Swollman * xprt_register(xprt)
2551839Swollman *	SVCXPRT *xprt;
2561839Swollman */
2571903Swollman__BEGIN_DECLS
25893032Simpextern void	xprt_register(SVCXPRT *);
2591903Swollman__END_DECLS
2601839Swollman
2611839Swollman/*
2621839Swollman * Transport un-register
2631839Swollman *
2641839Swollman * xprt_unregister(xprt)
2651839Swollman *	SVCXPRT *xprt;
2661839Swollman */
2671903Swollman__BEGIN_DECLS
26893032Simpextern void	xprt_unregister(SVCXPRT *);
2691903Swollman__END_DECLS
2701839Swollman
2711839Swollman
2721839Swollman/*
2731839Swollman * When the service routine is called, it must first check to see if it
2741839Swollman * knows about the procedure;  if not, it should call svcerr_noproc
2758858Srgrimes * and return.  If so, it should deserialize its arguments via
2761839Swollman * SVC_GETARGS (defined above).  If the deserialization does not work,
2771839Swollman * svcerr_decode should be called followed by a return.  Successful
2781839Swollman * decoding of the arguments should be followed the execution of the
2791839Swollman * procedure's code and a call to svc_sendreply.
2801839Swollman *
2811839Swollman * Also, if the service refuses to execute the procedure due to too-
2821839Swollman * weak authentication parameters, svcerr_weakauth should be called.
2831839Swollman * Note: do not confuse access-control failure with weak authentication!
2841839Swollman *
2851839Swollman * NB: In pure implementations of rpc, the caller always waits for a reply
2868858Srgrimes * msg.  This message is sent when svc_sendreply is called.
2871839Swollman * Therefore pure service implementations should always call
2881839Swollman * svc_sendreply even if the function logically returns void;  use
2891839Swollman * xdr.h - xdr_void for the xdr routine.  HOWEVER, tcp based rpc allows
2901839Swollman * for the abuse of pure rpc via batched calling or pipelining.  In the
2911839Swollman * case of a batched call, svc_sendreply should NOT be called since
2921839Swollman * this would send a return message, which is what batching tries to avoid.
2931839Swollman * It is the service/protocol writer's responsibility to know which calls are
2941839Swollman * batched and which are not.  Warning: responding to batch calls may
2951839Swollman * deadlock the caller and server processes!
2961839Swollman */
2971839Swollman
2981903Swollman__BEGIN_DECLS
29995658Sdesextern bool_t	svc_sendreply(SVCXPRT *, xdrproc_t, void *);
30093032Simpextern void	svcerr_decode(SVCXPRT *);
30193032Simpextern void	svcerr_weakauth(SVCXPRT *);
30293032Simpextern void	svcerr_noproc(SVCXPRT *);
30393032Simpextern void	svcerr_progvers(SVCXPRT *, rpcvers_t, rpcvers_t);
30493032Simpextern void	svcerr_auth(SVCXPRT *, enum auth_stat);
30593032Simpextern void	svcerr_noprog(SVCXPRT *);
30693032Simpextern void	svcerr_systemerr(SVCXPRT *);
30793032Simpextern int	rpc_reg(rpcprog_t, rpcvers_t, rpcproc_t,
30893032Simp			char *(*)(char *), xdrproc_t, xdrproc_t,
30993032Simp			char *);
3101903Swollman__END_DECLS
3118858Srgrimes
3121839Swollman/*
3131839Swollman * Lowest level dispatching -OR- who owns this process anyway.
3141839Swollman * Somebody has to wait for incoming requests and then call the correct
3151839Swollman * service routine.  The routine svc_run does infinite waiting; i.e.,
3161839Swollman * svc_run never returns.
317229781Suqs * Since another (co-existent) package may wish to selectively wait for
3181839Swollman * incoming calls or other events outside of the rpc architecture, the
3191839Swollman * routine svc_getreq is provided.  It must be passed readfds, the
3201839Swollman * "in-place" results of a select system call (see select, section 2).
3211839Swollman */
3221839Swollman
3231839Swollman/*
3241839Swollman * Global keeper of rpc service descriptors in use
3258858Srgrimes * dynamic; must be inspected before each call to select
3261839Swollman */
32721059Speterextern int svc_maxfd;
32874462Salfred#ifdef FD_SETSIZE
3291839Swollmanextern fd_set svc_fdset;
3301839Swollman#define svc_fds svc_fdset.fds_bits[0]	/* compatibility */
33174462Salfred#else
33274462Salfredextern int svc_fds;
33374462Salfred#endif /* def FD_SETSIZE */
3341839Swollman
3351839Swollman/*
336181344Sdfr * A set of null auth methods used by any authentication protocols
337181344Sdfr * that don't need to inspect or modify the message body.
338181344Sdfr */
339181344Sdfrextern SVCAUTH _svc_auth_null;
340181344Sdfr
341181344Sdfr/*
3421839Swollman * a small program implemented by the svc_rpc implementation itself;
3431839Swollman * also see clnt.h for protocol numbers.
3441839Swollman */
34574462Salfred__BEGIN_DECLS
34693032Simpextern void rpctest_service(void);
34774462Salfred__END_DECLS
3481839Swollman
3491903Swollman__BEGIN_DECLS
350181344Sdfrextern SVCXPRT *svc_xprt_alloc(void);
351181344Sdfrextern void	svc_xprt_free(SVCXPRT *);
35293032Simpextern void	svc_getreq(int);
35393032Simpextern void	svc_getreqset(fd_set *);
35493032Simpextern void	svc_getreq_common(int);
35574462Salfredstruct pollfd;
35693032Simpextern void	svc_getreq_poll(struct pollfd *, int);
35774462Salfred
35893032Simpextern void	svc_run(void);
35993032Simpextern void	svc_exit(void);
3601903Swollman__END_DECLS
3611839Swollman
3621839Swollman/*
3631839Swollman * Socket to use on svcxxx_create call to get default socket
3641839Swollman */
3651839Swollman#define	RPC_ANYSOCK	-1
36674462Salfred#define RPC_ANYFD	RPC_ANYSOCK
3671839Swollman
3681839Swollman/*
3691839Swollman * These are the existing service side transport implementations
3701839Swollman */
3711839Swollman
37274462Salfred__BEGIN_DECLS
3731839Swollman/*
37474462Salfred * Transport independent svc_create routine.
3751839Swollman */
37693032Simpextern int svc_create(void (*)(struct svc_req *, SVCXPRT *),
37793032Simp			   const rpcprog_t, const rpcvers_t, const char *);
37874462Salfred/*
379231678Stijl *      void (*dispatch)(struct svc_req *, SVCXPRT *);
38074462Salfred *      const rpcprog_t prognum;        -- program number
38174462Salfred *      const rpcvers_t versnum;        -- version number
38274462Salfred *      const char *nettype;            -- network type
38374462Salfred */
3841839Swollman
3851903Swollman
3861839Swollman/*
38774462Salfred * Generic server creation routine. It takes a netconfig structure
38874462Salfred * instead of a nettype.
3891839Swollman */
3901839Swollman
39193032Simpextern SVCXPRT *svc_tp_create(void (*)(struct svc_req *, SVCXPRT *),
39274462Salfred				   const rpcprog_t, const rpcvers_t,
39393032Simp				   const struct netconfig *);
39474462Salfred        /*
395231678Stijl         * void (*dispatch)(struct svc_req *, SVCXPRT *);
39674462Salfred         * const rpcprog_t prognum;       -- program number
39774462Salfred         * const rpcvers_t versnum;       -- version number
39874462Salfred         * const struct netconfig *nconf; -- netconfig structure
39974462Salfred         */
4001903Swollman
40174462Salfred
4021839Swollman/*
40374462Salfred * Generic TLI create routine
4041839Swollman */
40593032Simpextern SVCXPRT *svc_tli_create(const int, const struct netconfig *,
40693032Simp			       const struct t_bind *, const u_int,
40793032Simp			       const u_int);
40874462Salfred/*
40974462Salfred *      const int fd;                   -- connection end point
41074462Salfred *      const struct netconfig *nconf;  -- netconfig structure for network
41174462Salfred *      const struct t_bind *bindaddr;  -- local bind address
41274462Salfred *      const u_int sendsz;             -- max sendsize
41374462Salfred *      const u_int recvsz;             -- max recvsize
41474462Salfred */
4151839Swollman
41621059Speter/*
41774462Salfred * Connectionless and connectionful create routines
41821059Speter */
41974462Salfred
42093032Simpextern SVCXPRT *svc_vc_create(const int, const u_int, const u_int);
42174462Salfred/*
42274462Salfred *      const int fd;                           -- open connection end point
42374462Salfred *      const u_int sendsize;                   -- max send size
42474462Salfred *      const u_int recvsize;                   -- max recv size
42574462Salfred */
42674462Salfred
42784487Swpaul/*
42884487Swpaul * Added for compatibility to old rpc 4.0. Obsoleted by svc_vc_create().
42984487Swpaul */
43093032Simpextern SVCXPRT *svcunix_create(int, u_int, u_int, char *);
43184487Swpaul
43293032Simpextern SVCXPRT *svc_dg_create(const int, const u_int, const u_int);
43374462Salfred        /*
43474462Salfred         * const int fd;                                -- open connection
43574462Salfred         * const u_int sendsize;                        -- max send size
43674462Salfred         * const u_int recvsize;                        -- max recv size
43774462Salfred         */
43874462Salfred
43974462Salfred
44074462Salfred/*
44174462Salfred * the routine takes any *open* connection
44274462Salfred * descriptor as its first input and is used for open connections.
44374462Salfred */
44493032Simpextern SVCXPRT *svc_fd_create(const int, const u_int, const u_int);
44574462Salfred/*
44674462Salfred *      const int fd;                           -- open connection end point
44774462Salfred *      const u_int sendsize;                   -- max send size
44874462Salfred *      const u_int recvsize;                   -- max recv size
44974462Salfred */
45074462Salfred
45174462Salfred/*
45284487Swpaul * Added for compatibility to old rpc 4.0. Obsoleted by svc_fd_create().
45384487Swpaul */
45493032Simpextern SVCXPRT *svcunixfd_create(int, u_int, u_int);
45584487Swpaul
45684487Swpaul/*
45774462Salfred * Memory based rpc (for speed check and testing)
45874462Salfred */
45993032Simpextern SVCXPRT *svc_raw_create(void);
46074462Salfred
46174462Salfred/*
46274462Salfred * svc_dg_enable_cache() enables the cache on dg transports.
46374462Salfred */
46493032Simpint svc_dg_enablecache(SVCXPRT *, const u_int);
46574462Salfred
46690232Sdesint __rpc_get_local_uid(SVCXPRT *_transp, uid_t *_uid);
46774658Salfred
46821059Speter__END_DECLS
46921059Speter
47074462Salfred
47174462Salfred/* for backward compatibility */
47274462Salfred#include <rpc/svc_soc.h>
47374462Salfred
4741903Swollman#endif /* !_RPC_SVC_H */
475