rpc_prot.c revision 2
2N/A * The contents of this file are subject to the terms of the 2N/A * Common Development and Distribution License, Version 1.0 only 2N/A * (the "License"). You may not use this file except in compliance 2N/A * See the License for the specific language governing permissions 2N/A * and limitations under the License. 2N/A * When distributing Covered Code, include this CDDL HEADER in each 2N/A * If applicable, add the following below this CDDL HEADER, with the 2N/A * fields enclosed by brackets "[]" replaced with your own identifying 2N/A * information: Portions Copyright [yyyy] [name of copyright owner] 2N/A * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 2N/A * Use is subject to license terms. 2N/A/* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */ 2N/A/* All Rights Reserved */ 2N/A * Portions of this source code were derived from Berkeley 2N/A * 4.3 BSD under license from the Regents of the University of 2N/A#
pragma ident "%Z%%M% %I% %E% SMI" 2N/A * This set of routines implements the rpc message definition, 2N/A * its serializer and some common rpc utility routines. 2N/A * The routines are meant for various implementations of rpc - 2N/A * they are NOT for the rpc client or rpc service implementations! 2N/A * Because authentication stuff is easy and is part of rpc, the opaque 2N/A * routines are also in this program. 2N/A/* * * * * * * * * * * * * * XDR Authentication * * * * * * * * * * * */ 2N/A * XDR an opaque authentication struct 2N/A/* * * * * * * * * * * * * * XDR RPC MESSAGE * * * * * * * * * * * * * * * */ 2N/A * XDR the MSG_ACCEPTED part of a reply message union 2N/A /* personalized union, rather than calling xdr_union */ 2N/A return (
TRUE);
/* TRUE => open ended set of problems */ 2N/A * XDR the MSG_DENIED part of a reply message union 2N/A /* personalized union, rather than calling xdr_union */ 2N/A * XDR a reply message 2N/A/* LINTED pointer alignment */ 2N/A/* LINTED pointer alignment */ 2N/A * stat and rest of reply, copied from xdr_accepted_reply 2N/A * stat and rest of reply, copied from 2N/A * xdr_accepted_reply 2N/A * Serializes the "static part" of a call message header. 2N/A * The fields include: rm_xid, rm_direction, rpcvers, prog, and vers. 2N/A * The rm_xid is not really static, but the user can easily munge on the fly. 2N/A/* ************************** Client utility routine ************* */ 2N/A /* something's wrong, but we don't know what ... */ 2N/A /* something's wrong, but we don't know what ... */ 2N/A * given a reply message, fills in the error 2N/A /* optimized for normal, SUCCESSful case */