Previous section.

Protocols for Interworking: XNFS, Version 3W
Copyright © 1998 The Open Group

Name

NFSPROC_READ - Read From File

Call Arguments

struct readargs { fhandle file; unsigned offset; unsigned count; unsigned totalcount; };

fhandle is defined in Basic Data Types .

Return Arguments

union readres switch (stat status) { case NFS_OK: fattr attributes; opaque data<NFS_MAXDATA>; default: void; };

fattr and sattr are defined in Basic Data Types .

RPC Procedure Description

readres NFSPROC_READ(readargs) = 6;

Description

Up to count bytes of data are returned from the file given by file starting at offset bytes from the beginning of the file. The first byte of the file is at offset zero. The file attributes, after the read takes place, are returned in attributes. Read operations should only be permitted on regular files. Reading directory files should be performed using the NFSPROC_READDIR procedure (see Name ).

Note that the argument totalcount is unused.

Return Codes

NFS_OK
Indicates that the call completed successfully and the results are valid.

NFSERR_IO
Some sort of hard error occurred when the operation was in progress. This could be a disk error, for example.

NFSERR_ACCES
Permission denied. The caller does not have the correct permission to perform the requested operation.

NFSERR_ISDIR
Is a directory. The caller specified a directory in a non-directory operation.

NFSERR_STALE
The fhandle given in the arguments was invalid. That is, the file referred to by that file handle no longer exists, or access to it has been revoked.


Why not acquire a nicely bound hard copy?
Click here to return to the publication details or order a copy of this publication.

Contents Next section Index