/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
/*
* Portions of this source code were derived from Berkeley 4.3 BSD
* under license from the Regents of the University of California.
*/
/*
* This set of routines implements the rpc message definition,
* its serializer and some common rpc utility routines.
* The routines are meant for various implementations of rpc -
* they are NOT for the rpc client or rpc service implementations!
* Because authentication stuff is easy and is part of rpc, the opaque
* routines are also in this program.
*/
/* * * * * * * * * * * * * * XDR Authentication * * * * * * * * * * * */
/*
* XDR an opaque authentication struct
* (see auth.h)
*/
{
}
return (FALSE);
}
/*
* XDR a DES block
*/
{
}
/* * * * * * * * * * * * * * XDR RPC MESSAGE * * * * * * * * * * * * * * * */
/*
* XDR the MSG_ACCEPTED part of a reply message union
*/
{
/* personalized union, rather than calling xdr_union */
return (FALSE);
return (FALSE);
case SUCCESS:
case PROG_MISMATCH:
return (FALSE);
}
return (TRUE); /* TRUE => open ended set of problems */
}
/*
* XDR the MSG_DENIED part of a reply message union
*/
{
/* personalized union, rather than calling xdr_union */
return (FALSE);
case RPC_MISMATCH:
return (FALSE);
case AUTH_ERROR:
}
return (FALSE);
}
{ MSG_DENIED, xdr_rejected_reply },
};
/*
* XDR a reply message
*/
{
}
}
/*
* stat and rest of reply, copied from xdr_accepted_reply
*/
case SUCCESS:
case PROG_MISMATCH:
return (FALSE);
}
return (TRUE);
}
return (FALSE);
return (xdr_rejected_reply(xdrs,
return (FALSE);
}
} else {
return (FALSE);
}
return (FALSE);
}
return (FALSE);
} else {
}
}
/*
* stat and rest of reply, copied from
* xdr_accepted_reply
*/
return (FALSE);
case SUCCESS:
case PROG_MISMATCH:
return (FALSE);
}
return (TRUE);
}
return (FALSE);
}
/*
* XDR a reply message header (encode only)
*/
{
return (FALSE);
}
}
/*
* stat and rest of reply, copied from xdr_accepted_reply
*/
return (TRUE);
}
return (TRUE);
return (FALSE);
}
/*
* XDR a reply message body (encode only)
*/
{
return (FALSE);
return (TRUE);
}
/*
* Serializes the "static part" of a call message header.
* The fields include: rm_xid, rm_direction, rpcvers, prog, and vers.
* The rm_xid is not really static, but the user can easily munge on the fly.
*/
{
return (FALSE);
}
/* ************************** Client utility routine ************* */
static void
{
switch (acpt_stat) {
case PROG_UNAVAIL:
return;
case PROG_MISMATCH:
return;
case PROC_UNAVAIL:
return;
case GARBAGE_ARGS:
return;
case SYSTEM_ERR:
return;
case SUCCESS:
return;
}
/* something's wrong, but we don't know what ... */
}
static void
{
switch (rjct_stat) {
case RPC_VERSMISMATCH:
return;
case AUTH_ERROR:
return;
}
/* something's wrong, but we don't know what ... */
}
/*
* given a reply message, fills in the error
*/
void
{
/* optimized for normal, SUCCESSful case */
case MSG_ACCEPTED:
return;
};
break;
case MSG_DENIED:
break;
default:
break;
}
case RPC_VERSMISMATCH:
break;
case RPC_AUTHERROR:
break;
case RPC_PROGVERSMISMATCH:
break;
}
}
/*
* given a reply message, frees the accepted verifier
*/
{
}
return (TRUE);
}