aux/portmapper [ rpc-options... ]
The rpc-options are all intended for debugging: .nr zz \w'\f5-a\f2 addr'+2n/1n
\n(zz -r Reject: answer all RPC requests by returning the AUTH_TOOWEAK error.
-v Verbose: show all RPC calls and internal program state, including 9P messages. (In any case, the program creates a file /srv/ name .chat where name is that of the program; echoing .L 1 or .L 0 into this file sets or clears the -v flag dynamically.)
-D Debug: show all RPC messages (at a lower level than -v ). This flag may be repeated to get more detail.
-C Turn off caching: do not answer RPC requests using the RPC reply cache.
The nfs-options are:
\n(zz -a " addr" Set up NFS service for the 9P server at network address addr .
-f " file" Set up NFS service for the 9P server at file (typically an entry in /srv ).
-n Do not allow per-user authentication (default and mandatory).
-c " file" File contains the uid/gid map configuration. It is read at startup and subsequently every hour (or if .L c is echoed into /srv/nfsserver.chat ). Blank lines or lines beginning with .L # are ignored; lines beginning with .L ! are executed as commands; otherwise lines contain four fields separated by white space: a regular expression (in the notation of regexp (6)) for a class of servers, a regular expression for a class of clients, a file of user id's (in the format of a Unix password file), and a file of group id's (same format).
-s Expect a network connection on file descriptor 1 instead of listening for incoming calls.
-t Listen for incoming TCP calls, rather than UDP calls.
NFS clients must be in the Plan 9 /lib/ndb database. The machine name is deduced from the IP address via ndb/query . The machine name specified in the NFS Unix credentials is completely ignored.
Pcnfsd is a toy program that authorizes PC-NFS clients. All clients are mapped to uid=1, gid=1 ( daemon on most systems) regardless of name or password.
.EX !9fs tcp!ivy .+ [^.]+\e.cvrd\e.hall\e.edu /n/ivy/etc/passwd /n/ivy/etc/group
A typical entry in /rc/bin/cpurc might be:
.EX aux/nfsserver -a tcp!pie -a tcp!yoshimi -c /lib/ndb/nfs aux/pcnfsd aux/portmapper
Assuming the CPU server's name is eduardo , the mount commands on the client would be:
.EX /etc/mount -o soft,intr eduardo:pie /n/pie /etc/mount -o soft,intr eduardo:yoshimi /n/yoshimi
Note that a single instance of nfsserver may provide access to several 9P servers.
/lib/ndb/nfs List of uid/gid maps.
RFC1057, "RPC: Remote Procedure Call Protocol Specification, Version 2," describes Sun's RPC protocol.
RFC1094, "NFS: Network File System Protocol Specification," describes NFS version 2.
RFC1813, "NFS Version 3 Protocol Specification."
RFC3530, "Network File System (NFS) version 4 Protocol."