nfs4_attr.h 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.
*/
#ifndef _NFS4_ATTR_H
#define _NFS4_ATTR_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
#define FATTR4_WORD0 32
#define FATTR4_WORD1 0
/*
* Attributes
*/
/*
* Common bitmap4 of file attributes to be gathered
*/
#define NFS4_NTOV_ATTR_MASK ( \
FATTR4_TYPE_MASK | \
FATTR4_SIZE_MASK | \
FATTR4_FSID_MASK | \
FATTR4_MODE_MASK | \
#define NFS4_VATTR_MASK ( \
FATTR4_TYPE_MASK | \
FATTR4_SIZE_MASK | \
FATTR4_FSID_MASK | \
FATTR4_MODE_MASK | \
#define NFS4_PATHCONF_MASK ( \
NFS4_VATTR_MASK | \
/*
* The corresponding AT_MASK
*/
#define NFS4_NTOV_ATTR_AT_MASK ( \
AT_TYPE | \
AT_SIZE | \
AT_FSID | \
AT_NODEID | \
AT_MODE | \
AT_UID | \
AT_GID | \
AT_NLINK | \
AT_ATIME | \
AT_MTIME | \
AT_CTIME | \
AT_RDEV | \
/*
* Common bitmap4 of filesystem attributes to be gathered
*/
#define NFS4_FS_ATTR_MASK ( \
#define NFS4_STATFS_ATTR_MASK ( \
/*
* The corresponding AT_MASK
*/
#define NFS4_FS_ATTR_AT_MASK 0
/*
* Common bitmap4 to gather attr cache state
*/
#define NFS4_NTOV_ATTR_CACHE_MASK ( \
/*
* The corresponding AT_MASK
*/
#define NFS4_NTOV_ATTR_CACHE_AT_MASK ( \
AT_CTIME | \
AT_MTIME | \
#define NFS4_VTON_ATTR_MASK ( \
AT_TYPE | \
AT_MODE | \
AT_UID | \
AT_GID | \
AT_NODEID | \
AT_SIZE | \
AT_NLINK | \
AT_ATIME | \
AT_MTIME | \
AT_CTIME | \
AT_RDEV | \
AT_NBLOCKS | \
#define NFS4_VTON_ATTR_MASK_SET ( \
AT_MODE | \
AT_UID | \
AT_GID | \
AT_SIZE | \
AT_ATIME | \
/* solaris-supported, non-vattr_t per-vnode scoped attrs */
#define NFS4_VP_ATTR_MASK ( \
#define FATTR4_FSINFO_MASK ( \
FATTR4_TYPE_MASK | \
FATTR4_FSID_MASK | \
/*
* These are the support attributes for the NFSv4 server
*/
#define NFS4_SRV_RDDIR_SUPPORTED_ATTRS ( \
FATTR4_TYPE_MASK | \
FATTR4_SIZE_MASK | \
FATTR4_FSID_MASK | \
FATTR4_MODE_MASK | \
)
#define FATTR4_FSID_EQ(a, b) \
#define NFS4_MAXNUM_BITWORDS 2
#define NFS4_MAXNUM_ATTRS 56
union nfs4_attr_u {
};
/*
* Error details when processing the getattr response.
*/
#define NFS4_GETATTR_OP_OK 0
#define NFS4_GETATTR_STATUS_ERR 1
#define NFS4_GETATTR_MANDATTR_ERR 2
#define NFS4_GETATTR_BITMAP_ERR 3
#define NFS4_GETATTR_ATSIZE_ERR 4
#define NFS4_GETATTR_ATUID_ERR 5
#define NFS4_GETATTR_ATGID_ERR 6
#define NFS4_GETATTR_ATATIME_ERR 7
#define NFS4_GETATTR_ATMTIME_ERR 8
#define NFS4_GETATTR_ATCTIME_ERR 9
#define NFS4_GETATTR_RAWDEV_ERR 10
#define NFS4_GETATTR_ATNBLOCK_ERR 11
#define NFS4_GETATTR_MAXFILESIZE_ERR 12
#define NFS4_GETATTR_FHANDLE_ERR 13
#define NFS4_GETATTR_MAXREAD_ERR 14
#define NFS4_GETATTR_MAXWRITE_ERR 15
#define NFS4_GETATTR_NOCACHE_OK 16
typedef struct nfs4_pathconf_info {
unsigned pc4_no_trunc:1;
unsigned pc4_chown_restricted:1;
unsigned pc4_case_insensitive:1;
unsigned pc4_case_preserving:1;
unsigned pc4_xattr_valid:1;
unsigned pc4_xattr_exists:1;
unsigned pc4_link_support:1;
unsigned pc4_symlink_support:1;
unsigned pc4_unique_handles:1;
unsigned pc4_cansettime:1;
unsigned pc4_homogeneous:1;
/*
* Used for client only to process incoming getattr results.
*/
typedef struct nfs4_ga_ext_res {
union {
struct {
char *val;
char data[NFS4_FHSIZE];
} nfs_fh4_alt;
} n4g_fh_u;
/*
* Bitmask with valid fields being:
* ACL4_SUPPORT_ALLOW_ACL
* ACL4_SUPPORT_DENY_ACL
* ACL4_SUPPORT_AUDIT_ACL
* ACL4_SUPPORT_ALARM_ACL
*/
extern bitmap4 rfs4_supported_attrs;
#ifdef __cplusplus
}
#endif
#endif /* _NFS4_ATTR_H */