6.3.1.1.3. NFS Protocol LOOKUP Interface Function
program NFS_PROGRAM {
version NFS_VERSION {
...
diropres NFSPROC_LOOKUP (diropargs) = 4;
...
} = 2;
} = 100003;
struct diropargs {
nfs_fh dir; /* directory file handle */
filename name; /* file name */
};
union diropres switch (nfsstat status) {
case NFS_OK:
diropokres diropres;
default:
void;
};
struct diropokres {
nfs_fh file;
fattr attributes;
};
struct fattr {
ftype type; /* file type */
unsigned mode; /* protection mode bits */
unsigned nlink; /* number of hard links */
unsigned uid; /* owner user id */
unsigned gid; /* owner group id */
unsigned size; /* file size in bytes */
unsigned blocksize; /* preferred block size */
unsigned rdev; /* special device number */
unsigned blocks; /* used size in kilobytes */
unsigned fsid; /* device number */
unsigned fileid; /* inode number */
nfstime atime; /* time of last access */
nfstime mtime; /* time of last modification */
nfstime ctime; /* time of last change */
};
struct nfs_fh {
opaque data [NFS_FHSIZE];
};
enum nfsstat {
NFS_OK=0, /* No error */
NFSERR_PERM=1, /* Not owner */
NFSERR_NOENT=2, /* No such file or directory */
NFSERR_IO=5, /* I/O error */
NFSERR_NXIO=6, /* No such device or address */
NFSERR_ACCES=13, /* Permission denied */
NFSERR_EXIST=17, /* File exists */
NFSERR_NODEV=19, /* No such device */
NFSERR_NOTDIR=20, /* Not a directory*/
NFSERR_ISDIR=21, /* Is a directory */
NFSERR_FBIG=27, /* File too large */
NFSERR_NOSPC=28, /* No space left on device */
NFSERR_ROFS=30, /* Read-only file system */
NFSERR_NAMETOOLONG=63, /* File name too long */
NFSERR_NOTEMPTY=66, /* Directory not empty */
NFSERR_DQUOT=69, /* Disc quota exceeded */
NFSERR_STALE=70, /* Stale NFS file handle */
NFSERR_WFLUSH=99 /* Write cache flushed */
};