xref: /minix3/lib/libc/rpc/rpc_prot.c (revision 84d9c625bfea59e274550651111ae9edfdc40fbd)
1*84d9c625SLionel Sambuc /*	$NetBSD: rpc_prot.c,v 1.21 2013/03/11 20:19:29 tron Exp $	*/
22fe8fb19SBen Gras 
32fe8fb19SBen Gras /*
4*84d9c625SLionel Sambuc  * Copyright (c) 2010, Oracle America, Inc.
52fe8fb19SBen Gras  *
6*84d9c625SLionel Sambuc  * Redistribution and use in source and binary forms, with or without
7*84d9c625SLionel Sambuc  * modification, are permitted provided that the following conditions are
8*84d9c625SLionel Sambuc  * met:
92fe8fb19SBen Gras  *
10*84d9c625SLionel Sambuc  *     * Redistributions of source code must retain the above copyright
11*84d9c625SLionel Sambuc  *       notice, this list of conditions and the following disclaimer.
12*84d9c625SLionel Sambuc  *     * Redistributions in binary form must reproduce the above
13*84d9c625SLionel Sambuc  *       copyright notice, this list of conditions and the following
14*84d9c625SLionel Sambuc  *       disclaimer in the documentation and/or other materials
15*84d9c625SLionel Sambuc  *       provided with the distribution.
16*84d9c625SLionel Sambuc  *     * Neither the name of the "Oracle America, Inc." nor the names of its
17*84d9c625SLionel Sambuc  *       contributors may be used to endorse or promote products derived
18*84d9c625SLionel Sambuc  *       from this software without specific prior written permission.
192fe8fb19SBen Gras  *
20*84d9c625SLionel Sambuc  *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21*84d9c625SLionel Sambuc  *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22*84d9c625SLionel Sambuc  *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
23*84d9c625SLionel Sambuc  *   FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
24*84d9c625SLionel Sambuc  *   COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
25*84d9c625SLionel Sambuc  *   INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26*84d9c625SLionel Sambuc  *   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
27*84d9c625SLionel Sambuc  *   GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28*84d9c625SLionel Sambuc  *   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
29*84d9c625SLionel Sambuc  *   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
30*84d9c625SLionel Sambuc  *   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31*84d9c625SLionel Sambuc  *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
322fe8fb19SBen Gras  */
332fe8fb19SBen Gras 
342fe8fb19SBen Gras #include <sys/cdefs.h>
352fe8fb19SBen Gras #if defined(LIBC_SCCS) && !defined(lint)
362fe8fb19SBen Gras #if 0
372fe8fb19SBen Gras static char *sccsid = "@(#)rpc_prot.c 1.36 87/08/11 Copyr 1984 Sun Micro";
382fe8fb19SBen Gras static char *sccsid = "@(#)rpc_prot.c	2.3 88/08/07 4.0 RPCSRC";
392fe8fb19SBen Gras #else
40*84d9c625SLionel Sambuc __RCSID("$NetBSD: rpc_prot.c,v 1.21 2013/03/11 20:19:29 tron Exp $");
412fe8fb19SBen Gras #endif
422fe8fb19SBen Gras #endif
432fe8fb19SBen Gras 
442fe8fb19SBen Gras /*
452fe8fb19SBen Gras  * rpc_prot.c
462fe8fb19SBen Gras  *
472fe8fb19SBen Gras  * Copyright (C) 1984, Sun Microsystems, Inc.
482fe8fb19SBen Gras  *
492fe8fb19SBen Gras  * This set of routines implements the rpc message definition,
502fe8fb19SBen Gras  * its serializer and some common rpc utility routines.
512fe8fb19SBen Gras  * The routines are meant for various implementations of rpc -
522fe8fb19SBen Gras  * they are NOT for the rpc client or rpc service implementations!
532fe8fb19SBen Gras  * Because authentication stuff is easy and is part of rpc, the opaque
542fe8fb19SBen Gras  * routines are also in this program.
552fe8fb19SBen Gras  */
562fe8fb19SBen Gras 
572fe8fb19SBen Gras #include "namespace.h"
582fe8fb19SBen Gras 
592fe8fb19SBen Gras #include <sys/param.h>
602fe8fb19SBen Gras 
612fe8fb19SBen Gras #include <assert.h>
622fe8fb19SBen Gras 
632fe8fb19SBen Gras #include <rpc/rpc.h>
642fe8fb19SBen Gras 
652fe8fb19SBen Gras #ifdef __weak_alias
662fe8fb19SBen Gras __weak_alias(xdr_accepted_reply,_xdr_accepted_reply)
672fe8fb19SBen Gras __weak_alias(xdr_callhdr,_xdr_callhdr)
682fe8fb19SBen Gras __weak_alias(xdr_des_block,_xdr_des_block)
692fe8fb19SBen Gras __weak_alias(xdr_opaque_auth,_xdr_opaque_auth)
702fe8fb19SBen Gras __weak_alias(xdr_rejected_reply,_xdr_rejected_reply)
712fe8fb19SBen Gras __weak_alias(xdr_replymsg,_xdr_replymsg)
722fe8fb19SBen Gras #endif
732fe8fb19SBen Gras 
74f14fb602SLionel Sambuc static void accepted(enum accept_stat, struct rpc_err *);
75f14fb602SLionel Sambuc static void rejected(enum reject_stat, struct rpc_err *);
762fe8fb19SBen Gras 
772fe8fb19SBen Gras /* * * * * * * * * * * * * * XDR Authentication * * * * * * * * * * * */
782fe8fb19SBen Gras 
792fe8fb19SBen Gras /*
802fe8fb19SBen Gras  * XDR an opaque authentication struct
812fe8fb19SBen Gras  * (see auth.h)
822fe8fb19SBen Gras  */
832fe8fb19SBen Gras bool_t
xdr_opaque_auth(XDR * xdrs,struct opaque_auth * ap)84f14fb602SLionel Sambuc xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap)
852fe8fb19SBen Gras {
862fe8fb19SBen Gras 
872fe8fb19SBen Gras 	_DIAGASSERT(xdrs != NULL);
882fe8fb19SBen Gras 	_DIAGASSERT(ap != NULL);
892fe8fb19SBen Gras 
902fe8fb19SBen Gras 	if (xdr_enum(xdrs, &(ap->oa_flavor)))
912fe8fb19SBen Gras 		return (xdr_bytes(xdrs, &ap->oa_base,
922fe8fb19SBen Gras 			&ap->oa_length, MAX_AUTH_BYTES));
932fe8fb19SBen Gras 	return (FALSE);
942fe8fb19SBen Gras }
952fe8fb19SBen Gras 
962fe8fb19SBen Gras /*
972fe8fb19SBen Gras  * XDR a DES block
982fe8fb19SBen Gras  */
992fe8fb19SBen Gras bool_t
xdr_des_block(XDR * xdrs,des_block * blkp)100f14fb602SLionel Sambuc xdr_des_block(XDR *xdrs, des_block *blkp)
1012fe8fb19SBen Gras {
1022fe8fb19SBen Gras 
1032fe8fb19SBen Gras 	_DIAGASSERT(xdrs != NULL);
1042fe8fb19SBen Gras 	_DIAGASSERT(blkp != NULL);
1052fe8fb19SBen Gras 
106f14fb602SLionel Sambuc 	return (xdr_opaque(xdrs, (caddr_t)(void *)blkp,
107f14fb602SLionel Sambuc 	    (u_int)sizeof(des_block)));
1082fe8fb19SBen Gras }
1092fe8fb19SBen Gras 
1102fe8fb19SBen Gras /* * * * * * * * * * * * * * XDR RPC MESSAGE * * * * * * * * * * * * * * * */
1112fe8fb19SBen Gras 
1122fe8fb19SBen Gras /*
1132fe8fb19SBen Gras  * XDR the MSG_ACCEPTED part of a reply message union
1142fe8fb19SBen Gras  */
1152fe8fb19SBen Gras bool_t
xdr_accepted_reply(XDR * xdrs,struct accepted_reply * ar)116f14fb602SLionel Sambuc xdr_accepted_reply(XDR *xdrs, struct accepted_reply *ar)
1172fe8fb19SBen Gras {
1182fe8fb19SBen Gras 
1192fe8fb19SBen Gras 	_DIAGASSERT(xdrs != NULL);
1202fe8fb19SBen Gras 	_DIAGASSERT(ar != NULL);
1212fe8fb19SBen Gras 
1222fe8fb19SBen Gras 	/* personalized union, rather than calling xdr_union */
1232fe8fb19SBen Gras 	if (! xdr_opaque_auth(xdrs, &(ar->ar_verf)))
1242fe8fb19SBen Gras 		return (FALSE);
1252fe8fb19SBen Gras 	if (! xdr_enum(xdrs, (enum_t *)(void *)&(ar->ar_stat)))
1262fe8fb19SBen Gras 		return (FALSE);
1272fe8fb19SBen Gras 	switch (ar->ar_stat) {
1282fe8fb19SBen Gras 
1292fe8fb19SBen Gras 	case SUCCESS:
1302fe8fb19SBen Gras 		return ((*(ar->ar_results.proc))(xdrs, ar->ar_results.where));
1312fe8fb19SBen Gras 
1322fe8fb19SBen Gras 	case PROG_MISMATCH:
1332fe8fb19SBen Gras 		if (! xdr_u_int32_t(xdrs, &(ar->ar_vers.low)))
1342fe8fb19SBen Gras 			return (FALSE);
1352fe8fb19SBen Gras 		return (xdr_u_int32_t(xdrs, &(ar->ar_vers.high)));
1362fe8fb19SBen Gras 
1372fe8fb19SBen Gras 	case GARBAGE_ARGS:
1382fe8fb19SBen Gras 	case SYSTEM_ERR:
1392fe8fb19SBen Gras 	case PROC_UNAVAIL:
1402fe8fb19SBen Gras 	case PROG_UNAVAIL:
1412fe8fb19SBen Gras 		break;
1422fe8fb19SBen Gras 	}
1432fe8fb19SBen Gras 	return (TRUE);  /* TRUE => open ended set of problems */
1442fe8fb19SBen Gras }
1452fe8fb19SBen Gras 
1462fe8fb19SBen Gras /*
1472fe8fb19SBen Gras  * XDR the MSG_DENIED part of a reply message union
1482fe8fb19SBen Gras  */
1492fe8fb19SBen Gras bool_t
xdr_rejected_reply(XDR * xdrs,struct rejected_reply * rr)150f14fb602SLionel Sambuc xdr_rejected_reply(XDR *xdrs, struct rejected_reply *rr)
1512fe8fb19SBen Gras {
1522fe8fb19SBen Gras 
1532fe8fb19SBen Gras 	_DIAGASSERT(xdrs != NULL);
1542fe8fb19SBen Gras 	_DIAGASSERT(rr != NULL);
1552fe8fb19SBen Gras 
1562fe8fb19SBen Gras 	/* personalized union, rather than calling xdr_union */
1572fe8fb19SBen Gras 	if (! xdr_enum(xdrs, (enum_t *)(void *)&(rr->rj_stat)))
1582fe8fb19SBen Gras 		return (FALSE);
1592fe8fb19SBen Gras 	switch (rr->rj_stat) {
1602fe8fb19SBen Gras 
1612fe8fb19SBen Gras 	case RPC_MISMATCH:
1622fe8fb19SBen Gras 		if (! xdr_u_int32_t(xdrs, &(rr->rj_vers.low)))
1632fe8fb19SBen Gras 			return (FALSE);
1642fe8fb19SBen Gras 		return (xdr_u_int32_t(xdrs, &(rr->rj_vers.high)));
1652fe8fb19SBen Gras 
1662fe8fb19SBen Gras 	case AUTH_ERROR:
1672fe8fb19SBen Gras 		return (xdr_enum(xdrs, (enum_t *)(void *)&(rr->rj_why)));
1682fe8fb19SBen Gras 	}
1692fe8fb19SBen Gras 	/* NOTREACHED */
1702fe8fb19SBen Gras 	return (FALSE);
1712fe8fb19SBen Gras }
1722fe8fb19SBen Gras 
1732fe8fb19SBen Gras static const struct xdr_discrim reply_dscrm[3] = {
1742fe8fb19SBen Gras 	{ (int)MSG_ACCEPTED, (xdrproc_t)xdr_accepted_reply },
1752fe8fb19SBen Gras 	{ (int)MSG_DENIED, (xdrproc_t)xdr_rejected_reply },
1762fe8fb19SBen Gras 	{ __dontcare__, NULL_xdrproc_t } };
1772fe8fb19SBen Gras 
1782fe8fb19SBen Gras /*
1792fe8fb19SBen Gras  * XDR a reply message
1802fe8fb19SBen Gras  */
1812fe8fb19SBen Gras bool_t
xdr_replymsg(XDR * xdrs,struct rpc_msg * rmsg)182f14fb602SLionel Sambuc xdr_replymsg(XDR *xdrs, struct rpc_msg *rmsg)
1832fe8fb19SBen Gras {
1842fe8fb19SBen Gras 	_DIAGASSERT(xdrs != NULL);
1852fe8fb19SBen Gras 	_DIAGASSERT(rmsg != NULL);
1862fe8fb19SBen Gras 
1872fe8fb19SBen Gras 	if (
1882fe8fb19SBen Gras 	    xdr_u_int32_t(xdrs, &(rmsg->rm_xid)) &&
1892fe8fb19SBen Gras 	    xdr_enum(xdrs, (enum_t *)(void *)&(rmsg->rm_direction)) &&
1902fe8fb19SBen Gras 	    (rmsg->rm_direction == REPLY) )
1912fe8fb19SBen Gras 		return (xdr_union(xdrs, (enum_t *)(void *)&(rmsg->rm_reply.rp_stat),
1922fe8fb19SBen Gras 		   (caddr_t)(void *)&(rmsg->rm_reply.ru), reply_dscrm,
1932fe8fb19SBen Gras 		   NULL_xdrproc_t));
1942fe8fb19SBen Gras 	return (FALSE);
1952fe8fb19SBen Gras }
1962fe8fb19SBen Gras 
1972fe8fb19SBen Gras 
1982fe8fb19SBen Gras /*
1992fe8fb19SBen Gras  * Serializes the "static part" of a call message header.
2002fe8fb19SBen Gras  * The fields include: rm_xid, rm_direction, rpcvers, prog, and vers.
2012fe8fb19SBen Gras  * The rm_xid is not really static, but the user can easily munge on the fly.
2022fe8fb19SBen Gras  */
2032fe8fb19SBen Gras bool_t
xdr_callhdr(XDR * xdrs,struct rpc_msg * cmsg)204f14fb602SLionel Sambuc xdr_callhdr(XDR *xdrs, struct rpc_msg *cmsg)
2052fe8fb19SBen Gras {
2062fe8fb19SBen Gras 
2072fe8fb19SBen Gras 	_DIAGASSERT(xdrs != NULL);
2082fe8fb19SBen Gras 	_DIAGASSERT(cmsg != NULL);
2092fe8fb19SBen Gras 
2102fe8fb19SBen Gras 	cmsg->rm_direction = CALL;
2112fe8fb19SBen Gras 	cmsg->rm_call.cb_rpcvers = RPC_MSG_VERSION;
2122fe8fb19SBen Gras 	if (
2132fe8fb19SBen Gras 	    (xdrs->x_op == XDR_ENCODE) &&
2142fe8fb19SBen Gras 	    xdr_u_int32_t(xdrs, &(cmsg->rm_xid)) &&
2152fe8fb19SBen Gras 	    xdr_enum(xdrs, (enum_t *)(void *)&(cmsg->rm_direction)) &&
2162fe8fb19SBen Gras 	    xdr_u_int32_t(xdrs, &(cmsg->rm_call.cb_rpcvers)) &&
2172fe8fb19SBen Gras 	    xdr_u_int32_t(xdrs, &(cmsg->rm_call.cb_prog)) )
2182fe8fb19SBen Gras 		return (xdr_u_int32_t(xdrs, &(cmsg->rm_call.cb_vers)));
2192fe8fb19SBen Gras 	return (FALSE);
2202fe8fb19SBen Gras }
2212fe8fb19SBen Gras 
2222fe8fb19SBen Gras /* ************************** Client utility routine ************* */
2232fe8fb19SBen Gras 
2242fe8fb19SBen Gras static void
accepted(enum accept_stat acpt_stat,struct rpc_err * error)225f14fb602SLionel Sambuc accepted(enum accept_stat acpt_stat, struct rpc_err *error)
2262fe8fb19SBen Gras {
2272fe8fb19SBen Gras 
2282fe8fb19SBen Gras 	_DIAGASSERT(error != NULL);
2292fe8fb19SBen Gras 
2302fe8fb19SBen Gras 	switch (acpt_stat) {
2312fe8fb19SBen Gras 
2322fe8fb19SBen Gras 	case PROG_UNAVAIL:
2332fe8fb19SBen Gras 		error->re_status = RPC_PROGUNAVAIL;
2342fe8fb19SBen Gras 		return;
2352fe8fb19SBen Gras 
2362fe8fb19SBen Gras 	case PROG_MISMATCH:
2372fe8fb19SBen Gras 		error->re_status = RPC_PROGVERSMISMATCH;
2382fe8fb19SBen Gras 		return;
2392fe8fb19SBen Gras 
2402fe8fb19SBen Gras 	case PROC_UNAVAIL:
2412fe8fb19SBen Gras 		error->re_status = RPC_PROCUNAVAIL;
2422fe8fb19SBen Gras 		return;
2432fe8fb19SBen Gras 
2442fe8fb19SBen Gras 	case GARBAGE_ARGS:
2452fe8fb19SBen Gras 		error->re_status = RPC_CANTDECODEARGS;
2462fe8fb19SBen Gras 		return;
2472fe8fb19SBen Gras 
2482fe8fb19SBen Gras 	case SYSTEM_ERR:
2492fe8fb19SBen Gras 		error->re_status = RPC_SYSTEMERROR;
2502fe8fb19SBen Gras 		return;
2512fe8fb19SBen Gras 
2522fe8fb19SBen Gras 	case SUCCESS:
2532fe8fb19SBen Gras 		error->re_status = RPC_SUCCESS;
2542fe8fb19SBen Gras 		return;
2552fe8fb19SBen Gras 	}
2562fe8fb19SBen Gras 	/* NOTREACHED */
2572fe8fb19SBen Gras 	/* something's wrong, but we don't know what ... */
2582fe8fb19SBen Gras 	error->re_status = RPC_FAILED;
2592fe8fb19SBen Gras 	error->re_lb.s1 = (int32_t)MSG_ACCEPTED;
2602fe8fb19SBen Gras 	error->re_lb.s2 = (int32_t)acpt_stat;
2612fe8fb19SBen Gras }
2622fe8fb19SBen Gras 
2632fe8fb19SBen Gras static void
rejected(enum reject_stat rjct_stat,struct rpc_err * error)264f14fb602SLionel Sambuc rejected(enum reject_stat rjct_stat, struct rpc_err *error)
2652fe8fb19SBen Gras {
2662fe8fb19SBen Gras 
2672fe8fb19SBen Gras 	_DIAGASSERT(error != NULL);
2682fe8fb19SBen Gras 
2692fe8fb19SBen Gras 	switch (rjct_stat) {
2702fe8fb19SBen Gras 	case RPC_MISMATCH:
2712fe8fb19SBen Gras 		error->re_status = RPC_VERSMISMATCH;
2722fe8fb19SBen Gras 		return;
2732fe8fb19SBen Gras 
2742fe8fb19SBen Gras 	case AUTH_ERROR:
2752fe8fb19SBen Gras 		error->re_status = RPC_AUTHERROR;
2762fe8fb19SBen Gras 		return;
2772fe8fb19SBen Gras 	}
2782fe8fb19SBen Gras 	/* something's wrong, but we don't know what ... */
2792fe8fb19SBen Gras 	/* NOTREACHED */
2802fe8fb19SBen Gras 	error->re_status = RPC_FAILED;
2812fe8fb19SBen Gras 	error->re_lb.s1 = (int32_t)MSG_DENIED;
2822fe8fb19SBen Gras 	error->re_lb.s2 = (int32_t)rjct_stat;
2832fe8fb19SBen Gras }
2842fe8fb19SBen Gras 
2852fe8fb19SBen Gras /*
2862fe8fb19SBen Gras  * given a reply message, fills in the error
2872fe8fb19SBen Gras  */
2882fe8fb19SBen Gras void
_seterr_reply(struct rpc_msg * msg,struct rpc_err * error)289f14fb602SLionel Sambuc _seterr_reply(struct rpc_msg *msg, struct rpc_err *error)
2902fe8fb19SBen Gras {
2912fe8fb19SBen Gras 
2922fe8fb19SBen Gras 	_DIAGASSERT(msg != NULL);
2932fe8fb19SBen Gras 	_DIAGASSERT(error != NULL);
2942fe8fb19SBen Gras 
2952fe8fb19SBen Gras 	/* optimized for normal, SUCCESSful case */
2962fe8fb19SBen Gras 	switch (msg->rm_reply.rp_stat) {
2972fe8fb19SBen Gras 
2982fe8fb19SBen Gras 	case MSG_ACCEPTED:
2992fe8fb19SBen Gras 		if (msg->acpted_rply.ar_stat == SUCCESS) {
3002fe8fb19SBen Gras 			error->re_status = RPC_SUCCESS;
3012fe8fb19SBen Gras 			return;
3022fe8fb19SBen Gras 		}
3032fe8fb19SBen Gras 		accepted(msg->acpted_rply.ar_stat, error);
3042fe8fb19SBen Gras 		break;
3052fe8fb19SBen Gras 
3062fe8fb19SBen Gras 	case MSG_DENIED:
3072fe8fb19SBen Gras 		rejected(msg->rjcted_rply.rj_stat, error);
3082fe8fb19SBen Gras 		break;
3092fe8fb19SBen Gras 
3102fe8fb19SBen Gras 	default:
3112fe8fb19SBen Gras 		error->re_status = RPC_FAILED;
3122fe8fb19SBen Gras 		error->re_lb.s1 = (int32_t)(msg->rm_reply.rp_stat);
3132fe8fb19SBen Gras 		break;
3142fe8fb19SBen Gras 	}
3152fe8fb19SBen Gras 	switch (error->re_status) {
3162fe8fb19SBen Gras 
3172fe8fb19SBen Gras 	case RPC_VERSMISMATCH:
3182fe8fb19SBen Gras 		error->re_vers.low = msg->rjcted_rply.rj_vers.low;
3192fe8fb19SBen Gras 		error->re_vers.high = msg->rjcted_rply.rj_vers.high;
3202fe8fb19SBen Gras 		break;
3212fe8fb19SBen Gras 
3222fe8fb19SBen Gras 	case RPC_AUTHERROR:
3232fe8fb19SBen Gras 		error->re_why = msg->rjcted_rply.rj_why;
3242fe8fb19SBen Gras 		break;
3252fe8fb19SBen Gras 
3262fe8fb19SBen Gras 	case RPC_PROGVERSMISMATCH:
3272fe8fb19SBen Gras 		error->re_vers.low = msg->acpted_rply.ar_vers.low;
3282fe8fb19SBen Gras 		error->re_vers.high = msg->acpted_rply.ar_vers.high;
3292fe8fb19SBen Gras 		break;
3302fe8fb19SBen Gras 
3312fe8fb19SBen Gras 	case RPC_FAILED:
3322fe8fb19SBen Gras 	case RPC_SUCCESS:
3332fe8fb19SBen Gras 	case RPC_PROGNOTREGISTERED:
3342fe8fb19SBen Gras 	case RPC_PMAPFAILURE:
3352fe8fb19SBen Gras 	case RPC_UNKNOWNPROTO:
3362fe8fb19SBen Gras 	case RPC_UNKNOWNHOST:
3372fe8fb19SBen Gras 	case RPC_SYSTEMERROR:
3382fe8fb19SBen Gras 	case RPC_CANTDECODEARGS:
3392fe8fb19SBen Gras 	case RPC_PROCUNAVAIL:
3402fe8fb19SBen Gras 	case RPC_PROGUNAVAIL:
3412fe8fb19SBen Gras 	case RPC_TIMEDOUT:
3422fe8fb19SBen Gras 	case RPC_CANTRECV:
3432fe8fb19SBen Gras 	case RPC_CANTSEND:
3442fe8fb19SBen Gras 	case RPC_CANTDECODERES:
3452fe8fb19SBen Gras 	case RPC_CANTENCODEARGS:
3462fe8fb19SBen Gras 	default:
3472fe8fb19SBen Gras 		break;
3482fe8fb19SBen Gras 	}
3492fe8fb19SBen Gras }
350