]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - share/doc/psd/27.nfsrpc/nfs.rfc.ms
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / share / doc / psd / 27.nfsrpc / nfs.rfc.ms
1 .\"
2 .\" Must use  --  tbl  --  with this one
3 .\"
4 .\" @(#)nfs.rfc.ms      2.2 88/08/05 4.0 RPCSRC
5 .\" $FreeBSD$
6 .\"
7 .de BT
8 .if \\n%=1 .tl ''- % -''
9 ..
10 .ND
11 .\" prevent excess underlining in nroff
12 .if n .fp 2 R
13 .OH 'Network File System: Version 2 Protocol Specification''Page %'
14 .EH 'Page %''Network File System: Version 2 Protocol Specification'
15 .if \n%=1 .bp
16 .SH
17 \&Network File System: Version 2 Protocol Specification
18 .IX NFS "" "" "" PAGE MAJOR
19 .IX "Network File System" "" "" "" PAGE MAJOR
20 .IX NFS "version-2 protocol specification"
21 .IX "Network File System" "version-2 protocol specification"
22 .LP
23 .NH 0
24 \&Status of this Standard
25 .LP
26 Note: This document specifies a protocol that Sun Microsystems, Inc.,
27 and others are using.  It specifies it in standard ARPA RFC form.
28 .NH 1
29 \&Introduction
30 .IX NFS introduction
31 .LP
32 The Sun Network Filesystem (NFS) protocol provides transparent remote 
33 access to shared filesystems over local area networks.  The NFS 
34 protocol is designed to be machine, operating system, network architecture, 
35 and transport protocol independent.  This independence is 
36 achieved through the use of Remote Procedure Call (RPC) primitives 
37 built on top of an External Data Representation (XDR).  Implementations
38 exist for a variety of machines, from personal computers to
39 supercomputers.
40 .LP
41 The supporting mount protocol allows the server to hand out remote
42 access privileges to a restricted set of clients.  It performs the
43 operating system-specific functions that allow, for example, to
44 attach remote directory trees to some local file system.
45 .NH 2
46 \&Remote Procedure Call
47 .IX "Remote Procedure Call"
48 .LP
49 Sun's remote procedure call specification provides a procedure-
50 oriented interface to remote services.  Each server supplies a
51 program that is a set of procedures.  NFS is one such "program".
52 The combination of host address, program number, and procedure
53 number specifies one remote service procedure.  RPC does not depend
54 on services provided by specific protocols, so it can be used with
55 any underlying transport protocol.  See the
56 .I "Remote Procedure Calls: Protocol Specification"
57 chapter of this manual.
58 .NH 2
59 \&External Data Representation
60 .IX "External Data Representation"
61 .LP
62 The External Data Representation (XDR) standard provides a common
63 way of representing a set of data types over a network.  
64 The NFS
65 Protocol Specification is written using the RPC data description
66 language.  
67 For more information, see the
68 .I " External Data Representation Standard: Protocol Specification."  
69 Sun provides implementations of XDR and
70 RPC,  but NFS does not require their use.  Any software that
71 provides equivalent functionality can be used, and if the encoding
72 is exactly the same it can interoperate with other implementations
73 of NFS.
74 .NH 2
75 \&Stateless Servers
76 .IX "stateless servers"
77 .IX servers stateless
78 .LP
79 The NFS protocol is stateless.  That is, a server does not need to
80 maintain any extra state information about any of its clients in
81 order to function correctly.  Stateless servers have a distinct
82 advantage over stateful servers in the event of a failure.  With
83 stateless servers, a client need only retry a request until the
84 server responds; it does not even need to know that the server has
85 crashed, or the network temporarily went down.  The client of a
86 stateful server, on the other hand, needs to either detect a server
87 crash and rebuild the server's state when it comes back up, or
88 cause client operations to fail.
89 .LP
90 This may not sound like an important issue, but it affects the
91 protocol in some unexpected ways.  We feel that it is worth a bit
92 of extra complexity in the protocol to be able to write very simple
93 servers that do not require fancy crash recovery.
94 .LP
95 On the other hand, NFS deals with objects such as files and
96 directories that inherently have state -- what good would a file be
97 if it did not keep its contents intact?  The goal is to not
98 introduce any extra state in the protocol itself.  Another way to
99 simplify recovery is by making operations "idempotent" whenever
100 possible (so that they can potentially be repeated).
101 .NH 1
102 \&NFS Protocol Definition
103 .IX NFS "protocol definition"
104 .IX NFS protocol
105 .LP
106 Servers have been known to change over time, and so can the
107 protocol that they use. So RPC provides a version number with each
108 RPC request. This RFC describes version two of the NFS protocol.
109 Even in the second version, there are various obsolete procedures
110 and parameters, which will be removed in later versions. An RFC
111 for version three of the NFS protocol is currently under
112 preparation.
113 .NH 2
114 \&File System Model
115 .IX filesystem model
116 .LP
117 NFS assumes a file system that is hierarchical, with directories as
118 all but the bottom-level files.  Each entry in a directory (file,
119 directory, device, etc.)  has a string name.  Different operating
120 systems may have restrictions on the depth of the tree or the names
121 used, as well as using different syntax to represent the "pathname",
122 which is the concatenation of all the "components" (directory and
123 file names) in the name.  A "file system" is a tree on a single
124 server (usually a single disk or physical partition) with a specified
125 "root".  Some operating systems provide a "mount" operation to make
126 all file systems appear as a single tree, while others maintain a
127 "forest" of file systems.  Files are unstructured streams of
128 uninterpreted bytes.  Version 3 of NFS uses a slightly more general
129 file system model.
130 .LP
131 NFS looks up one component of a pathname at a time.  It may not be
132 obvious why it does not just take the whole pathname, traipse down
133 the directories, and return a file handle when it is done.  There are
134 several good reasons not to do this.  First, pathnames need
135 separators between the directory components, and different operating
136 systems use different separators.  We could define a Network Standard
137 Pathname Representation, but then every pathname would have to be
138 parsed and converted at each end.  Other issues are discussed in
139 \fINFS Implementation Issues\fP below.
140 .LP
141 Although files and directories are similar objects in many ways,
142 different procedures are used to read directories and files.  This
143 provides a network standard format for representing directories.  The
144 same argument as above could have been used to justify a procedure
145 that returns only one directory entry per call.  The problem is
146 efficiency.  Directories can contain many entries, and a remote call
147 to return each would be just too slow.
148 .NH 2
149 \&RPC Information
150 .IX NFS "RPC information"
151 .IP \fIAuthentication\fP
152 The   NFS  service uses 
153 .I AUTH_UNIX ,
154 .I AUTH_DES ,
155 or 
156 .I AUTH_SHORT 
157 style
158 authentication, except in  the  NULL procedure where   
159 .I AUTH_NONE 
160 is also allowed.
161 .IP "\fITransport Protocols\fP"
162 NFS currently is supported on UDP/IP only.  
163 .IP "\fIPort Number\fP"
164 The NFS protocol currently uses the UDP port number 2049.  This is
165 not an officially assigned port, so  later versions of the protocol
166 use the \*QPortmapping\*U facility of RPC.
167 .NH 2
168 \&Sizes of XDR Structures
169 .IX "XDR structure sizes"
170 .LP
171 These are the sizes, given in decimal bytes, of various XDR
172 structures used in the protocol:
173 .DS
174 /* \fIThe maximum number of bytes of data in a READ or WRITE request\fP  */
175 const MAXDATA = 8192;
176
177 /* \fIThe maximum number of bytes in a pathname argument\fP */
178 const MAXPATHLEN = 1024;
179
180 /* \fIThe maximum number of bytes in a file name argument\fP */
181 const MAXNAMLEN = 255;
182
183 /* \fIThe size in bytes of the opaque "cookie" passed by READDIR\fP */
184 const COOKIESIZE  = 4;
185
186 /* \fIThe size in bytes of the opaque file handle\fP */
187 const FHSIZE = 32;
188 .DE
189 .NH 2
190 \&Basic Data Types
191 .IX "NFS data types"
192 .IX NFS "basic data types"
193 .LP
194 The following XDR  definitions are basic  structures and types used
195 in other structures described further on.
196 .KS
197 .NH 3
198 \&stat
199 .IX "NFS data types" stat "" \fIstat\fP
200 .DS
201 enum stat {
202         NFS_OK = 0,
203         NFSERR_PERM=1,
204         NFSERR_NOENT=2,
205         NFSERR_IO=5,
206         NFSERR_NXIO=6,
207         NFSERR_ACCES=13,
208         NFSERR_EXIST=17,
209         NFSERR_NODEV=19,
210         NFSERR_NOTDIR=20,
211         NFSERR_ISDIR=21,
212         NFSERR_FBIG=27,
213         NFSERR_NOSPC=28,
214         NFSERR_ROFS=30,
215         NFSERR_NAMETOOLONG=63,
216         NFSERR_NOTEMPTY=66,
217         NFSERR_DQUOT=69,
218         NFSERR_STALE=70,
219         NFSERR_WFLUSH=99
220 };
221 .DE
222 .KE
223 .LP
224 The 
225 .I stat 
226 type  is returned with every  procedure's  results.   A
227 value of 
228 .I NFS_OK 
229 indicates that the  call completed successfully and
230 the  results are  valid.  The  other  values indicate  some kind of
231 error  occurred on the  server  side  during the servicing   of the
232 procedure.  The error values are derived from UNIX error numbers.
233 .IP \fBNFSERR_PERM\fP:
234 Not owner.  The caller does not have correct ownership
235 to perform the requested operation.
236 .IP \fBNFSERR_NOENT\fP:
237 No such file or directory.    The file or directory
238 specified does not exist.
239 .IP \fBNFSERR_IO\fP:
240 Some sort of hard  error occurred when the operation was
241 in progress.  This could be a disk error, for example.
242 .IP \fBNFSERR_NXIO\fP:
243 No such device or address.
244 .IP \fBNFSERR_ACCES\fP:
245 Permission  denied.  The  caller does  not  have the
246 correct permission to perform the requested operation.
247 .IP \fBNFSERR_EXIST\fP:
248 File exists.  The file specified already exists.
249 .IP \fBNFSERR_NODEV\fP:
250 No such device.
251 .IP \fBNFSERR_NOTDIR\fP:
252 Not   a  directory.    The  caller  specified   a
253 non-directory in a directory operation.
254 .IP \fBNFSERR_ISDIR\fP:
255 Is a directory.  The caller specified  a directory in
256 a non- directory operation.
257 .IP \fBNFSERR_FBIG\fP:
258 File too large.   The  operation caused a file to grow
259 beyond the server's limit.
260 .IP \fBNFSERR_NOSPC\fP:
261 No space left on  device.   The operation caused the
262 server's filesystem to reach its limit.
263 .IP \fBNFSERR_ROFS\fP:
264 Read-only filesystem.  Write attempted on a read-only filesystem.
265 .IP \fBNFSERR_NAMETOOLONG\fP:
266 File name   too   long.  The file  name  in  an operation was too long.
267 .IP \fBNFSERR_NOTEMPTY\fP:
268 Directory   not empty.  Attempted  to   remove  a
269 directory that was not empty.
270 .IP \fBNFSERR_DQUOT\fP:
271 Disk quota exceeded.  The client's disk  quota on the
272 server has been exceeded.
273 .IP \fBNFSERR_STALE\fP:
274 The  "fhandle" given in   the arguments was invalid.
275 That is, the file referred to by that file handle no longer exists,
276 or access to it has been revoked.
277 .IP \fBNFSERR_WFLUSH\fP:
278 The server's  write cache  used  in the
279 .I WRITECACHE 
280 call got flushed to disk.
281 .LP
282 .KS
283 .NH 3
284 \&ftype
285 .IX "NFS data types" ftype "" \fIftype\fP
286 .DS
287 enum ftype {
288         NFNON = 0,
289         NFREG = 1,
290         NFDIR = 2,
291         NFBLK = 3,
292         NFCHR = 4,
293         NFLNK = 5
294 };
295 .DE
296 .KE
297 The enumeration
298 .I ftype 
299 gives the type of a file.  The type 
300 .I NFNON 
301 indicates a non-file,
302 .I NFREG 
303 is a regular file, 
304 .I NFDIR 
305 is a directory,
306 .I NFBLK 
307 is a block-special device, 
308 .I NFCHR 
309 is a character-special device, and
310 .I NFLNK 
311 is a symbolic link.
312 .KS
313 .NH 3
314 \&fhandle
315 .IX "NFS data types" fhandle "" \fIfhandle\fP
316 .DS
317 typedef opaque fhandle[FHSIZE];
318 .DE
319 .KE
320 The
321 .I fhandle 
322 is the file handle passed between the server and the client.  
323 All file operations are done using file handles to refer to a file or 
324 directory.  The file handle can contain whatever information the server
325 needs to distinguish an individual file.
326 .KS
327 .NH 3
328 \&timeval
329 .IX "NFS data types" timeval "" \fItimeval\fP
330 .DS
331 struct timeval {
332         unsigned int seconds;
333         unsigned int useconds;
334 };
335 .DE
336 .KE
337 The 
338 .I timeval
339 structure is the number of seconds and microseconds 
340 since midnight January 1, 1970, Greenwich Mean Time.  It is used to 
341 pass time and date information.
342 .KS
343 .NH 3
344 \&fattr
345 .IX "NFS data types" fattr "" \fIfattr\fP
346 .DS
347 struct fattr {
348         ftype        type;
349         unsigned int mode;
350         unsigned int nlink;
351         unsigned int uid;
352         unsigned int gid;
353         unsigned int size;
354         unsigned int blocksize;
355         unsigned int rdev;
356         unsigned int blocks;
357         unsigned int fsid;
358         unsigned int fileid;
359         timeval      atime;
360         timeval      mtime;
361         timeval      ctime;
362 };
363 .DE
364 .KE
365 The
366 .I fattr 
367 structure contains the attributes of a file; "type" is the type of
368 the file; "nlink" is the number of hard links to the file (the number
369 of different names for the same file); "uid" is the user
370 identification number of the owner of the file; "gid" is the group
371 identification number of the group of the file; "size" is the size in
372 bytes of the file; "blocksize" is the size in bytes of a block of the
373 file; "rdev" is the device number of the file if it is type
374 .I NFCHR 
375 or
376 .I NFBLK ;
377 "blocks" is the number of blocks the file takes up on disk; "fsid" is
378 the file system identifier for the filesystem containing the file;
379 "fileid" is a number that uniquely identifies the file within its
380 filesystem; "atime" is the time when the file was last accessed for
381 either read or write; "mtime" is the time when the file data was last
382 modified (written); and "ctime" is the time when the status of the
383 file was last changed.  Writing to the file also changes "ctime" if
384 the size of the file changes.
385 .LP
386 "mode" is the access mode encoded as a set of bits.  Notice that the
387 file type is specified both in the mode bits and in the file type.
388 This is really a bug in the protocol and will be fixed in future
389 versions.  The descriptions given below specify the bit positions
390 using octal numbers.
391 .TS
392 box tab (&) ;
393 cfI cfI
394 lfL l .
395 Bit&Description
396 _
397 0040000&This is a directory; "type" field should be NFDIR.
398 0020000&This is a character special file; "type" field should be NFCHR. 
399 0060000&This is a block special file; "type" field should be NFBLK. 
400 0100000&This is a regular file; "type" field should be NFREG.
401 0120000&This is a symbolic link file;  "type" field should be NFLNK. 
402 0140000&This is a named socket; "type" field should be NFNON.
403 0004000&Set user id on execution.
404 0002000&Set group id on execution.
405 0001000&Save swapped text even after use.
406 0000400&Read permission for owner.
407 0000200&Write permission for owner.
408 0000100&Execute and search permission for owner.
409 0000040&Read permission for group.
410 0000020&Write permission for group.
411 0000010&Execute and search permission for group.
412 0000004&Read permission for others.
413 0000002&Write permission for others.
414 0000001&Execute and search permission for others.
415 .TE
416 .KS
417 Notes:
418 .IP 
419 The bits are  the same as the mode   bits returned  by  the
420 .I stat(2) 
421 system call in the UNIX system.  The file  type is  specified  both in
422 the mode  bits  and in  the file type.   This   is fixed  in future
423 versions.
424 .IP
425 The "rdev" field in the attributes structure is an operating system
426 specific device specifier.  It  will be  removed and generalized in
427 the next revision of the protocol.
428 .KE
429 .LP
430 .KS
431 .NH 3
432 \&sattr
433 .IX "NFS data types" sattr "" \fIsattr\fP
434 .DS
435 struct sattr {
436         unsigned int mode;
437         unsigned int uid;
438         unsigned int gid;
439         unsigned int size;
440         timeval      atime;
441         timeval      mtime;
442 };
443 .DE
444 .KE
445 The 
446 .I sattr
447 structure contains the file attributes which can be set
448 from the client.  The fields are the same as for  
449 .I fattr 
450 above.  A "size" of zero  means the file should be  truncated.
451 A value of -1 indicates a field that should be ignored.
452 .LP
453 .KS
454 .NH 3
455 \&filename
456 .IX "NFS data types" filename "" \fIfilename\fP
457 .DS
458 typedef string filename<MAXNAMLEN>;
459 .DE
460 .KE
461 The type
462 .I filename 
463 is used for  passing file names  or  pathname components.
464 .LP
465 .KS
466 .NH 3
467 \&path
468 .IX "NFS data types" path "" \fIpath\fP
469 .DS
470 typedef string path<MAXPATHLEN>;
471 .DE
472 .KE
473 The type
474 .I path 
475 is a pathname.  The server considers it as a string
476 with no internal structure,  but to the client  it is the name of a
477 node in a filesystem tree.
478 .LP
479 .KS
480 .NH 3
481 \&attrstat
482 .IX "NFS data types" attrstat "" \fIattrstat\fP
483 .DS
484 union attrstat switch (stat status) {
485         case NFS_OK:
486                 fattr attributes;
487         default:
488                 void;
489 };
490 .DE
491 .KE
492 The 
493 .I attrstat 
494 structure is a common procedure result.  It contains
495 a  "status" and,  if  the call   succeeded,   it also contains  the
496 attributes of the file on which the operation was done.
497 .LP
498 .KS
499 .NH 3
500 \&diropargs
501 .IX "NFS data types" diropargs "" \fIdiropargs\fP
502 .DS
503 struct diropargs {
504         fhandle  dir;
505         filename name;
506 };
507 .DE
508 .KE
509 The  
510 .I diropargs 
511 structure is used  in  directory  operations.  The
512 "fhandle" "dir" is the directory in  which to find the file "name".
513 A directory operation is one in which the directory is affected.
514 .LP
515 .KS
516 .NH 3
517 \&diropres
518 .IX "NFS data types" diropres "" \fIdiropres\fP
519 .DS
520 union diropres switch (stat status) {
521         case NFS_OK:
522                 struct {
523                         fhandle file;
524                         fattr   attributes;
525                 } diropok;
526         default:
527                 void;
528 };
529 .DE
530 .KE
531 The results of a directory operation  are returned  in a 
532 .I diropres 
533 structure.  If the call succeeded, a new file handle "file" and the
534 "attributes" associated with that file are  returned along with the
535 "status".
536 .NH 2
537 \&Server Procedures
538 .IX "NFS server procedures" "" "" "" PAGE MAJOR
539 .LP
540 The  protocol definition  is given as   a  set  of  procedures with
541 arguments  and results defined using the   RPC  language.   A brief
542 description of the function of each procedure should provide enough
543 information to allow implementation.
544 .LP
545 All of  the procedures  in   the NFS  protocol  are assumed  to  be
546 synchronous.   When a procedure  returns to the  client, the client
547 can assume that the operation has completed and any data associated
548 with the request is  now on stable storage.  For  example, a client
549 .I WRITE 
550 request   may  cause  the   server  to  update  data  blocks,
551 filesystem information blocks (such as indirect  blocks),  and file
552 attribute  information (size  and  modify  times).  When  the 
553 .I WRITE 
554 returns to the client, it can assume  that the write  is safe, even
555 in case of  a server  crash, and  it can discard the  data written.
556 This is a very important part  of the statelessness  of the server.
557 If the server waited to flush data from remote requests, the client
558 would have to  save those requests so that  it could resend them in
559 case of a server crash.
560 .ie t .DS
561 .el .DS L
562
563 .ft I
564 /*
565 * Remote file service routines
566 */
567 .ft CW
568 program NFS_PROGRAM {
569         version NFS_VERSION {
570                 void        NFSPROC_NULL(void)              = 0;
571                 attrstat    NFSPROC_GETATTR(fhandle)        = 1;
572                 attrstat    NFSPROC_SETATTR(sattrargs)      = 2;
573                 void        NFSPROC_ROOT(void)              = 3;
574                 diropres    NFSPROC_LOOKUP(diropargs)       = 4;
575                 readlinkres NFSPROC_READLINK(fhandle)       = 5;
576                 readres     NFSPROC_READ(readargs)          = 6;
577                 void        NFSPROC_WRITECACHE(void)        = 7;
578                 attrstat    NFSPROC_WRITE(writeargs)        = 8;
579                 diropres    NFSPROC_CREATE(createargs)      = 9;
580                 stat        NFSPROC_REMOVE(diropargs)       = 10;
581                 stat        NFSPROC_RENAME(renameargs)      = 11;
582                 stat        NFSPROC_LINK(linkargs)          = 12;
583                 stat        NFSPROC_SYMLINK(symlinkargs)    = 13;
584                 diropres    NFSPROC_MKDIR(createargs)       = 14;
585                 stat        NFSPROC_RMDIR(diropargs)        = 15;
586                 readdirres  NFSPROC_READDIR(readdirargs)    = 16;
587                 statfsres   NFSPROC_STATFS(fhandle)         = 17;
588         } = 2;
589 } = 100003;
590 .DE
591 .KS
592 .NH 3
593 \&Do Nothing
594 .IX "NFS server procedures" NFSPROC_NULL() "" \fINFSPROC_NULL()\fP
595 .DS
596 void 
597 NFSPROC_NULL(void) = 0;
598 .DE
599 .KE
600 This procedure does no work.   It is made available  in  all RPC
601 services to allow server response testing and timing.
602 .KS
603 .NH 3
604 \&Get File Attributes
605 .IX "NFS server procedures" NFSPROC_GETATTR() "" \fINFSPROC_GETATTR()\fP
606 .DS
607 attrstat 
608 NFSPROC_GETATTR (fhandle) = 1;
609 .DE
610 .KE
611 If the reply  status is 
612 .I NFS_OK ,
613 then  the reply attributes contains
614 the attributes for the file given by the input fhandle.
615 .KS
616 .NH 3
617 \&Set File Attributes
618 .IX "NFS server procedures" NFSPROC_SETATTR() "" \fINFSPROC_SETATTR()\fP
619 .DS
620 struct sattrargs {
621         fhandle file;
622         sattr attributes;
623         };
624
625 attrstat
626 NFSPROC_SETATTR (sattrargs) = 2;
627 .DE
628 .KE
629 The  "attributes" argument  contains fields which are either  -1 or
630 are  the  new value for  the  attributes of  "file".   If the reply
631 status is 
632 .I NFS_OK ,
633 then the  reply attributes have the attributes of
634 the file after the "SETATTR" operation has completed.
635 .LP
636 Note: The use of -1 to indicate an unused field in "attributes" is
637 changed in the next version of the protocol.
638 .KS
639 .NH 3
640 \&Get Filesystem Root
641 .IX "NFS server procedures" NFSPROC_ROOT "" \fINFSPROC_ROOT\fP
642 .DS
643 void 
644 NFSPROC_ROOT(void) = 3;
645 .DE
646 .KE
647 Obsolete.  This procedure  is no longer used   because  finding the
648 root file handle of a filesystem requires moving  pathnames between
649 client  and server.  To  do  this right we would  have  to define a
650 network standard representation of pathnames.  Instead, the
651 function  of  looking up  the   root  file handle  is  done  by the
652 .I MNTPROC_MNT() 
653 procedure.    (See the
654 .I "Mount Protocol Definition"
655 later in this chapter for details).
656 .KS
657 .NH 3
658 \&Look Up File Name
659 .IX "NFS server procedures" NFSPROC_LOOKUP() "" \fINFSPROC_LOOKUP()\fP
660 .DS
661 diropres
662 NFSPROC_LOOKUP(diropargs) = 4;
663 .DE
664 .KE
665 If  the reply "status"  is 
666 .I NFS_OK ,
667 then the reply  "file" and reply
668 "attributes" are the file handle and attributes for the file "name"
669 in the directory given by "dir" in the argument.
670 .KS
671 .NH 3
672 \&Read From Symbolic Link
673 .IX "NFS server procedures" NFSPROC_READLINK() "" \fINFSPROC_READLINK()\fP
674 .DS
675 union readlinkres switch (stat status) {
676         case NFS_OK:
677                 path data;
678         default:
679                 void;
680 };
681
682 readlinkres
683 NFSPROC_READLINK(fhandle) = 5;
684 .DE
685 .KE
686 If "status" has the value 
687 .I NFS_OK ,
688 then the reply "data" is the data in 
689 the symbolic link given by the file referred to by the fhandle argument.
690 .LP
691 Note:  since   NFS always  parses pathnames    on the  client, the
692 pathname in  a symbolic  link may  mean something  different (or be
693 meaningless) on a different client or on the server if  a different
694 pathname syntax is used.
695 .KS
696 .NH 3
697 \&Read From File
698 .IX "NFS server procedures" NFSPROC_READ "" \fINFSPROC_READ\fP
699 .DS
700 struct readargs {
701         fhandle file;
702         unsigned offset;
703         unsigned count;
704         unsigned totalcount;
705 };
706
707 union readres switch (stat status) {
708         case NFS_OK:
709                 fattr attributes;
710                 opaque data<NFS_MAXDATA>;
711         default:
712                 void;
713 };
714
715 readres
716 NFSPROC_READ(readargs) = 6;
717 .DE
718 .KE
719 Returns  up  to  "count" bytes of   "data" from  the file  given by
720 "file", starting at "offset" bytes from  the beginning of the file.
721 The first byte of the file is  at offset zero.  The file attributes
722 after the read takes place are returned in "attributes".
723 .LP
724 Note: The  argument "totalcount" is  unused, and is removed in the
725 next protocol revision.
726 .KS
727 .NH 3
728 \&Write to Cache
729 .IX "NFS server procedures" NFSPROC_WRITECACHE() "" \fINFSPROC_WRITECACHE()\fP
730 .DS
731 void
732 NFSPROC_WRITECACHE(void) = 7;
733 .DE
734 .KE
735 To be used in the next protocol revision.
736 .KS
737 .NH 3
738 \&Write to File
739 .IX "NFS server procedures" NFSPROC_WRITE() "" \fINFSPROC_WRITE()\fP
740 .DS
741 struct writeargs {
742         fhandle file;          
743         unsigned beginoffset;  
744         unsigned offset;       
745         unsigned totalcount;   
746         opaque data<NFS_MAXDATA>;
747 };
748
749 attrstat        
750 NFSPROC_WRITE(writeargs) = 8;
751 .DE
752 .KE
753 Writes   "data" beginning  "offset"  bytes  from the  beginning  of
754 "file".  The first byte  of  the file is at  offset  zero.  If  the
755 reply "status" is NFS_OK, then  the reply "attributes" contains the
756 attributes  of the file after the  write has  completed.  The write
757 operation is atomic.  Data from this  call to 
758 .I WRITE 
759 will not be mixed with data from another client's calls.
760 .LP
761 Note: The arguments "beginoffset" and "totalcount" are ignored and
762 are removed in the next protocol revision.
763 .KS
764 .NH 3
765 \&Create File
766 .IX "NFS server procedures" NFSPROC_CREATE() "" \fINFSPROC_CREATE()\fP
767 .DS
768 struct createargs {
769         diropargs where;
770         sattr attributes;
771 };
772
773 diropres
774 NFSPROC_CREATE(createargs) = 9;
775 .DE
776 .KE
777 The file "name" is created  in the directory given  by "dir".   The
778 initial  attributes of the  new file  are given by "attributes".  A
779 reply "status"  of NFS_OK indicates that the  file was created, and
780 reply "file"   and   reply "attributes"  are    its file handle and
781 attributes.   Any  other reply  "status"  means that  the operation
782 failed and no file was created.
783 .LP
784 Note: This  routine should pass  an exclusive create flag, meaning
785 "create the file only if it is not already there".
786 .KS
787 .NH 3
788 \&Remove File
789 .IX "NFS server procedures" NFSPROC_REMOVE() "" \fINFSPROC_REMOVE()\fP
790 .DS
791 stat
792 NFSPROC_REMOVE(diropargs) = 10;
793 .DE
794 .KE
795 The file "name" is  removed from the directory  given by "dir".   A
796 reply of NFS_OK means the directory entry was removed.
797 .LP
798 Note: possibly non-idempotent operation.
799 .KS
800 .NH 3
801 \&Rename File
802 .IX "NFS server procedures" NFSPROC_RENAME() "" \fINFSPROC_RENAME()\fP
803 .DS
804 struct renameargs {
805         diropargs from; 
806         diropargs to;
807 };
808
809 stat
810 NFSPROC_RENAME(renameargs) = 11;
811 .DE
812 .KE
813 The existing file "from.name" in  the directory given by "from.dir"
814 is renamed to "to.name" in the directory given by "to.dir".  If the
815 reply  is 
816 .I NFS_OK ,
817 the file was  renamed.  The  
818 RENAME  
819 operation is
820 atomic on the server; it cannot be interrupted in the middle.
821 .LP
822 Note: possibly non-idempotent operation.
823 .KS
824 .NH 3
825 \&Create Link to File
826 .IX "NFS server procedures" NFSPROC_LINK() "" \fINFSPROC_LINK()\fP
827 .DS
828 struct linkargs {
829         fhandle from;
830         diropargs to;
831 };
832
833 stat
834 NFSPROC_LINK(linkargs) = 12;
835 .DE
836 .KE
837 Creates the  file "to.name"  in the directory  given   by "to.dir",
838 which is a hard link to the existing file given  by "from".  If the
839 return value is 
840 .I NFS_OK ,
841 a link was created.  Any other return value
842 indicates an error, and the link was not created.
843 .LP
844 A hard link should have the property that changes  to either of the
845 linked files are reflected in both files.  When a hard link is made
846 to a  file, the attributes  for  the file should  have  a value for
847 "nlink" that is one greater than the value before the link.
848 .LP
849 Note: possibly non-idempotent operation.
850 .KS
851 .NH 3
852 \&Create Symbolic Link
853 .IX "NFS server procedures" NFSPROC_SYMLINK() "" \fINFSPROC_SYMLINK()\fP
854 .DS
855 struct symlinkargs {
856         diropargs from;
857         path to;
858         sattr attributes;
859 };
860
861 stat
862 NFSPROC_SYMLINK(symlinkargs) = 13;
863 .DE
864 .KE
865 Creates the  file "from.name" with  ftype  
866 .I NFLNK 
867 in  the  directory
868 given by "from.dir".   The new file contains  the pathname "to" and
869 has initial attributes given by "attributes".  If  the return value
870 is 
871 .I NFS_OK ,
872 a link was created.  Any other return value indicates an
873 error, and the link was not created.
874 .LP
875 A symbolic  link is  a pointer to another file.   The name given in
876 "to" is  not interpreted by  the server, only stored in  the  newly
877 created file.  When the client references a file that is a symbolic
878 link, the contents of the symbolic  link are normally transparently
879 reinterpreted  as a pathname  to substitute.   A 
880 .I READLINK 
881 operation returns the data to the client for interpretation.
882 .LP
883 Note:  On UNIX servers the attributes are never used, since
884 symbolic links always have mode 0777.
885 .KS
886 .NH 3
887 \&Create Directory
888 .IX "NFS server procedures" NFSPROC_MKDIR() "" \fINFSPROC_MKDIR()\fP
889 .DS
890 diropres
891 NFSPROC_MKDIR (createargs) = 14;
892 .DE
893 .KE
894 The new directory "where.name" is created in the directory given by
895 "where.dir".  The initial attributes of the new directory are given
896 by "attributes".  A reply "status" of NFS_OK indicates that the new
897 directory was created, and reply "file" and  reply "attributes" are
898 its file  handle and attributes.  Any  other  reply "status"  means
899 that the operation failed and no directory was created.
900 .LP
901 Note: possibly non-idempotent operation.
902 .KS
903 .NH 3
904 \&Remove Directory
905 .IX "NFS server procedures" NFSPROC_RMDIR() "" \fINFSPROC_RMDIR()\fP
906 .DS
907 stat
908 NFSPROC_RMDIR(diropargs) = 15;
909 .DE
910 .KE
911 The existing empty directory "name" in the directory given by "dir"
912 is removed.  If the reply is 
913 .I NFS_OK ,
914 the directory was removed.
915 .LP
916 Note: possibly non-idempotent operation.
917 .KS
918 .NH 3
919 \&Read From Directory
920 .IX "NFS server procedures" NFSPROC_READDIR() "" \fINFSPROC_READDIR()\fP
921 .DS
922 struct readdirargs {
923         fhandle dir;            
924         nfscookie cookie;
925         unsigned count;         
926 };
927
928 struct entry {
929         unsigned fileid;
930         filename name;
931         nfscookie cookie;
932         entry *nextentry;
933 };
934
935 union readdirres switch (stat status) {
936         case NFS_OK:
937                 struct {
938                         entry *entries;
939                         bool eof;
940                 } readdirok;
941         default:
942                 void;
943 };
944
945 readdirres
946 NFSPROC_READDIR (readdirargs) = 16;
947 .DE
948 .KE
949 Returns a variable number of  directory entries,  with a total size
950 of up to "count" bytes, from the directory given  by "dir".  If the
951 returned  value of "status"  is 
952 .I NFS_OK ,
953 then  it  is followed  by a
954 variable  number  of "entry"s.    Each "entry" contains  a "fileid"
955 which consists of a  unique number  to identify the  file within  a
956 filesystem,  the  "name" of the  file, and a "cookie" which   is an
957 opaque pointer to the next entry in  the  directory.  The cookie is
958 used  in the next  
959 .I READDIR 
960 call to get more  entries  starting at a
961 given point in  the directory.  The  special cookie zero (all  bits
962 zero) can be used to get the entries starting  at the  beginning of
963 the directory.  The "fileid" field should be the same number as the
964 "fileid" in the attributes of the file.  (See the
965 .I "Basic Data Types"
966 section.) 
967 The "eof" flag has a value of
968 .I TRUE 
969 if there are no more entries in the directory.
970 .KS
971 .NH 3
972 \&Get Filesystem Attributes
973 .IX "NFS server procedures" NFSPROC_STATFS() "" \fINFSPROC_STATFS()\fP
974 .DS
975 union statfsres (stat status) {
976         case NFS_OK:
977                 struct {
978                         unsigned tsize; 
979                         unsigned bsize; 
980                         unsigned blocks;
981                         unsigned bfree; 
982                         unsigned bavail;
983                 } info;
984         default:
985                 void;
986 };
987
988 statfsres
989 NFSPROC_STATFS(fhandle) = 17;
990 .DE
991 .KE
992 If the  reply "status"  is 
993 .I NFS_OK ,
994 then the  reply "info" gives the
995 attributes for the filesystem that contains file referred to by the
996 input fhandle.  The attribute fields contain the following values:
997 .IP tsize:   
998 The optimum transfer size of the server in bytes.  This is
999 the number  of bytes the server  would like to have in the
1000 data part of READ and WRITE requests.
1001 .IP bsize:   
1002 The block size in bytes of the filesystem.
1003 .IP blocks:  
1004 The total number of "bsize" blocks on the filesystem.
1005 .IP bfree:   
1006 The number of free "bsize" blocks on the filesystem.
1007 .IP bavail:  
1008 The number of  "bsize" blocks  available to non-privileged users.
1009 .LP
1010 Note: This call does not  work well if a  filesystem has  variable
1011 size blocks.
1012 .NH 1
1013 \&NFS Implementation Issues
1014 .IX NFS implementation
1015 .LP
1016 The NFS protocol is designed to be operating system independent, but
1017 since this version was designed in a UNIX environment, many
1018 operations have semantics similar to the operations of the UNIX file
1019 system.  This section discusses some of the implementation-specific
1020 semantic issues.
1021 .NH 2
1022 \&Server/Client Relationship
1023 .IX NFS "server/client relationship"
1024 .LP
1025 The NFS protocol is designed to allow servers to be as simple and
1026 general as possible.  Sometimes the simplicity of the server can be a
1027 problem, if the client wants to implement complicated filesystem
1028 semantics.
1029 .LP
1030 For example, some operating systems allow removal of open files.  A
1031 process can open a file and, while it is open, remove it from the
1032 directory.  The file can be read and written as long as the process
1033 keeps it open, even though the file has no name in the filesystem.
1034 It is impossible for a stateless server to implement these semantics.
1035 The client can do some tricks such as renaming the file on remove,
1036 and only removing it on close.  We believe that the server provides
1037 enough functionality to implement most file system semantics on the
1038 client.
1039 .LP
1040 Every NFS client can also potentially be a server, and remote and
1041 local mounted filesystems can be freely intermixed.  This leads to
1042 some interesting problems when a client travels down the directory
1043 tree of a remote filesystem and reaches the mount point on the server
1044 for another remote filesystem.  Allowing the server to follow the
1045 second remote mount would require loop detection, server lookup, and
1046 user revalidation.  Instead, we decided not to let clients cross a
1047 server's mount point.  When a client does a LOOKUP on a directory on
1048 which the server has mounted a filesystem, the client sees the
1049 underlying directory instead of the mounted directory.  A client can
1050 do remote mounts that match the server's mount points to maintain the
1051 server's view.
1052 .LP
1053 .NH 2
1054 \&Pathname Interpretation
1055 .IX NFS "pathname interpretation"
1056 .LP
1057 There are a few complications to the rule that pathnames are always
1058 parsed on the client.  For example, symbolic links could have
1059 different interpretations on different clients.  Another common
1060 problem for non-UNIX implementations is the special interpretation of
1061 the pathname ".."  to mean the parent of a given directory.  The next
1062 revision of the protocol uses an explicit flag to indicate the parent
1063 instead.
1064 .NH 2
1065 \&Permission Issues
1066 .IX NFS "permission issues"
1067 .LP
1068 The NFS protocol, strictly speaking, does not define the permission
1069 checking used  by servers.  However,  it is  expected that a server
1070 will do normal operating system permission checking using 
1071 .I AUTH_UNIX 
1072 style authentication as the basis of its protection mechanism.  The
1073 server gets the client's effective "uid", effective "gid", and groups
1074 on each call and uses them to check permission.  There are various
1075 problems with this method that can been resolved in interesting ways.
1076 .LP
1077 Using "uid" and "gid" implies that the client and server share the
1078 same "uid" list.  Every server and client pair must have the same
1079 mapping from user to "uid" and from group to "gid".  Since every
1080 client can also be a server, this tends to imply that the whole
1081 network shares the same "uid/gid" space.
1082 .I AUTH_DES 
1083 (and the  next
1084 revision of the NFS protocol) uses string names instead of numbers,
1085 but there are still complex problems to be solved.
1086 .LP
1087 Another problem arises due to the usually stateful open operation.
1088 Most operating systems check permission at open time, and then check
1089 that the file is open on each read and write request.  With stateless
1090 servers, the server has no idea that the file is open and must do
1091 permission checking on each read and write call.  On a local
1092 filesystem, a user can open a file and then change the permissions so
1093 that no one is allowed to touch it, but will still be able to write
1094 to the file because it is open.  On a remote filesystem, by contrast,
1095 the write would fail.  To get around this problem, the server's
1096 permission checking algorithm should allow the owner of a file to
1097 access it regardless of the permission setting.
1098 .LP
1099 A similar problem has to do with paging in from a file over the
1100 network.  The operating system usually checks for execute permission
1101 before opening a file for demand paging, and then reads blocks from
1102 the open file.  The file may not have read permission, but after it
1103 is opened it doesn't matter.  An NFS server can not tell the
1104 difference between a normal file read and a demand page-in read.  To
1105 make this work, the server allows reading of files if the "uid" given
1106 in the call has execute or read permission on the file.
1107 .LP
1108 In most operating systems, a particular user (on the user ID zero)
1109 has access to all files no matter what permission and ownership they
1110 have.  This "super-user" permission may not be allowed on the server,
1111 since anyone who can become super-user on their workstation could
1112 gain access to all remote files.  The UNIX server by default maps
1113 user id 0 to -2 before doing its access checking.  This works except
1114 for NFS root filesystems, where super-user access cannot be avoided.
1115 .NH 2
1116 \&Setting RPC Parameters
1117 .IX NFS "setting RPC parameters"
1118 .LP
1119 Various file system parameters and options should be set at mount
1120 time.  The mount protocol is described in the appendix below.  For
1121 example, "Soft" mounts as well as "Hard" mounts are usually both
1122 provided.  Soft mounted file systems return errors when RPC
1123 operations fail (after a given number of optional retransmissions),
1124 while hard mounted file systems continue to retransmit forever.
1125 Clients and servers may need to keep caches of recent operations to
1126 help avoid problems with non-idempotent operations.
1127 .NH 1
1128 \&Mount Protocol Definition
1129 .IX "mount protocol" "" "" "" PAGE MAJOR
1130 .sp 1
1131 .NH 2
1132 \&Introduction
1133 .IX "mount protocol" introduction
1134 .LP
1135 The mount protocol is separate from, but related to, the NFS
1136 protocol.  It provides operating system specific services to get the
1137 NFS off the ground -- looking up server path names, validating user
1138 identity, and checking access permissions.  Clients use the mount
1139 protocol to get the first file handle, which allows them entry into a
1140 remote filesystem.
1141 .LP
1142 The mount protocol is kept separate from the NFS protocol to make it
1143 easy to plug in new access checking and validation methods without
1144 changing the NFS server protocol.
1145 .LP
1146 Notice that the protocol definition implies stateful servers because
1147 the server maintains a list of client's mount requests.  The mount
1148 list information is not critical for the correct functioning of
1149 either the client or the server.  It is intended for advisory use
1150 only, for example, to warn possible clients when a server is going
1151 down.
1152 .LP
1153 Version one of the mount protocol is used with version two of the NFS
1154 protocol.  The only connecting point is the
1155 .I fhandle 
1156 structure, which is the same for both protocols.
1157 .NH 2
1158 \&RPC Information
1159 .IX "mount protocol"  "RPC information"
1160 .IP \fIAuthentication\fP
1161 The mount service uses 
1162 .I AUTH_UNIX 
1163 and 
1164 .I AUTH_DES 
1165 style authentication only.
1166 .IP "\fITransport Protocols\fP"
1167 The mount service is currently supported on UDP/IP only.
1168 .IP "\fIPort Number\fP"
1169 Consult the server's portmapper, described in the chapter
1170 .I "Remote Procedure Calls: Protocol Specification",
1171 to  find  the  port number on which the mount service is registered.
1172 .NH 2
1173 \&Sizes of XDR Structures
1174 .IX "mount protocol" "XDR structure sizes"
1175 .LP
1176 These  are  the sizes,   given  in  decimal   bytes, of various XDR
1177 structures used in the protocol:
1178 .DS
1179 /* \fIThe maximum number of bytes in a pathname argument\fP */
1180 const MNTPATHLEN = 1024;
1181
1182 /* \fIThe maximum number of bytes in a name argument\fP */
1183 const MNTNAMLEN = 255;
1184
1185 /* \fIThe size in bytes of the opaque file handle\fP */
1186 const FHSIZE = 32;
1187 .DE
1188 .NH 2
1189 \&Basic Data Types
1190 .IX "mount protocol" "basic data types"
1191 .IX "mount data types"
1192 .LP
1193 This section presents the data  types used by  the  mount protocol.
1194 In many cases they are similar to the types used in NFS.
1195 .KS
1196 .NH 3
1197 \&fhandle
1198 .IX "mount data types" fhandle "" \fIfhandle\fP
1199 .DS
1200 typedef opaque fhandle[FHSIZE];
1201 .DE
1202 .KE
1203 The type 
1204 .I fhandle 
1205 is the file handle that the server passes to the
1206 client.  All file operations are done  using file handles  to refer
1207 to a  file  or directory.   The  file handle  can  contain whatever
1208 information the server needs to distinguish an individual file.
1209 .LP
1210 This  is the  same as the "fhandle" XDR definition in version 2 of
1211 the NFS protocol;  see 
1212 .I "Basic Data Types"
1213 in the definition of the NFS protocol, above.
1214 .KS
1215 .NH 3
1216 \&fhstatus
1217 .IX "mount data types" fhstatus "" \fIfhstatus\fP
1218 .DS
1219 union fhstatus switch (unsigned status) {
1220         case 0:
1221                 fhandle directory;
1222         default:
1223                 void;
1224 };
1225 .DE
1226 .KE
1227 The type 
1228 .I fhstatus 
1229 is a union.  If a "status" of zero is returned,
1230 the  call completed   successfully, and  a  file handle   for   the
1231 "directory"  follows.  A  non-zero  status indicates  some  sort of
1232 error.  In this case the status is a UNIX error number.
1233 .KS
1234 .NH 3
1235 \&dirpath
1236 .IX "mount data types" dirpath "" \fIdirpath\fP
1237 .DS
1238 typedef string dirpath<MNTPATHLEN>;
1239 .DE
1240 .KE
1241 The type 
1242 .I dirpath 
1243 is a server pathname of a directory.
1244 .KS
1245 .NH 3
1246 \&name
1247 .IX "mount data types" name "" \fIname\fP
1248 .DS
1249 typedef string name<MNTNAMLEN>;
1250 .DE
1251 .KE
1252 The type 
1253 .I name 
1254 is an arbitrary string used for various names.
1255 .NH 2
1256 \&Server Procedures
1257 .IX "mount server procedures"
1258 .LP
1259 The following sections define the RPC procedures  supplied by a
1260 mount server.
1261 .ie t .DS
1262 .el .DS L
1263 .ft I
1264 /*
1265 * Protocol description for the mount program
1266 */
1267 .ft CW
1268
1269 program MOUNTPROG {
1270 .ft I
1271 /*
1272 * Version 1 of the mount protocol used with
1273 * version 2 of the NFS protocol.
1274 */
1275 .ft CW
1276         version MOUNTVERS {
1277                 void        MOUNTPROC_NULL(void)    = 0;
1278                 fhstatus    MOUNTPROC_MNT(dirpath)  = 1;
1279                 mountlist   MOUNTPROC_DUMP(void)    = 2;
1280                 void        MOUNTPROC_UMNT(dirpath) = 3;
1281                 void        MOUNTPROC_UMNTALL(void) = 4;
1282                 exportlist  MOUNTPROC_EXPORT(void)  = 5;
1283         } = 1;
1284 } = 100005;
1285 .DE
1286 .KS
1287 .NH 3
1288 \&Do Nothing
1289 .IX "mount server procedures" MNTPROC_NULL() "" \fIMNTPROC_NULL()\fP
1290 .DS
1291 void 
1292 MNTPROC_NULL(void) = 0;
1293 .DE
1294 .KE
1295 This  procedure does no work.  It   is  made  available in all  RPC
1296 services to allow server response testing and timing.
1297 .KS
1298 .NH 3
1299 \&Add Mount Entry
1300 .IX "mount server procedures" MNTPROC_MNT() "" \fIMNTPROC_MNT()\fP
1301 .DS
1302 fhstatus
1303 MNTPROC_MNT(dirpath) = 1;
1304 .DE
1305 .KE
1306 If the reply "status" is 0, then the reply "directory" contains the
1307 file handle for the directory "dirname".  This file handle may be
1308 used in the NFS protocol.  This procedure also adds a new entry to
1309 the mount list for this client mounting "dirname".
1310 .KS
1311 .NH 3
1312 \&Return Mount Entries
1313 .IX "mount server procedures" MNTPROC_DUMP() "" \fIMNTPROC_DUMP()\fP
1314 .DS
1315 struct *mountlist {
1316         name      hostname;
1317         dirpath   directory;
1318         mountlist nextentry;
1319 };
1320
1321 mountlist
1322 MNTPROC_DUMP(void) = 2;
1323 .DE
1324 .KE
1325 Returns  the list of  remote mounted filesystems.   The "mountlist"
1326 contains one entry for each "hostname" and "directory" pair.
1327 .KS
1328 .NH 3
1329 \&Remove Mount Entry
1330 .IX "mount server procedures" MNTPROC_UMNT() "" \fIMNTPROC_UMNT()\fP
1331 .DS
1332 void
1333 MNTPROC_UMNT(dirpath) = 3;
1334 .DE
1335 .KE
1336 Removes the mount list entry for the input "dirpath".
1337 .KS
1338 .NH 3
1339 \&Remove All Mount Entries
1340 .IX "mount server procedures" MNTPROC_UMNTALL() "" \fIMNTPROC_UMNTALL()\fP
1341 .DS
1342 void
1343 MNTPROC_UMNTALL(void) = 4;
1344 .DE
1345 .KE
1346 Removes all of the mount list entries for this client.
1347 .KS
1348 .NH 3
1349 \&Return Export List
1350 .IX "mount server procedures" MNTPROC_EXPORT() "" \fIMNTPROC_EXPORT()\fP
1351 .DS
1352 struct *groups {
1353         name grname;
1354         groups grnext;
1355 };
1356
1357 struct *exportlist {
1358         dirpath filesys;
1359         groups groups;
1360         exportlist next;
1361 };
1362
1363 exportlist
1364 MNTPROC_EXPORT(void) = 5;
1365 .DE
1366 .KE
1367 Returns a variable number of export list entries.  Each entry
1368 contains a filesystem name and a list of groups that are allowed to
1369 import it.  The filesystem name is in "filesys", and the group name
1370 is in the list "groups".
1371 .LP
1372 Note:  The exportlist should contain
1373 more information about the status of the filesystem, such as a
1374 read-only flag.