From b3da5b17a1230139e5e3220e42e882236c44f216 Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Wed, 25 May 2005 12:25:50 +0000 Subject: 2005-05-25 Ralf Corsepius * librpc/include/rpc/svc.h: Partial update from FreeBSD. --- cpukit/librpc/include/rpc/svc.h | 72 +++++++++++------------------------------ 1 file changed, 18 insertions(+), 54 deletions(-) (limited to 'cpukit/librpc/include/rpc') diff --git a/cpukit/librpc/include/rpc/svc.h b/cpukit/librpc/include/rpc/svc.h index 8bceac80a4..33952f5c33 100644 --- a/cpukit/librpc/include/rpc/svc.h +++ b/cpukit/librpc/include/rpc/svc.h @@ -109,15 +109,10 @@ struct svc_req { u_int32_t rq_proc; /* the desired procedure */ struct opaque_auth rq_cred; /* raw creds from the wire */ caddr_t rq_clntcred; /* read only cooked cred */ - SVCXPRT *rq_xprt; /* associated transport */ + SVCXPRT *rq_xprt; /* associated transport */ }; -/* - * Approved way of getting address of caller - */ -#define svc_getcaller(x) (&(x)->xp_raddr) - /* * Operations defined on an SVCXPRT handle * @@ -156,33 +151,6 @@ struct svc_req { #define svc_destroy(xprt) \ (*(xprt)->xp_ops->xp_destroy)(xprt) - -/* - * Service registration - * - * svc_register(xprt, prog, vers, dispatch, protocol) - * SVCXPRT *xprt; - * u_long prog; - * u_long vers; - * void (*dispatch)(); - * int protocol; (like TCP or UDP, zero means do not register) - */ -__BEGIN_DECLS -extern bool_t svc_register (SVCXPRT *, u_long, u_long, - void (*) (struct svc_req *, SVCXPRT *), int); -__END_DECLS - -/* - * Service un-registration - * - * svc_unregister(prog, vers) - * u_long prog; - * u_long vers; - */ -__BEGIN_DECLS -extern void svc_unregister (u_long, u_long); -__END_DECLS - /* * Transport registration. * @@ -204,8 +172,6 @@ extern void xprt_unregister(SVCXPRT *); __END_DECLS - - /* * 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 @@ -289,37 +255,35 @@ __END_DECLS * These are the existing service side transport implementations */ +__BEGIN_DECLS /* - * Memory based rpc for testing and timing. + * Transport independent svc_create routine. */ -__BEGIN_DECLS -extern SVCXPRT *svcraw_create (void); -__END_DECLS - /* - * Udp based rpc. + * Connectionless and connectionful create routines */ -__BEGIN_DECLS -extern SVCXPRT *svcudp_create (int); -extern SVCXPRT *svcudp_bufcreate (int, u_int, u_int); -__END_DECLS +extern SVCXPRT *svc_vc_create(const int, const u_int, const u_int); +/* + * const int fd; -- open connection end point + * const u_int sendsize; -- max send size + * const u_int recvsize; -- max recv size + */ /* - * Tcp based rpc. + * Added for compatibility to old rpc 4.0. Obsoleted by svc_vc_create(). */ -__BEGIN_DECLS -extern SVCXPRT *svctcp_create (int, u_int, u_int); -extern SVCXPRT *svcfd_create (int, u_int, u_int); -__END_DECLS +extern SVCXPRT *svcunix_create(int, u_int, u_int, char *); /* - * AF_UNIX socket based rpc. + * Added for compatibility to old rpc 4.0. Obsoleted by svc_fd_create(). */ -__BEGIN_DECLS -extern SVCXPRT *svcunix_create (int, u_int, u_int, char *); -extern SVCXPRT *svcunixfd_create (int, u_int, u_int); +extern SVCXPRT *svcunixfd_create(int, u_int, u_int); __END_DECLS + +/* for backward compatibility */ +#include + #endif /* !_RPC_SVC_H */ -- cgit v1.2.3