nfs.h revision d7334e518c844ea303c302d359e39ee1316a314c
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (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 2008 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 */
#ifndef _NFS_NFS_H
#define _NFS_NFS_H
#pragma ident "%Z%%M% %I% %E% SMI"
/* nfs.h 2.38 88/08/19 SMI */
#include <sys/isa_defs.h>
#ifdef _KERNEL
#endif
#include <rpc/rpc_sztypes.h>
#include <sys/sysmacros.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* Solaris NFS daemons configuration file location
*/
/*
* remote file service numbers
*/
#define NFS_PORT 2049
/*
* Used to determine registration and service handling of versions
*/
extern rpcvers_t nfs_versmin;
extern rpcvers_t nfs_versmax;
/*
* Default delegation setting for the server ==> "on"
*/
#define NFS_SERVER_DELEGATION_DEFAULT (TRUE)
/* Maximum size of data portion of a remote request */
#define NFS_MAXDATA 8192
#define NFS_MAXNAMLEN 255
#define NFS_MAXPATHLEN 1024
/*
* Rpc retransmission parameters
*/
/*
* The value of UID_NOBODY/GID_NOBODY presented to the world via NFS.
* UID_NOBODY/GID_NOBODY is translated to NFS_UID_NOBODY/NFS_GID_NOBODY
* when being sent out over the network and NFS_UID_NOBODY/NFS_GID_NOBODY
* is translated to UID_NOBODY/GID_NOBODY when received.
*/
#define NFS_UID_NOBODY -2
#define NFS_GID_NOBODY -2
/*
* maximum transfer size for different interfaces
*/
#define ECTSIZE 2048
#define IETSIZE 8192
/*
* WebNFS error status
*/
enum wnfsstat {
};
/*
* Error status
* Should include all possible net errors.
* For now we just cast errno into an enum nfsstat.
*/
enum nfsstat {
NFS_OK = 0, /* no error */
};
/*
* File types
*/
enum nfsftype {
NFREG, /* regular file */
NFDIR, /* directory */
NFBLK, /* block special */
NFCHR, /* character special */
NFLNK, /* symbolic link */
NFSOC /* socket */
};
/*
* Macros for converting device numbers to and from the format
* SunOS 4.x used. SVR4 uses 14 bit majors and 18 bits minors,
* SunOS 4.x used 8 bit majors and 8 bit minors. It isn't sufficient
* to use the cmpdev() and expdev() macros because they only compress
* 7 bit (and smaller) majors. We must compress 8 bit majors too.
* If the major or minor exceeds 8 bits, then we send it out in
* full 32 bit format and hope that the peer can deal with it.
*/
/*
* Convert to over-the-wire device number format
*/
#define nfsv2_cmpdev(x) \
((uint32_t) \
/*
* Convert from over-the-wire format to SVR4 device number format
*/
#define nfsv2_expdev(x) \
/*
* Special kludge for fifos (named pipes) [to adhere to NFS Protocol Spec]
*
* VFIFO is not in the protocol spec (VNON will be replaced by VFIFO)
* so the over-the-wire representation is VCHR with a '-1' device number.
*
* NOTE: This kludge becomes unnecessary with the Protocol Revision,
* but it may be necessary to support it (backwards compatibility).
*/
#define NFS_FIFO_TYPE NFCHR
#define NFS_FIFO_MODE S_IFCHR
/* identify fifo in nfs attributes */
/* set fifo in nfs attributes */
#define NA_SETFIFO(NA) { \
}
/*
* Check for time overflow using a kernel tunable to determine whether
* we should accept or reject an unsigned 32-bit time value. Time value in NFS
* v2/3 protocol is unsigned 32 bit, but ILP32 kernel only allows 31 bits.
* In nfsv4, time value is a signed 64 bit, so needs to be checked for
* overflow as well (e.g. for setattr). So define the tunable as follows:
* nfs_allow_preepoch_time is TRUE if pre-epoch (negative) times are allowed
* and is FALSE (the default) otherwise. For nfsv2/3 this means that
* if negative times are allowed, the uint32_t time value is interpreted
* as a signed int, otherwise as a large positive number. For nfsv4,
* we use the value as is - except that if negative times are not allowed,
* we will not accept a negative value otw.
*
* So for nfsv2/3 (uint32_t):
*
* If nfs_allow_preepoch_time is
* FALSE, the maximum time value is INT32_MAX for 32-bit kernels and
* UINT32_MAX for 64-bit kernels (to allow times larger than 2038)
* and the minimum is zero. Note that in that case, a 32-bit application
* running on a 64-bit kernel will not be able to access files with
* the larger time values.
* If nfs_allow_preepoch_time is TRUE, the maximum time value is INT32_MAX
* for both kernel configurations and the minimum is INT32_MIN.
*
* And for nfsv4 (int64_t):
*
* nfsv4 allows for negative values in the protocol, and has a 64-bit
* time field, so nfs_allow_preepoch_time can be ignored.
*/
#ifdef _KERNEL
extern bool_t nfs_allow_preepoch_time;
#ifdef _LP64
/*
* If no negative otw values are allowed, may use the full 32-bits of the
* time to represent time later than 2038, by presenting the value as an
* unsigned (but this can only be used by 64-bit apps due to cstat32
* restrictions). If negative values are allowed, cannot represent times
* after 2038. Either way, all 32 bits have a valid representation.
*/
/* Check if nfstime4 seconds (int64_t) can be stored in the system time */
/*
* check if a time_t (int64_t) is ok when preepoch times are allowed -
* nfsv2/3: every 32-bit value is accepted, but can't overflow 64->32.
* nfsv4: every value is valid.
*/
#define NFS_PREEPOCH_TIME_T_OK(tt) \
/*
* check if a time_t (int64_t) is ok when preepoch times are not allowed -
* nfsv2/3: every positive 32-bit value is accepted, but can't overflow 64->32.
* nfsv4: every value is valid.
*/
#define NFS_NO_PREEPOCH_TIME_T_OK(tt) \
#else /* not _LP64 */
/*
* Cannot represent times after 2038 in a 32-bit kernel, but we may wish to
* restrict the use of negative values (which violate the protocol).
* So if negative times allowed, all uint32 time values are valid. Otherwise
* only those which are less than INT32_MAX (msb=0).
*
* NFSv4 uses int64_t for the time, so in a 32-bit kernel the nfsv4 value
* must fit in an int32_t.
*/
/* Only allow signed 32-bit time values */
/* Check if an nfstime4 (int64_t) can be stored in the system time */
#define NFS4_TIME_OK(tt) \
/*
* check if a time_t (int32_t) is ok when preepoch times are allowed -
* every 32-bit value is accepted
*/
/*
* check if a time_t (int32_t) is ok when preepoch times are not allowed -
* only positive values are accepted.
*/
#endif /* _LP64 */
/* Check if an nfstime3 (uint32_t) can be stored in the system time */
#define NFS3_TIME_OK(tt) \
/* Check if an nfs2_timeval (uint32_t) can be stored in the system time. */
#define NFS2_TIME_OK(tt) \
/*
* Test if time_t (signed long) can be sent over the wire - for v2/3 only if:
* 1. The time value can fit in a uint32_t; and
* 2. Either the time value is positive or allow preepoch times.
* No restrictions for nfsv4.
*/
#define NFS_TIME_T_OK(tt) \
/* Test if all attr times are valid */
#define NFS_VAP_TIME_OK(vap) \
/*
* To extend the sign or not extend the sign, that is the question.
* Note: The correct way is to code a macro:
* #define NFS_TIME_T_CONVERT(tt) \
* (nfs_allow_preepoch_time ? (int32_t)(tt) : (uint32_t)(tt))
* But the 64-bit compiler does not extend the sign in that case (why?)
* so we'll do it the ugly way...
*/
if (nfs_allow_preepoch_time) { \
} else { \
}
/* macro to check for overflowed time attribute fields - version 3 */
#define NFS3_FATTR_TIME_OK(attrs) \
/* macro to check for overflowed time attribute fields - version 2 */
#define NFS2_FATTR_TIME_OK(attrs) \
/* Check that a size3 value is not overflowed */
#endif /* _KERNEL */
/*
* Size of an fhandle in bytes
*/
#define NFS_FHSIZE 32
struct nfs_fid {
char nf_data[NFS_FHSIZE];
};
/*
* "Legacy" filehandles use NFS_FHMAXDATA (10) byte fids. Filesystems that
* return a larger fid than NFS_FHMAXDATA, such as ZFS's .zfs snapshot
* directory, can use up to (((64 - 8) / 2) - 2) bytes for their fid.
* This currently holds for both NFSv3 and NFSv4.
*/
#define NFS_FHMAXDATA 10
#define NFS_FH3MAXDATA 26
#define NFS_FH4MAXDATA 26
/*
* The original nfs file handle size for version 3 was 32 which was
* the same in version 2; now we're making it bigger to to deal with
* ZFS snapshot FIDs.
*
* If the size of fhandle3_t changes or if Version 3 uses some other
* filehandle format, this constant may need to change.
*/
#define NFS3_OLDFHSIZE 32
#define NFS3_MAXFHSIZE 64
/*
* This is the actual definition of a legacy filehandle. There is some
* dependence on this layout in NFS-related code, particularly in the
* user-level lock manager, so be careful about changing it.
*
* Currently only NFSv2 uses this structure.
*/
typedef struct svcfh {
} fhandle_t;
/*
* This is the in-memory structure for an NFSv3 extended filehandle.
*/
typedef struct {
} fhandle3_t;
/*
* This is the in-memory structure for an NFSv4 extended filehandle.
*/
typedef struct {
} fhandle4_t;
/*
* Arguments to remote write and writecache
*/
/*
* The `over the wire' representation of the first four arguments.
*/
struct otw_nfswriteargs {
};
struct nfswriteargs {
char *wa_data; /* data to write (up to NFS_MAXDATA) */
};
/*
* NFS timeval struct using unsigned int as specified in V2 protocol.
* tv_sec and tv_usec used to match existing code.
*/
struct nfs2_timeval {
};
typedef struct nfs2_timeval nfs2_timeval;
/*
* File attributes
*/
struct nfsfattr {
};
/*
* Arguments to remote read
*/
struct nfsreadargs {
};
/*
* Status OK portion of remote read reply
*/
struct nfsrrok {
char *rrok_data; /* data (up to NFS_MAXDATA bytes) */
};
/*
* Reply from remote read
*/
struct nfsrdresult {
union {
} rr_u;
};
/*
* File attributes which can be set
*/
struct nfssattr {
};
/*
* Reply status with file attributes
*/
struct nfsattrstat {
union {
} ns_u;
};
/*
* NFS_OK part of read sym link reply union
*/
struct nfssrok {
char *srok_data; /* string (up to NFS_MAXPATHLEN bytes) */
};
/*
* Result of reading symbolic link
*/
struct nfsrdlnres {
union {
} rl_u;
};
/*
* Arguments to readdir
*/
struct nfsrddirargs {
};
/*
* NFS_OK part of readdir result
*/
struct nfsrdok {
};
/*
* Readdir result
*/
struct nfsrddirres {
union {
} rd_u;
};
/*
* Arguments for directory operations
*/
struct nfsdiropargs {
char *da_name; /* name (up to NFS_MAXNAMLEN bytes) */
int da_flags; /* flags, see below */
};
#define DA_FREENAME 1
/*
* NFS_OK part of directory operation result
*/
struct nfsdrok {
};
/*
* Results from directory operation
*/
struct nfsdiropres {
union {
} dr_u;
};
/*
* arguments to setattr
*/
struct nfssaargs {
};
/*
* arguments to create and mkdir
*/
struct nfscreatargs {
};
/*
* arguments to link
*/
struct nfslinkargs {
};
/*
* arguments to rename
*/
struct nfsrnmargs {
};
/*
* arguments to symlink
*/
struct nfsslargs {
char *sla_tnm; /* new name */
int sla_tnm_flags; /* flags for name */
};
#define SLA_FREETNM 1
/*
* NFS_OK part of statfs operation
*/
struct nfsstatfsok {
};
/*
* Results of statfs operation
*/
struct nfsstatfs {
union {
} fs_u;
};
#ifdef _KERNEL
/*
* XDR routines for handling structures defined above
*/
#ifdef _LITTLE_ENDIAN
#endif
#ifdef _LITTLE_ENDIAN
#endif
#endif
/*
* Remote file service routines
*/
#define RFS_NULL 0
#define RFS_GETATTR 1
#define RFS_SETATTR 2
#define RFS_ROOT 3
#define RFS_LOOKUP 4
#define RFS_READLINK 5
#define RFS_READ 6
#define RFS_WRITECACHE 7
#define RFS_WRITE 8
#define RFS_CREATE 9
#define RFS_REMOVE 10
#define RFS_RENAME 11
#define RFS_LINK 12
#define RFS_SYMLINK 13
#define RFS_MKDIR 14
#define RFS_RMDIR 15
#define RFS_READDIR 16
#define RFS_STATFS 17
#define RFS_NPROC 18
#ifdef _KERNEL
/*
* The NFS Version 2 service procedures
*/
struct exportinfo; /* defined in nfs/export.h */
struct servinfo; /* defined in nfs/nfs_clnt.h */
struct mntinfo; /* defined in nfs/nfs_clnt.h */
extern void *rfs_getattr_getfh(fhandle_t *);
extern void *rfs_setattr_getfh(struct nfssaargs *);
extern void *rfs_lookup_getfh(struct nfsdiropargs *);
extern void *rfs_readlink_getfh(fhandle_t *);
extern void rfs_rlfree(struct nfsrdlnres *);
extern void *rfs_read_getfh(struct nfsreadargs *);
extern void rfs_rdfree(struct nfsrdresult *);
extern void *rfs_write_getfh(struct nfswriteargs *);
extern void *rfs_create_getfh(struct nfscreatargs *);
extern void *rfs_remove_getfh(struct nfsdiropargs *);
extern void *rfs_rename_getfh(struct nfsrnmargs *);
extern void *rfs_link_getfh(struct nfslinkargs *);
extern void *rfs_symlink_getfh(struct nfsslargs *);
extern void *rfs_mkdir_getfh(struct nfscreatargs *);
extern void *rfs_rmdir_getfh(struct nfsdiropargs *);
extern void *rfs_readdir_getfh(struct nfsrddirargs *);
extern void rfs_rddirfree(struct nfsrddirres *);
extern void *rfs_statfs_getfh(fhandle_t *);
extern void rfs_srvrinit(void);
extern void rfs_srvrfini(void);
/*
* flags to define path types during Multi Component Lookups
* using the public filehandle
*/
/* function defs for NFS kernel */
extern int nfs_waitfor_purge_complete(vnode_t *);
extern void nfs_purge_rddir_cache(vnode_t *);
extern void nfs_async_manager(struct vfs *);
extern void nfs_async_manager_stop(struct vfs *);
extern void nfs_async_stop(struct vfs *);
extern int nfs_async_stop_sig(struct vfs *);
extern int nfs_clntinit(void);
extern void nfs_clntfini(void);
extern int nfstsize(void);
extern int nfs_srvinit(void);
extern void nfs_srvfini(void);
extern int newnum(void);
extern char *newname(void);
extern int nfs_atoi(char *);
extern int nfs_subrinit(void);
extern void nfs_subrfini(void);
extern int nfsinit(int, char *);
extern void nfsfini(void);
extern int nfs_vfsinit(void);
extern void nfs_vfsfini(void);
caller_context_t *);
extern int mount_root(char *, char *, int, struct nfs_args *, int *);
extern void nfsauth_init();
extern void nfsauth_fini();
extern boolean_t nfs_has_ctty(void);
extern void nfs_srv_stop_all(void);
extern void nfs_srv_quiesce_all(void);
extern void (*nfs_srv_quiesce_func)(void);
extern int rfs4_dss_setpaths(char *, size_t);
extern int (*nfs_srv_dss_func)(char *, size_t);
extern time_t rfs4_lease_time;
extern time_t rfs4_grace_period;
extern kstat_named_t *global_svstat_ptr[];
extern kstat_named_t *rfsproccnt_v2_ptr;
extern kmutex_t nfs_minor_lock;
extern int nfs_major;
extern int nfs_minor;
extern vfsops_t *nfs_vfsops;
extern struct vnodeops *nfs_vnodeops;
extern const struct fs_operation_def nfs_vnodeops_template[];
extern int nfsfstyp;
/*
* Per-zone stats as consumed by nfsstat(1m)
*/
struct nfs_version_stats {
};
/*
* A bit of asymmetry: nfs:0:nfs_client isn't part of this structure.
*/
struct nfs_stats {
struct nfs_version_stats nfs_stats_v2;
struct nfs_version_stats nfs_stats_v3;
struct nfs_version_stats nfs_stats_v4;
};
/*
* Key used to retrieve counters.
*/
extern zone_key_t nfsstat_zone_key;
/*
* Zone callback functions.
*/
extern void *nfsstat_zone_init(zoneid_t);
extern void nfsstat_zone_fini(zoneid_t, void *);
#endif /* _KERNEL */
/*
* Version 3 declarations and definitions.
*/
#define NFS3_FHSIZE 64
#define NFS3_COOKIEVERFSIZE 8
#define NFS3_CREATEVERFSIZE 8
#define NFS3_WRITEVERFSIZE 8
typedef char *filename3;
typedef char *nfspath3;
#define nfs3nametoolong ((char *)-1)
/*
* These three are really opaque arrays, but we treat them as
* uint64 for efficiency sake
*/
typedef uint64 cookieverf3;
typedef uint64 createverf3;
typedef uint64 writeverf3;
typedef struct nfs_fh3 {
union nfs_fh3_u {
struct nfs_fh3_i {
} nfs_fh3_i;
char data[NFS3_FHSIZE];
} fh3_u;
} nfs_fh3;
/*
* nfs_fh3.fh3_flags values
*/
/*
* Two elements were added to the
* diropargs3 structure for performance (xdr-inlining).
* They are not included as part of the args
* that are encoded or decoded:
* dirp - ptr to the nfs_fh3
* flag indicating when to free the name that was
* allocated during decode.
*/
struct diropargs3 {
int flags;
};
typedef struct diropargs3 diropargs3;
struct nfstime3 {
};
struct specdata3 {
};
enum nfsstat3 {
NFS3_OK = 0,
NFS3ERR_PERM = 1,
NFS3ERR_NOENT = 2,
NFS3ERR_IO = 5,
NFS3ERR_NXIO = 6,
NFS3ERR_ACCES = 13,
NFS3ERR_EXIST = 17,
NFS3ERR_XDEV = 18,
NFS3ERR_NODEV = 19,
NFS3ERR_NOTDIR = 20,
NFS3ERR_ISDIR = 21,
NFS3ERR_INVAL = 22,
NFS3ERR_FBIG = 27,
NFS3ERR_NOSPC = 28,
NFS3ERR_ROFS = 30,
NFS3ERR_MLINK = 31,
NFS3ERR_NAMETOOLONG = 63,
NFS3ERR_NOTEMPTY = 66,
NFS3ERR_DQUOT = 69,
NFS3ERR_STALE = 70,
NFS3ERR_REMOTE = 71,
NFS3ERR_BADHANDLE = 10001,
NFS3ERR_NOT_SYNC = 10002,
NFS3ERR_BAD_COOKIE = 10003,
NFS3ERR_NOTSUPP = 10004,
NFS3ERR_TOOSMALL = 10005,
NFS3ERR_SERVERFAULT = 10006,
NFS3ERR_BADTYPE = 10007,
NFS3ERR_JUKEBOX = 10008
};
enum ftype3 {
NF3REG = 1,
NF3DIR = 2,
NF3BLK = 3,
NF3CHR = 4,
NF3LNK = 5,
NF3SOCK = 6,
NF3FIFO = 7
};
struct fattr3 {
};
#define NFS3_SIZEOF_FATTR3 (21)
#ifdef _KERNEL
struct fattr3_res {
};
typedef struct fattr3_res fattr3_res;
#endif /* _KERNEL */
struct post_op_attr {
};
typedef struct post_op_attr post_op_attr;
#ifdef _KERNEL
struct post_op_vattr {
};
typedef struct post_op_vattr post_op_vattr;
#endif /* _KERNEL */
struct wcc_attr {
};
struct pre_op_attr {
};
typedef struct pre_op_attr pre_op_attr;
struct wcc_data {
};
struct post_op_fh3 {
};
typedef struct post_op_fh3 post_op_fh3;
enum time_how {
DONT_CHANGE = 0,
SET_TO_SERVER_TIME = 1,
};
struct set_mode3 {
};
struct set_uid3 {
};
struct set_gid3 {
};
struct set_size3 {
};
struct set_atime {
};
struct set_mtime {
};
struct sattr3 {
};
/*
* A couple of defines to make resok and resfail look like the
* correct things in a response type independent manner.
*/
struct GETATTR3args {
};
typedef struct GETATTR3args GETATTR3args;
struct GETATTR3resok {
};
typedef struct GETATTR3resok GETATTR3resok;
struct GETATTR3res {
union {
} res_u;
};
typedef struct GETATTR3res GETATTR3res;
#ifdef _KERNEL
struct GETATTR3vres {
};
typedef struct GETATTR3vres GETATTR3vres;
#endif /* _KERNEL */
struct sattrguard3 {
};
typedef struct sattrguard3 sattrguard3;
struct SETATTR3args {
};
typedef struct SETATTR3args SETATTR3args;
struct SETATTR3resok {
};
typedef struct SETATTR3resok SETATTR3resok;
struct SETATTR3resfail {
};
typedef struct SETATTR3resfail SETATTR3resfail;
struct SETATTR3res {
union {
} res_u;
};
typedef struct SETATTR3res SETATTR3res;
struct LOOKUP3args {
};
typedef struct LOOKUP3args LOOKUP3args;
struct LOOKUP3resok {
};
typedef struct LOOKUP3resok LOOKUP3resok;
struct LOOKUP3resfail {
};
typedef struct LOOKUP3resfail LOOKUP3resfail;
struct LOOKUP3res {
union {
} res_u;
};
typedef struct LOOKUP3res LOOKUP3res;
#ifdef _KERNEL
struct LOOKUP3vres {
};
typedef struct LOOKUP3vres LOOKUP3vres;
#endif /* _KERNEL */
struct ACCESS3args {
};
typedef struct ACCESS3args ACCESS3args;
#define ACCESS3_READ 0x1
#define ACCESS3_LOOKUP 0x2
#define ACCESS3_MODIFY 0x4
#define ACCESS3_EXTEND 0x8
#define ACCESS3_DELETE 0x10
#define ACCESS3_EXECUTE 0x20
struct ACCESS3resok {
};
typedef struct ACCESS3resok ACCESS3resok;
struct ACCESS3resfail {
};
typedef struct ACCESS3resfail ACCESS3resfail;
struct ACCESS3res {
union {
} res_u;
};
typedef struct ACCESS3res ACCESS3res;
struct READLINK3args {
};
typedef struct READLINK3args READLINK3args;
struct READLINK3resok {
};
typedef struct READLINK3resok READLINK3resok;
struct READLINK3resfail {
};
typedef struct READLINK3resfail READLINK3resfail;
struct READLINK3res {
union {
} res_u;
};
typedef struct READLINK3res READLINK3res;
struct READ3args {
};
struct READ3resok {
struct {
char *data_val;
} data;
};
typedef struct READ3resok READ3resok;
struct READ3resfail {
};
typedef struct READ3resfail READ3resfail;
struct READ3res {
union {
} res_u;
};
#ifdef _KERNEL
/*
* READ3 reply that directly decodes fattr3 directly into vattr
*/
struct READ3vres {
struct post_op_vattr pov;
struct {
char *data_val;
} data;
};
#endif /* _KERNEL */
/*
* READ3 reply that uiomoves data directly into a struct uio
* ignores any attributes returned
*/
struct READ3uiores {
};
typedef struct READ3uiores READ3uiores;
enum stable_how {
UNSTABLE = 0,
DATA_SYNC = 1,
FILE_SYNC = 2
};
typedef enum stable_how stable_how;
struct WRITE3args {
struct {
char *data_val;
} data;
};
typedef struct WRITE3args WRITE3args;
struct WRITE3resok {
};
typedef struct WRITE3resok WRITE3resok;
struct WRITE3resfail {
};
typedef struct WRITE3resfail WRITE3resfail;
struct WRITE3res {
union {
} res_u;
};
enum createmode3 {
UNCHECKED = 0,
GUARDED = 1,
EXCLUSIVE = 2
};
typedef enum createmode3 createmode3;
struct createhow3 {
union {
} createhow3_u;
};
typedef struct createhow3 createhow3;
struct CREATE3args {
};
typedef struct CREATE3args CREATE3args;
struct CREATE3resok {
};
typedef struct CREATE3resok CREATE3resok;
struct CREATE3resfail {
};
typedef struct CREATE3resfail CREATE3resfail;
struct CREATE3res {
union {
} res_u;
};
typedef struct CREATE3res CREATE3res;
struct MKDIR3args {
};
typedef struct MKDIR3args MKDIR3args;
struct MKDIR3resok {
};
typedef struct MKDIR3resok MKDIR3resok;
struct MKDIR3resfail {
};
typedef struct MKDIR3resfail MKDIR3resfail;
struct MKDIR3res {
union {
} res_u;
};
struct symlinkdata3 {
};
typedef struct symlinkdata3 symlinkdata3;
struct SYMLINK3args {
};
typedef struct SYMLINK3args SYMLINK3args;
struct SYMLINK3resok {
};
typedef struct SYMLINK3resok SYMLINK3resok;
struct SYMLINK3resfail {
};
typedef struct SYMLINK3resfail SYMLINK3resfail;
struct SYMLINK3res {
union {
} res_u;
};
typedef struct SYMLINK3res SYMLINK3res;
struct devicedata3 {
};
typedef struct devicedata3 devicedata3;
struct mknoddata3 {
union {
} mknoddata3_u;
};
typedef struct mknoddata3 mknoddata3;
struct MKNOD3args {
};
typedef struct MKNOD3args MKNOD3args;
struct MKNOD3resok {
};
typedef struct MKNOD3resok MKNOD3resok;
struct MKNOD3resfail {
};
typedef struct MKNOD3resfail MKNOD3resfail;
struct MKNOD3res {
union {
} res_u;
};
struct REMOVE3args {
};
typedef struct REMOVE3args REMOVE3args;
struct REMOVE3resok {
};
typedef struct REMOVE3resok REMOVE3resok;
struct REMOVE3resfail {
};
typedef struct REMOVE3resfail REMOVE3resfail;
struct REMOVE3res {
union {
} res_u;
};
typedef struct REMOVE3res REMOVE3res;
struct RMDIR3args {
};
typedef struct RMDIR3args RMDIR3args;
struct RMDIR3resok {
};
typedef struct RMDIR3resok RMDIR3resok;
struct RMDIR3resfail {
};
typedef struct RMDIR3resfail RMDIR3resfail;
struct RMDIR3res {
union {
} res_u;
};
struct RENAME3args {
};
typedef struct RENAME3args RENAME3args;
struct RENAME3resok {
};
typedef struct RENAME3resok RENAME3resok;
struct RENAME3resfail {
};
typedef struct RENAME3resfail RENAME3resfail;
struct RENAME3res {
union {
} res_u;
};
typedef struct RENAME3res RENAME3res;
struct LINK3args {
};
struct LINK3resok {
};
typedef struct LINK3resok LINK3resok;
struct LINK3resfail {
};
typedef struct LINK3resfail LINK3resfail;
struct LINK3res {
union {
} res_u;
};
struct READDIR3args {
};
typedef struct READDIR3args READDIR3args;
struct entry3 {
};
struct dirlist3 {
};
struct READDIR3resok {
};
typedef struct READDIR3resok READDIR3resok;
struct READDIR3resfail {
};
typedef struct READDIR3resfail READDIR3resfail;
struct READDIR3res {
union {
} res_u;
};
typedef struct READDIR3res READDIR3res;
#ifdef _KERNEL
struct READDIR3vres {
};
typedef struct READDIR3vres READDIR3vres;
#endif /* _KERNEL */
struct READDIRPLUS3args {
};
typedef struct READDIRPLUS3args READDIRPLUS3args;
struct entryplus3 {
struct entryplus3 *nextentry;
};
typedef struct entryplus3 entryplus3;
struct dirlistplus3 {
};
typedef struct dirlistplus3 dirlistplus3;
struct entryplus3_info {
};
typedef struct entryplus3_info entryplus3_info;
struct READDIRPLUS3resok {
};
typedef struct READDIRPLUS3resok READDIRPLUS3resok;
struct READDIRPLUS3resfail {
};
typedef struct READDIRPLUS3resfail READDIRPLUS3resfail;
struct READDIRPLUS3res {
union {
} res_u;
};
typedef struct READDIRPLUS3res READDIRPLUS3res;
#ifdef _KERNEL
struct entryplus3_va_fh {
int va_valid;
int fh_valid;
char *d_name; /* back pointer into entries */
};
struct READDIRPLUS3vres {
};
typedef struct READDIRPLUS3vres READDIRPLUS3vres;
#endif /* _KERNEL */
struct FSSTAT3args {
};
typedef struct FSSTAT3args FSSTAT3args;
struct FSSTAT3resok {
};
typedef struct FSSTAT3resok FSSTAT3resok;
struct FSSTAT3resfail {
};
typedef struct FSSTAT3resfail FSSTAT3resfail;
struct FSSTAT3res {
union {
} res_u;
};
typedef struct FSSTAT3res FSSTAT3res;
struct FSINFO3args {
};
typedef struct FSINFO3args FSINFO3args;
struct FSINFO3resok {
};
typedef struct FSINFO3resok FSINFO3resok;
struct FSINFO3resfail {
};
typedef struct FSINFO3resfail FSINFO3resfail;
#define FSF3_LINK 0x1
#define FSF3_SYMLINK 0x2
#define FSF3_HOMOGENEOUS 0x8
#define FSF3_CANSETTIME 0x10
struct FSINFO3res {
union {
} res_u;
};
typedef struct FSINFO3res FSINFO3res;
struct PATHCONF3args {
};
typedef struct PATHCONF3args PATHCONF3args;
struct nfs3_pathconf_info {
};
typedef struct nfs3_pathconf_info nfs3_pathconf_info;
struct PATHCONF3resok {
};
typedef struct PATHCONF3resok PATHCONF3resok;
struct PATHCONF3resfail {
};
typedef struct PATHCONF3resfail PATHCONF3resfail;
struct PATHCONF3res {
union {
} res_u;
};
typedef struct PATHCONF3res PATHCONF3res;
struct COMMIT3args {
};
typedef struct COMMIT3args COMMIT3args;
struct COMMIT3resok {
};
typedef struct COMMIT3resok COMMIT3resok;
struct COMMIT3resfail {
};
typedef struct COMMIT3resfail COMMIT3resfail;
struct COMMIT3res {
union {
} res_u;
};
typedef struct COMMIT3res COMMIT3res;
#define NFSPROC3_NULL ((rpcproc_t)0)
#ifndef _KERNEL
extern void * nfsproc3_null_3();
extern GETATTR3res * nfsproc3_getattr_3();
extern SETATTR3res * nfsproc3_setattr_3();
extern LOOKUP3res * nfsproc3_lookup_3();
extern ACCESS3res * nfsproc3_access_3();
extern READLINK3res * nfsproc3_readlink_3();
extern READ3res * nfsproc3_read_3();
extern WRITE3res * nfsproc3_write_3();
extern CREATE3res * nfsproc3_create_3();
extern MKDIR3res * nfsproc3_mkdir_3();
extern SYMLINK3res * nfsproc3_symlink_3();
extern MKNOD3res * nfsproc3_mknod_3();
extern REMOVE3res * nfsproc3_remove_3();
extern RMDIR3res * nfsproc3_rmdir_3();
extern RENAME3res * nfsproc3_rename_3();
extern LINK3res * nfsproc3_link_3();
extern READDIR3res * nfsproc3_readdir_3();
extern READDIRPLUS3res * nfsproc3_readdirplus_3();
extern FSSTAT3res * nfsproc3_fsstat_3();
extern FSINFO3res * nfsproc3_fsinfo_3();
extern PATHCONF3res * nfsproc3_pathconf_3();
extern COMMIT3res * nfsproc3_commit_3();
#endif /* !_KERNEL */
#ifdef _KERNEL
/* the NFS Version 3 XDR functions */
/*
* The NFS Version 3 service procedures.
*/
struct exportinfo; /* defined in nfs/export.h */
struct servinfo; /* defined in nfs/nfs_clnt.h */
struct mntinfo; /* defined in nfs/nfs_clnt.h */
extern void *rfs3_getattr_getfh(GETATTR3args *);
extern void *rfs3_setattr_getfh(SETATTR3args *);
extern void *rfs3_lookup_getfh(LOOKUP3args *);
extern void *rfs3_access_getfh(ACCESS3args *);
extern void *rfs3_readlink_getfh(READLINK3args *);
extern void rfs3_readlink_free(READLINK3res *);
extern void *rfs3_read_getfh(READ3args *);
extern void rfs3_read_free(READ3res *);
extern void *rfs3_write_getfh(WRITE3args *);
extern void *rfs3_create_getfh(CREATE3args *);
extern void *rfs3_mkdir_getfh(MKDIR3args *);
extern void *rfs3_symlink_getfh(SYMLINK3args *);
extern void *rfs3_mknod_getfh(MKNOD3args *);
extern void *rfs3_remove_getfh(REMOVE3args *);
extern void *rfs3_rmdir_getfh(RMDIR3args *);
extern void *rfs3_rename_getfh(RENAME3args *);
extern void *rfs3_link_getfh(LINK3args *);
extern void *rfs3_readdir_getfh(READDIR3args *);
extern void rfs3_readdir_free(READDIR3res *);
extern void *rfs3_readdirplus_getfh(READDIRPLUS3args *);
extern void rfs3_readdirplus_free(READDIRPLUS3res *);
extern void *rfs3_fsstat_getfh(FSSTAT3args *);
extern void *rfs3_fsinfo_getfh(FSINFO3args *);
extern void *rfs3_pathconf_getfh(PATHCONF3args *);
extern void *rfs3_commit_getfh(COMMIT3args *);
extern void rfs3_srvrinit(void);
extern void rfs3_srvrfini(void);
cred_t *);
cred_t *);
cred_t *);
extern int nfs3tsize(void);
extern int nfs3init(int, char *);
extern void nfs3fini(void);
extern int nfs3_vfsinit(void);
extern void nfs3_vfsfini(void);
extern kstat_named_t *rfsproccnt_v3_ptr;
extern vfsops_t *nfs3_vfsops;
extern struct vnodeops *nfs3_vnodeops;
extern const struct fs_operation_def nfs3_vnodeops_template[];
#ifdef DEBUG
extern int rfs3_do_pre_op_attr;
extern int rfs3_do_post_op_attr;
extern int rfs3_do_post_op_fh3;
#endif
/*
* Some servers do not properly update the attributes of the
* directory when changes are made. To allow interoperability
* with these broken servers, the nfs_disable_rddir_cache
* parameter can be used to disable readdir response caching.
*/
extern int nfs_disable_rddir_cache;
/*
*/
extern void nfs4_clnt_init(void);
extern void nfs4_clnt_fini(void);
/*
* Does NFS4 server have a vnode delegated? TRUE if so, FALSE if not.
*/
/*
* VOP_GETATTR call. If a NFS4 delegation is present on the supplied vnode
* call back to the delegated client to get attributes for AT_MTIME and
* AT_SIZE. Invoke VOP_GETATTR to get all other attributes or all attributes
* if no delegation is present.
*/
extern void rfs4_hold_deleg_policy(void);
extern void rfs4_rele_deleg_policy(void);
#endif /* _KERNEL */
#ifdef __cplusplus
}
#endif
#endif /* _NFS_NFS_H */