nfs4_xdr.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 <rpcsvc/nfs4_prot.h>
#include "nfs_inet.h"
/*
* XDR routines for NFSv4 ops.
*/
static bool_t
{
}
static bool_t
{
NFS4_FHSIZE));
}
static bool_t
{
return (FALSE);
}
/*
* Common xdr routines for compound. Let the specific op routines handle
* op specific portions of the compound.
*/
static bool_t
{
return (FALSE);
}
return (FALSE);
return (FALSE);
if (objp->ca_isputrootfh)
}
static bool_t
{
return (FALSE);
return (FALSE);
return (FALSE);
return (FALSE);
}
static bool_t
{
}
static bool_t
{
return (FALSE);
}
{
return (FALSE);
return (FALSE);
}
static bool_t
{
return (FALSE);
return (FALSE);
/*
* If the getattr suceeded, proceed and begin to decode the attributes.
*/
char attrvals[sizeof (b_fattr4_t)];
return (FALSE);
sizeof (b_fattr4_t)))
return (FALSE);
#ifdef DEBUG
printf("xdr_b_getattr_res_common: attrlist_len = %d\n",
#endif
/*
* Go through the bitmap and see if the server
* sent us anything.
*/
if (objp->gc_attrlist_len > 0) {
#ifdef DEBUG
int i;
printf("dumping contents of attr buffer\n");
for (i = 0; i < objp->gc_attrlist_len; i++) {
}
#endif
#ifdef DEBUG
printf("xdr_b_getattr_res_common: bitmap1 = %d "
" bitmap2 = %d\n",
#endif
/*
* Start with the first bitmap
*/
if (bitmap1.bm_supported_attrs) {
if (!xdr_b_bitmap4(&mxdrs,
return (FALSE);
}
if (bitmap1.bm_fattr4_type) {
return (FALSE);
}
}
if (bitmap1.bm_fattr4_size) {
if (!xdr_u_longlong_t(&mxdrs,
return (FALSE);
}
if (bitmap1.bm_fattr4_fsid) {
if (!xdr_u_longlong_t(&mxdrs,
return (FALSE);
if (!xdr_u_longlong_t(&mxdrs,
return (FALSE);
}
if (bitmap1.bm_fattr4_filehandle) {
if (!xdr_nfs_bfh4(&mxdrs,
return (FALSE);
}
if (bitmap1.bm_fattr4_fileid) {
if (!xdr_u_longlong_t(&mxdrs,
return (FALSE);
}
}
/*
* Now the second bitmap
*/
if (bitmap2.bm_fattr4_mode) {
return (FALSE);
}
if (bitmap2.bm_fattr4_time_access) {
if (!xdr_longlong_t(&mxdrs,
return (FALSE);
return (FALSE);
}
if (bitmap2.bm_fattr4_time_metadata) {
if (!xdr_longlong_t(&mxdrs,
return (FALSE);
return (FALSE);
}
if (bitmap2.bm_fattr4_time_modify) {
if (!xdr_longlong_t(&mxdrs,
return (FALSE);
return (FALSE);
}
}
}
}
return (TRUE);
}
{
return (FALSE);
return (xdr_b_getattr_res_common(xdrs,
}
{
return (FALSE);
return (FALSE);
return (FALSE);
return (FALSE);
}
{
return (FALSE);
return (FALSE);
return (FALSE);
return (xdr_b_getattr_res_common(xdrs,
}
return (TRUE);
}
{
return (FALSE);
return (FALSE);
return (FALSE);
}
{
return (FALSE);
return (FALSE);
return (FALSE);
return (FALSE);
}
{
return (FALSE);
return (FALSE);
return (FALSE);
return (FALSE);
}
return (TRUE);
}
{
return (FALSE);
return (FALSE);
return (FALSE);
return (FALSE);
return (FALSE);
return (FALSE);
}
static bool_t
{
char attrvals[sizeof (b_fattr4_t)];
return (FALSE);
return (FALSE);
sizeof (b_fattr4_t)))
return (FALSE);
/*
* We are *only* interested in the fileid, so just extract that.
*/
return (FALSE);
return (FALSE);
}
{
return (FALSE);
return (FALSE);
return (FALSE);
return (FALSE);
return (FALSE);
}
return (TRUE);
}
{
return (FALSE);
}
{
return (FALSE);
return (FALSE);
return (FALSE);
return (TRUE);
}