head/sys/rpc/rpc_prot.c
/*
 * XDR the MSG_DENIED part of a reply message union
 */
XDR the MSG_DENIED part of a reply message union
XDR the MSG_DENIED part of a reply message union
bool_t 
xdr_rejected_reply(XDR *xdrs, struct rejected_reply *rr)
{
	enum reject_stat *prj_stat;
	enum auth_stat *prj_why;
	assert(xdrs != NULL);
	assert(rr != NULL);
	prj_stat = &rr->rj_stat;
	if (! xdr_enum(xdrs, (enum_t *) prj_stat))
		return (FALSE);
	switch (rr->rj_stat) {
	case RPC_MISMATCH:
		if (! xdr_uint32_t(xdrs, &(rr->rj_vers.low)))
			return (FALSE);
		return (xdr_uint32_t(xdrs, &(rr->rj_vers.high)));
	case AUTH_ERROR:
		prj_why = &rr->rj_why;
		return (xdr_enum(xdrs, (enum_t *) prj_why));
	}
	assert(0);
	return (FALSE);
}
bool_t xdr_rejected_reply ( XDR * xdrs , struct rejected_reply * rr ) { enum reject_stat * prj_stat ; enum auth_stat * prj_why ; assert ( xdrs != NULL ) ; assert ( rr != NULL ) ; prj_stat = & rr -> rj_stat ; if ( ! xdr_enum ( xdrs , ( enum_t * ) prj_stat ) ) return ( FALSE ) ; switch ( rr -> rj_stat ) { case RPC_MISMATCH : if ( ! xdr_uint32_t ( xdrs , & ( rr -> rj_vers . low ) ) ) return ( FALSE ) ; return ( xdr_uint32_t ( xdrs , & ( rr -> rj_vers . high ) ) ) ; case AUTH_ERROR : prj_why = & rr -> rj_why ; return ( xdr_enum ( xdrs , ( enum_t * ) prj_why ) ) ; } assert ( 0 ) ; return ( FALSE ) ; }
XDR the MSG_DENIED part of a reply message union
XDR the MSG_DENIED part of a reply message union
/* personalized union, rather than calling xdr_union */ /* NOTREACHED */