/*
* 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 2005 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.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* xdr_stdio.c, XDR implementation on standard i/o file.
*
* This set of routines implements a XDR on a stdio stream.
* XDR_ENCODE serializes onto the stream, XDR_DECODE de-serializes
* from the stream.
*/
#include "mt.h"
#include "rpc_mt.h"
#include <stdio.h>
#include <inttypes.h>
static struct xdr_ops *xdrstdio_ops(void);
/*
* Initialize a stdio xdr stream.
* Sets the xdr stream handle xdrs for use on the stream file.
* Operation flag is set to op.
*/
void
{
}
/*
* Destroy a stdio xdr stream.
* Cleans up the xdr stream handle xdrs previously set up by xdrstdio_create.
*/
static void
{
/* LINTED pointer cast */
/* xx should we close the file ?? */
}
static bool_t
{
/* LINTED pointer cast */
return (FALSE);
return (TRUE);
}
static bool_t
{
/* LINTED pointer cast */
return (FALSE);
return (TRUE);
}
static bool_t
{
int32_t i;
if (!xdrstdio_getint32(xdrs, &i))
return (FALSE);
*lp = (long)i;
return (TRUE);
}
static bool_t
{
int32_t i;
#if defined(_LP64)
return (FALSE);
#endif
return (xdrstdio_putint32(xdrs, &i));
}
static bool_t
{
if ((len != 0) &&
/* LINTED pointer cast */
return (FALSE);
return (TRUE);
}
static bool_t
{
if ((len != 0) &&
/* LINTED pointer cast */
return (FALSE);
return (TRUE);
}
static uint_t
{
/* LINTED pointer cast */
}
static bool_t
{
/* LINTED pointer cast */
}
/* ARGSUSED */
static rpc_inline_t *
{
/*
* Must do some work to implement this: must insure
* enough data in the underlying stdio buffer,
* that the buffer is aligned so that we can indirect through a
* long *, and stuff this pointer in xdrs->x_buf. Doing
* a fread or fwrite to a scratch buffer would defeat
* most of the gains to be had here and require storage
* management on this buffer, so we don't do this.
*/
return (NULL);
}
/* ARGSUSED */
static bool_t
{
return (FALSE);
}
static struct xdr_ops *
xdrstdio_ops(void)
{
/* VARIABLES PROTECTED BY ops_lock: ops */
(void) mutex_lock(&ops_lock);
#if defined(_LP64)
#endif
}
(void) mutex_unlock(&ops_lock);
return (&ops);
}