xdrrdma_sizeof.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <rpc/rpc_rdma.h>
static struct xdr_ops *xdrrdma_xops(void);
struct private {
int min_chunk;
int num_chunk;
int inline_len; /* inline buffer length */
};
/* ARGSUSED */
static bool_t
{
return (TRUE);
}
/* ARGSUSED */
static bool_t
{
/*
* min_chunk = 0, means that the stream of bytes, to estimate size of,
* contains no chunks to seperate out. See xdrrdma_putbytes()
*/
return (TRUE);
}
/*
* Chunk item. No impact on xdr size.
*/
return (TRUE);
}
static uint_t
{
}
/* ARGSUSED */
static bool_t
{
/* This is not allowed */
return (FALSE);
}
/* ARGSUSED */
static bool_t
{
switch (request) {
case XDR_RDMASET:
/*
* Set the flags provided in the *info in xp_flags for rdma xdr
* stream control.
*/
return (TRUE);
case XDR_RDMAGET:
/*
* Get the flags provided in xp_flags return through *info
*/
return (TRUE);
default:
return (FALSE);
}
}
/* ARGSUSED */
static rpc_inline_t *
{
if (len == 0) {
return (NULL);
}
return (NULL);
}
return (NULL);
}
/* inline_buf was already allocated, just reuse it */
} else {
/* Free the earlier space and allocate new area */
if (xdrp->inline_buf)
xdrp->inline_len = 0;
return (NULL);
}
}
}
static int
harmless()
{
return (0);
}
static void
{
if (xdrp) {
if (xdrp->inline_buf)
}
}
static bool_t
{
return (TRUE);
}
unsigned int
{
XDR x;
(void) xdrrdma_common(&x, min_chunk);
if (xdrp) {
if (xdrp->inline_buf)
}
}
unsigned int
{
XDR x;
(void) xdrrdma_common(&x, min_chunk);
if (xdrp) {
if (xdrp->inline_buf)
}
}
static struct xdr_ops *
xdrrdma_xops(void)
{
/* to stop ANSI-C compiler from complaining */
#endif
/* the other harmless ones */
return (&ops);
}