FreeBSD/sys/rpc/rpc_prot.c
/*
 * 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.
 */
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.
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 .
bool_t
xdr_callhdr(XDR *xdrs, struct rpc_msg *cmsg)
{
	enum msg_type *prm_direction;
	assert(xdrs != NULL);
	assert(cmsg != NULL);
	prm_direction = &cmsg->rm_direction;
	cmsg->rm_direction = CALL;
	cmsg->rm_call.cb_rpcvers = RPC_MSG_VERSION;
	if (
	    (xdrs->x_op == XDR_ENCODE) &&
	    xdr_uint32_t(xdrs, &(cmsg->rm_xid)) &&
	    xdr_enum(xdrs, (enum_t *) prm_direction) &&
	    xdr_uint32_t(xdrs, &(cmsg->rm_call.cb_rpcvers)) &&
	    xdr_uint32_t(xdrs, &(cmsg->rm_call.cb_prog)) )
		return (xdr_uint32_t(xdrs, &(cmsg->rm_call.cb_vers)));
	return (FALSE);
}
bool_t xdr_callhdr ( XDR * xdrs , struct rpc_msg * cmsg ) { enum msg_type * prm_direction ; assert ( xdrs != NULL ) ; assert ( cmsg != NULL ) ; prm_direction = & cmsg -> rm_direction ; cmsg -> rm_direction = CALL ; cmsg -> rm_call . cb_rpcvers = RPC_MSG_VERSION ; if ( ( xdrs -> x_op == XDR_ENCODE ) && xdr_uint32_t ( xdrs , & ( cmsg -> rm_xid ) ) && xdr_enum ( xdrs , ( enum_t * ) prm_direction ) && xdr_uint32_t ( xdrs , & ( cmsg -> rm_call . cb_rpcvers ) ) && xdr_uint32_t ( xdrs , & ( cmsg -> rm_call . cb_prog ) ) ) return ( xdr_uint32_t ( xdrs , & ( cmsg -> rm_call . cb_vers ) ) ) ; return ( FALSE ) ; }
Serializes the "static part" of a call message header.
Serializes the " static part " of a call message header .