enum stat { NFS_OK = 0, NFSERR_PERM=1, NFSERR_NOENT=2, NFSERR_IO=5, NFSERR_NXIO=6, NFSERR_ACCES=13, NFSERR_EXIST=17, NFSERR_NODEV=19, NFSERR_NOTDIR=20, NFSERR_ISDIR=21, NFSERR_FBIG=27, NFSERR_NOSPC=28, NFSERR_ROFS=30, NFSERR_NAMETOOLONG=63, NFSERR_NOTEMPTY=66, NFSERR_DQUOT=69, NFSERR_STALE=70, NFSERR_WFLUSH=99 };
enum ftype { NFNON = 0, NFREG = 1, NFDIR = 2, NFBLK = 3, NFCHR = 4, NFLNK = 5 };
typedef opaque fhandle[FHSIZE];
struct timeval { unsigned int seconds; unsigned int useconds; };
struct fattr { ftype type; unsigned int mode; unsigned int nlink; unsigned int uid; unsigned int gid; unsigned int size; unsigned int blocksize; unsigned int rdev; unsigned int blocks; unsigned int fsid; unsigned int fileid; timeval atime; timeval mtime; timeval ctime; };
struct sattr { unsigned int mode; unsigned int uid; unsigned int gid; unsigned int size; timeval atime; timeval mtime; };
typedef string filename<MAXNAMLEN>;
typedef string path<MAXPATHLEN>;
union attrstat switch (stat status) { case NFS_OK: fattr attributes; default: void; };
struct diropargs { fhandle dir; filename name; };
union diropres switch (stat status) { case NFS_OK: struct { fhandle file; fattr attributes; } diropok; default: void; };
void NFSPROC_NULL(void) = 0;
attrstat NFSPROC_GETATTR (fhandle) = 1;
struct sattrargs { fhandle file; sattr attributes; }; attrstat NFSPROC_SETATTR (sattrargs) = 2;
void NFSPROC_ROOT(void) = 3;
diropres NFSPROC_LOOKUP(diropargs) = 4;
union readlinkres switch (stat status) { case NFS_OK: path data; default: void; }; readlinkres NFSPROC_READLINK(fhandle) = 5;
struct readargs { fhandle file; unsigned offset; unsigned count; unsigned totalcount; }; union readres switch (stat status) { case NFS_OK: fattr attributes; opaque data<NFS_MAXDATA>; default: void; }; readres NFSPROC_READ(readargs) = 6;
void NFSPROC_WRITECACHE(void) = 7;
struct writeargs { fhandle file; unsigned beginoffset; unsigned offset; unsigned totalcount; opaque data<NFS_MAXDATA>; }; attrstat NFSPROC_WRITE(writeargs) = 8;
struct createargs { diropargs where; sattr attributes; }; diropres NFSPROC_CREATE(createargs) = 9;
stat NFSPROC_REMOVE(diropargs) = 10;
struct renameargs { diropargs from; diropargs to; }; stat NFSPROC_RENAME(renameargs) = 11;
struct linkargs { fhandle from; diropargs to; }; stat NFSPROC_LINK(linkargs) = 12;
struct symlinkargs { diropargs from; path to; sattr attributes; }; stat NFSPROC_SYMLINK(symlinkargs) = 13;
diropres NFSPROC_MKDIR (createargs) = 14;
stat NFSPROC_RMDIR(diropargs) = 15;
struct readdirargs { fhandle dir; nfscookie cookie; unsigned count; }; struct entry { unsigned fileid; filename name; nfscookie cookie; entry *nextentry; }; union readdirres switch (stat status) { case NFS_OK: struct { entry *entries; bool eof; } readdirok; default: void; }; readdirres NFSPROC_READDIR (readdirargs) = 16;
union statfsres (stat status) { case NFS_OK: struct { unsigned tsize; unsigned bsize; unsigned blocks; unsigned bfree; unsigned bavail; } info; default: void; }; statfsres NFSPROC_STATFS(fhandle) = 17;
typedef opaque fhandle[FHSIZE];
union fhstatus switch (unsigned status) { case 0: fhandle directory; default: void; };
typedef string dirpath<MNTPATHLEN>;
typedef string name<MNTNAMLEN>;
void MNTPROC_NULL(void) = 0;
fhstatus MNTPROC_MNT(dirpath) = 1;
struct *mountlist { name hostname; dirpath directory; mountlist nextentry; }; mountlist MNTPROC_DUMP(void) = 2;
void MNTPROC_UMNT(dirpath) = 3;
void MNTPROC_UMNTALL(void) = 4;
struct *groups { name grname; groups grnext; }; struct *exportlist { dirpath filesys; groups groups; exportlist next; }; exportlist MNTPROC_EXPORT(void) = 5;