From c11cb9a5a967cb61dcf57136a7576abc07c98589 Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Wed, 25 May 2005 13:56:50 +0000 Subject: More updates from FreeBSD. --- cpukit/ChangeLog | 3 +- cpukit/librpc/include/rpc/clnt.h | 61 +++++++--------------------------------- cpukit/librpc/include/rpc/svc.h | 4 +-- cpukit/librpc/src/rpc/svc.c | 6 ++-- 4 files changed, 17 insertions(+), 57 deletions(-) (limited to 'cpukit') diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 3ec1284fbe..911067528d 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,6 +1,7 @@ 2005-05-25 Ralf Corsepius - * librpc/include/rpc/clnt.h, librpc/include/rpc/clnt_soc.h, + * include/rpc/clnt.h, include/rpc/svc.h, + librpc/include/rpc/clnt.h, librpc/include/rpc/clnt_soc.h, src/rpc/clnt_perror.c: More updates from FreeBSD. 2005-05-25 Ralf Corsepius diff --git a/cpukit/librpc/include/rpc/clnt.h b/cpukit/librpc/include/rpc/clnt.h index 8daebd07f3..3ece13c285 100644 --- a/cpukit/librpc/include/rpc/clnt.h +++ b/cpukit/librpc/include/rpc/clnt.h @@ -45,66 +45,28 @@ * 2550 Garcia Avenue * Mountain View, California 94043 * - * from: @(#)clnt.h 1.31 88/02/08 SMI + * from: @(#)clnt.h 1.31 94/04/29 SMI * from: @(#)clnt.h 2.1 88/07/29 4.0 RPCSRC - * $FreeBSD: src/include/rpc/clnt.h,v 1.11 1999/08/27 23:45:03 peter Exp $ + * $FreeBSD: src/include/rpc/clnt.h,v 1.21 2003/01/24 01:47:55 fjoe Exp $ */ /* * clnt.h - Client side remote procedure call interface. * - * Copyright (C) 1984, Sun Microsystems, Inc. + * Copyright (c) 1986-1991,1994-1999 by Sun Microsystems, Inc. + * All rights reserved. */ +/* + * $Id$ + */ + #ifndef _RPC_CLNT_H_ #define _RPC_CLNT_H_ +#include #include #include -/* - * Rpc calls return an enum clnt_stat. This should be looked at more, - * since each implementation is required to live with this (implementation - * independent) list of errors. - */ -enum clnt_stat { - RPC_SUCCESS=0, /* call succeeded */ - /* - * local errors - */ - RPC_CANTENCODEARGS=1, /* can't encode arguments */ - RPC_CANTDECODERES=2, /* can't decode results */ - RPC_CANTSEND=3, /* failure in sending call */ - RPC_CANTRECV=4, /* failure in receiving result */ - RPC_TIMEDOUT=5, /* call timed out */ - /* - * remote errors - */ - RPC_VERSMISMATCH=6, /* rpc versions not compatible */ - RPC_AUTHERROR=7, /* authentication error */ - RPC_PROGUNAVAIL=8, /* program not available */ - RPC_PROGVERSMISMATCH=9, /* program version mismatched */ - RPC_PROCUNAVAIL=10, /* procedure unavailable */ - RPC_CANTDECODEARGS=11, /* decode arguments error */ - RPC_SYSTEMERROR=12, /* generic "other problem" */ - - /* - * callrpc & clnt_create errors - */ - RPC_UNKNOWNHOST=13, /* unknown host name */ - RPC_UNKNOWNPROTO=17, /* unkown protocol */ - - /* - * _ create errors - */ - RPC_PMAPFAILURE=14, /* the pmapper failed in its call */ - RPC_PROGNOTREGISTERED=15, /* remote program is not registered */ - /* - * unspecified error - */ - RPC_FAILED=16 -}; - - /* * Error info. */ @@ -158,6 +120,7 @@ typedef struct __rpc_client { caddr_t cl_private; /* private stuff */ } CLIENT; +#define RPCSMALLMSGSIZE 400 /* a more reasonable packet size */ /* * client side rpc interface ops @@ -348,10 +311,6 @@ struct rpc_createerr { extern struct rpc_createerr rpc_createerr; - -#define UDPMSGSIZE 8800 /* rpc imposed limit on udp msg size */ -#define RPCSMALLMSGSIZE 400 /* a more reasonable packet size */ - /* For backward compatibility */ #include diff --git a/cpukit/librpc/include/rpc/svc.h b/cpukit/librpc/include/rpc/svc.h index 33952f5c33..837dea9cd3 100644 --- a/cpukit/librpc/include/rpc/svc.h +++ b/cpukit/librpc/include/rpc/svc.h @@ -199,11 +199,11 @@ __END_DECLS */ __BEGIN_DECLS -extern bool_t svc_sendreply(SVCXPRT *, xdrproc_t, char *); +extern bool_t svc_sendreply(SVCXPRT *, xdrproc_t, void *); extern void svcerr_decode(SVCXPRT *); extern void svcerr_weakauth(SVCXPRT *); extern void svcerr_noproc(SVCXPRT *); -extern void svcerr_progvers(SVCXPRT *, u_long, u_long); +extern void svcerr_progvers(SVCXPRT *, rpcvers_t, rpcvers_t); extern void svcerr_auth(SVCXPRT *, enum auth_stat); extern void svcerr_noprog(SVCXPRT *); extern void svcerr_systemerr(SVCXPRT *); diff --git a/cpukit/librpc/src/rpc/svc.c b/cpukit/librpc/src/rpc/svc.c index b5c7e27332..bf305bce80 100644 --- a/cpukit/librpc/src/rpc/svc.c +++ b/cpukit/librpc/src/rpc/svc.c @@ -244,7 +244,7 @@ bool_t svc_sendreply( register SVCXPRT *xprt, xdrproc_t xdr_results, - caddr_t xdr_location ) + void *xdr_location ) { struct rpc_msg rply; @@ -355,8 +355,8 @@ svcerr_noprog( void svcerr_progvers( register SVCXPRT *xprt, - u_long low_vers, - u_long high_vers ) + rpcvers_t low_vers, + rpcvers_t high_vers ) { struct rpc_msg rply; -- cgit v1.2.3