diff options
author | Roland McGrath <roland@gnu.org> | 1996-07-27 02:04:33 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 1996-07-27 02:04:33 +0000 |
commit | fc933e284e5559f4630cabaa5deb28709b761359 (patch) | |
tree | d723288a6b3a84d25c576c92f0c3690a9c6036bb /sunrpc/rpc/svc.h | |
parent | 7443a5a8a410a02d0e8f6894369ae27d934e5177 (diff) | |
download | glibc-fc933e284e5559f4630cabaa5deb28709b761359.tar glibc-fc933e284e5559f4630cabaa5deb28709b761359.tar.gz glibc-fc933e284e5559f4630cabaa5deb28709b761359.tar.bz2 glibc-fc933e284e5559f4630cabaa5deb28709b761359.zip |
Fri Jul 26 15:24:25 1996 Ulrich Drepper <drepper@cygnus.com>
* sunrpc/rpc/auth.h: Add protection against multiple inclusion
and change K&R prototypes to ANSI prototypes.
* sunrpc/rpc/auth_unix.h: Ditto.
* sunrpc/rpc/clnt.h: Ditto.
* sunrpc/rpc/pmap_clnt.h: Ditto.
* sunrpc/rpc/pmap_prot.h: Ditto.
* sunrpc/rpc/pmap_rmt.h: Ditto.
* sunrpc/rpc/rpc_msg.h: Ditto.
* sunrpc/rpc/svc.h: Ditto.
* sunrpc/rpc/svc_auth.h: Ditto.
* sunrpc/rpc/xdr.h: Ditto.
Fri Jul 26 18:06:58 1996 Ulrich Drepper <drepper@cygnus.com>
* sunrpc/rpc/auth.h: Add __BEGIN_DECLS and __END_DECLS.
* sunrpc/rpc/auth_unix.h: Likewise.
* sunrpc/rpc/clnt.h: Likewise.
* sunrpc/rpc/netdb.h: Likewise.
* sunrpc/rpc/pmap_clnt.h: Likewise.
* sunrpc/rpc/pmap_prot.h: Likewise.
* sunrpc/rpc/rpc_msg.h: Likewise.
* sunrpc/rpc/svc.h: Likewise.
* sunrpc/rpc/svc_auth.h: Likewise.
* sunrpc/rpc/xdr.h: Likewise.
* sunrpc/rpc/pmap_clnt.h: Move definition of type `resultproc_t'
to here from...
* sunrpc/pmap_rmt.c: ...here.
Diffstat (limited to 'sunrpc/rpc/svc.h')
-rw-r--r-- | sunrpc/rpc/svc.h | 76 |
1 files changed, 46 insertions, 30 deletions
diff --git a/sunrpc/rpc/svc.h b/sunrpc/rpc/svc.h index 4f4f546f11..081f9bc327 100644 --- a/sunrpc/rpc/svc.h +++ b/sunrpc/rpc/svc.h @@ -6,23 +6,23 @@ * may copy or modify Sun RPC without charge, but are not authorized * to license or distribute it to anyone else except as part of a product or * program developed by the user. - * + * * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * + * * Sun RPC is provided with no support and without any obligation on the * part of Sun Microsystems, Inc. to assist in its use, correction, * modification or enhancement. - * + * * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC * OR ANY PART THEREOF. - * + * * In no event will Sun Microsystems, Inc. be liable for any lost revenue * or profits or other special, indirect and consequential damages, even if * Sun has been advised of the possibility of such damages. - * + * * Sun Microsystems, Inc. * 2550 Garcia Avenue * Mountain View, California 94043 @@ -37,6 +37,8 @@ #ifndef __SVC_HEADER__ #define __SVC_HEADER__ +__BEGIN_DECLS + /* * This interface must manage two items concerning remote procedure calling: * @@ -151,9 +153,11 @@ struct svc_req { * u_long prog; * u_long vers; * void (*dispatch)(); - * int protocol; like TCP or UDP, zero means do not register + * int protocol; like TCP or UDP, zero means do not register */ -extern bool_t svc_register(); +extern bool_t svc_register __P ((SVCXPRT *__xprt, u_long __prog, + u_long __vers, void (*__dispatch) (), + int __protocol)); /* * Service un-registration @@ -162,7 +166,7 @@ extern bool_t svc_register(); * u_long prog; * u_long vers; */ -extern void svc_unregister(); +extern void svc_unregister __P ((u_long __prog, u_long __vers)); /* * Transport registration. @@ -170,7 +174,7 @@ extern void svc_unregister(); * xprt_register(xprt) * SVCXPRT *xprt; */ -extern void xprt_register(); +extern void xprt_register __P ((SVCXPRT *__xprt)); /* * Transport un-register @@ -178,7 +182,7 @@ extern void xprt_register(); * xprt_unregister(xprt) * SVCXPRT *xprt; */ -extern void xprt_unregister(); +extern void xprt_unregister __P ((SVCXPRT *__xprt)); @@ -186,7 +190,7 @@ extern void xprt_unregister(); /* * When the service routine is called, it must first check to see if it * knows about the procedure; if not, it should call svcerr_noproc - * and return. If so, it should deserialize its arguments via + * and return. If so, it should deserialize its arguments via * SVC_GETARGS (defined above). If the deserialization does not work, * svcerr_decode should be called followed by a return. Successful * decoding of the arguments should be followed the execution of the @@ -197,7 +201,7 @@ extern void xprt_unregister(); * Note: do not confuse access-control failure with weak authentication! * * NB: In pure implementations of rpc, the caller always waits for a reply - * msg. This message is sent when svc_sendreply is called. + * msg. This message is sent when svc_sendreply is called. * Therefore pure service implementations should always call * svc_sendreply even if the function logically returns void; use * xdr.h - xdr_void for the xdr routine. HOWEVER, tcp based rpc allows @@ -209,15 +213,24 @@ extern void xprt_unregister(); * deadlock the caller and server processes! */ -extern bool_t svc_sendreply(); -extern void svcerr_decode(); -extern void svcerr_weakauth(); -extern void svcerr_noproc(); -extern void svcerr_progvers(); -extern void svcerr_auth(); -extern void svcerr_noprog(); -extern void svcerr_systemerr(); - +extern bool_t svc_sendreply __P ((SVCXPRT *xprt, xdrproc_t __xdr_results, + caddr_t __xdr_location)); + +extern void svcerr_decode __P ((SVCXPRT *__xprt)); + +extern void svcerr_weakauth __P ((SVCXPRT *__xprt)); + +extern void svcerr_noproc __P ((SVCXPRT *__xprt)); + +extern void svcerr_progvers __P ((SVCXPRT *__xprt, u_long __low_vers, + u_long __high_vers)); + +extern void svcerr_auth __P ((SVCXPRT *__xprt, enum auth_stat __why)); + +extern void svcerr_noprog __P ((SVCXPRT *__xprt)); + +extern void svcerr_systemerr __P ((SVCXPRT *__xprt)); + /* * Lowest level dispatching -OR- who owns this process anyway. * Somebody has to wait for incoming requests and then call the correct @@ -231,7 +244,7 @@ extern void svcerr_systemerr(); /* * Global keeper of rpc service descriptors in use - * dynamic; must be inspected before each call to select + * dynamic; must be inspected before each call to select */ #ifdef FD_SETSIZE extern fd_set svc_fdset; @@ -246,9 +259,9 @@ extern int svc_fds; */ extern void rpctest_service(); -extern void svc_getreq(); -extern void svc_getreqset(); /* takes fdset instead of int */ -extern void svc_run(); /* never returns */ +extern void svc_getreq __P ((int __rdfds)); +extern void svc_getreqset __P ((fd_set *readfds)); +extern void svc_run __P ((void)) __attribute__ ((noreturn)); /* * Socket to use on svcxxx_create call to get default socket @@ -262,19 +275,22 @@ extern void svc_run(); /* never returns */ /* * Memory based rpc for testing and timing. */ -extern SVCXPRT *svcraw_create(); +extern SVCXPRT *svcraw_create __P ((void)); /* * Udp based rpc. */ -extern SVCXPRT *svcudp_create(); -extern SVCXPRT *svcudp_bufcreate(); +extern SVCXPRT *svcudp_create __P ((int __sock)); +extern SVCXPRT *svcudp_bufcreate __P ((int __sock, u_int __sendsz, + u_int __recvsz)); /* * Tcp based rpc. */ -extern SVCXPRT *svctcp_create(); +extern SVCXPRT *svctcp_create __P ((int __sock, u_int __sendsize, + u_int __recvsize)); +__END_DECLS -#endif !__SVC_HEADER__ +#endif /* !__SVC_HEADER__ */ |