rfc1094.txt

来自「著名的RFC文档,其中有一些文档是已经翻译成中文的的.」· 文本 代码 · 共 1,515 行 · 第 1/4 页

TXT
1,515
字号
   Notes:  The argument "totalcount" is unused, and is removed in the   next protocol revision.2.2.8.  Write to Cache           void           NFSPROC_WRITECACHE(void) = 7;   To be used in the next protocol revision.Sun Microsystems, Inc.                                          [Page 7]RFC 1094                NFS: Network File System              March 19892.2.9.  Write to File           struct writeargs {                   fhandle file;                   unsigned beginoffset;                   unsigned offset;                   unsigned totalcount;                   nfsdata data;           };           attrstat           NFSPROC_WRITE(writeargs) = 8;   Writes "data" beginning "offset" bytes from the beginning of "file".   The first byte of the file is at offset zero.  If the reply "status"   is NFS_OK, then the reply "attributes" contains the attributes of the   file after the write has completed.  The write operation is atomic.   Data from this "WRITE" will not be mixed with data from another   client's "WRITE".   Notes:  The arguments "beginoffset" and "totalcount" are ignored and   are removed in the next protocol revision.2.2.10.  Create File           struct createargs {                   diropargs where;                   sattr attributes;           };           diropres           NFSPROC_CREATE(createargs) = 9;   The file "name" is created in the directory given by "dir".  The   initial attributes of the new file are given by "attributes".  A   reply "status" of NFS_OK indicates that the file was created, and   reply "file" and reply "attributes" are its file handle and   attributes.  Any other reply "status" means that the operation failed   and no file was created.   Notes:  This routine should pass an exclusive create flag, meaning   "create the file only if it is not already there".2.2.11.  Remove File           stat           NFSPROC_REMOVE(diropargs) = 10;Sun Microsystems, Inc.                                          [Page 8]RFC 1094                NFS: Network File System              March 1989   The file "name" is removed from the directory given by "dir".  A   reply of NFS_OK means the directory entry was removed.   Notes:  possibly non-idempotent operation.2.2.12.  Rename File           struct renameargs {                   diropargs from;                   diropargs to;           };           stat           NFSPROC_RENAME(renameargs) = 11;   The existing file "from.name" in the directory given by "from.dir" is   renamed to "to.name" in the directory given by "to.dir".  If the   reply is NFS_OK, the file was renamed.  The RENAME operation is   atomic on the server; it cannot be interrupted in the middle.   Notes:  possibly non-idempotent operation.2.2.13.  Create Link to File   Procedure 12, Version 2.           struct linkargs {                   fhandle from;                   diropargs to;           };           stat           NFSPROC_LINK(linkargs) = 12;   Creates the file "to.name" in the directory given by "to.dir", which   is a hard link to the existing file given by "from".  If the return   value is NFS_OK, a link was created.  Any other return value   indicates an error, and the link was not created.   A hard link should have the property that changes to either of the   linked files are reflected in both files.  When a hard link is made   to a file, the attributes for the file should have a value for   "nlink" that is one greater than the value before the link.   Notes:  possibly non-idempotent operation.Sun Microsystems, Inc.                                          [Page 9]RFC 1094                NFS: Network File System              March 19892.2.14.  Create Symbolic Link           struct symlinkargs {                   diropargs from;                   path to;                   sattr attributes;           };           stat           NFSPROC_SYMLINK(symlinkargs) = 13;   Creates the file "from.name" with ftype NFLNK in the directory given   by "from.dir".  The new file contains the pathname "to" and has   initial attributes given by "attributes".  If the return value is   NFS_OK, a link was created.  Any other return value indicates an   error, and the link was not created.   A symbolic link is a pointer to another file.  The name given in "to"   is not interpreted by the server, only stored in the newly created   file.  When the client references a file that is a symbolic link, the   contents of the symbolic link are normally transparently   reinterpreted as a pathname to substitute.  A READLINK operation   returns the data to the client for interpretation.   Notes:  On UNIX servers the attributes are never used, since symbolic   links always have mode 0777.2.2.15.  Create Directory           diropres           NFSPROC_MKDIR (createargs) = 14;   The new directory "where.name" is created in the directory given by   "where.dir".  The initial attributes of the new directory are given   by "attributes".  A reply "status" of NFS_OK indicates that the new   directory was created, and reply "file" and reply "attributes" are   its file handle and attributes.  Any other reply "status" means that   the operation failed and no directory was created.   Notes:  possibly non-idempotent operation.2.2.16.  Remove Directory           stat           NFSPROC_RMDIR(diropargs) = 15;Sun Microsystems, Inc.                                         [Page 10]RFC 1094                NFS: Network File System              March 1989   The existing empty directory "name" in the directory given by "dir"   is removed.  If the reply is NFS_OK, the directory was removed.   Notes:  possibly non-idempotent operation.2.2.17.  Read From Directory           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;   Returns a variable number of directory entries, with a total size of   up to "count" bytes, from the directory given by "dir".  If the   returned value of "status" is NFS_OK, then it is followed by a   variable number of "entry"s.  Each "entry" contains a "fileid" which   consists of a unique number to identify the file within a filesystem,   the "name" of the file, and a "cookie" which is an opaque pointer to   the next entry in the directory.  The cookie is used in the next   READDIR call to get more entries starting at a given point in the   directory.  The special cookie zero (all bits zero) can be used to   get the entries starting at the beginning of the directory.  The   "fileid" field should be the same number as the "fileid" in the the   attributes of the file.  (See section "2.3.5. fattr" under "Basic   Data Types".)  The "eof" flag has a value of TRUE if there are no   more entries in the directory.Sun Microsystems, Inc.                                         [Page 11]RFC 1094                NFS: Network File System              March 19892.2.18.  Get Filesystem Attributes           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;   If the reply "status" is NFS_OK, then the reply "info" gives the   attributes for the filesystem that contains file referred to by the   input fhandle.  The attribute fields contain the following values:      tsize   The optimum transfer size of the server in bytes.  This is              the number of bytes the server would like to have in the              data part of READ and WRITE requests.      bsize   The block size in bytes of the filesystem.      blocks  The total number of "bsize" blocks on the filesystem.      bfree   The number of free "bsize" blocks on the filesystem.      bavail  The number of "bsize" blocks available to non-privileged              users.   Notes:  This call does not work well if a filesystem has variable   size blocks.2.3.  Basic Data Types   The following XDR definitions are basic structures and types used in   other structures described further on.2.3.1.  stat       enum stat {           NFS_OK = 0,           NFSERR_PERM=1,Sun Microsystems, Inc.                                         [Page 12]RFC 1094                NFS: Network File System              March 1989           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       };   The "stat" type is returned with every procedure's results.  A value   of NFS_OK indicates that the call completed successfully and the   results are valid.  The other values indicate some kind of error   occurred on the server side during the servicing of the procedure.   The error values are derived from UNIX error numbers.   NFSERR_PERM      Not owner.  The caller does not have correct ownership to perform      the requested operation.   NFSERR_NOENT      No such file or directory.  The file or directory specified does      not exist.   NFSERR_IO      Some sort of hard error occurred when the operation was in      progress.  This could be a disk error, for example.   NFSERR_NXIO      No such device or address.   NFSERR_ACCES      Permission denied.  The caller does not have the correct      permission to perform the requested operation.   NFSERR_EXIST      File exists.  The file specified already exists.   NFSERR_NODEV      No such device.Sun Microsystems, Inc.                                         [Page 13]RFC 1094                NFS: Network File System              March 1989   NFSERR_NOTDIR      Not a directory.  The caller specified a non-directory in a      directory operation.   NFSERR_ISDIR      Is a directory.  The caller specified a directory in a non-      directory operation.   NFSERR_FBIG      File too large.  The operation caused a file to grow beyond the      server's limit.   NFSERR_NOSPC      No space left on device.  The operation caused the server's      filesystem to reach its limit.   NFSERR_ROFS      Read-only filesystem.  Write attempted on a read-only filesystem.   NFSERR_NAMETOOLONG      File name too long.  The file name in an operation was too long.   NFSERR_NOTEMPTY      Directory not empty.  Attempted to remove a directory that was not

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?