diff options
author | dfr <dfr@FreeBSD.org> | 1995-06-27 11:07:30 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 1995-06-27 11:07:30 +0000 |
commit | 666343f7f055c064375d48bb9a608730d7145beb (patch) | |
tree | 372bad41f8c547f40d0826ed596c53dc772ab986 /usr.bin/showmount | |
parent | 6da3ef32238f37b3b45cf709205fcff60bcbda7f (diff) | |
download | FreeBSD-src-666343f7f055c064375d48bb9a608730d7145beb.zip FreeBSD-src-666343f7f055c064375d48bb9a608730d7145beb.tar.gz |
Changes to support version 3 of the NFS protocol.
The version 2 support has been tested (client+server) against FreeBSD-2.0,
IRIX 5.3 and FreeBSD-current (using a loopback mount). The version 2 support
is stable AFAIK.
The version 3 support has been tested with a loopback mount and minimally
against an IRIX 5.3 server. It needs more testing and may have problems.
I have patched amd to support the new variable length filehandles although
it will still only use version 2 of the protocol.
Before booting a kernel with these changes, nfs clients will need to at least
build and install /usr/sbin/mount_nfs. Servers will need to build and
install /usr/sbin/mountd.
NFS diskless support is untested.
Obtained from: Rick Macklem <rick@snowhite.cis.uoguelph.ca>
Diffstat (limited to 'usr.bin/showmount')
-rw-r--r-- | usr.bin/showmount/showmount.8 | 9 | ||||
-rw-r--r-- | usr.bin/showmount/showmount.c | 12 |
2 files changed, 15 insertions, 6 deletions
diff --git a/usr.bin/showmount/showmount.8 b/usr.bin/showmount/showmount.8 index fe84e1e..05c89a9 100644 --- a/usr.bin/showmount/showmount.8 +++ b/usr.bin/showmount/showmount.8 @@ -42,7 +42,7 @@ .Nd show remote nfs mounts on host .Sh SYNOPSIS .Nm showmount -.Op Fl ade +.Op Fl ade3 .Op Ar host .Sh DESCRIPTION .Nm Showmount @@ -56,7 +56,10 @@ file systems mounted on the host. See .%T "NFS: Network File System Protocol Specification" , RFC 1094, -Appendix A , +Appendix A, +and +.%T "NFS: Network File System Version 3 Protocol Specification" , +Appendix I, for a detailed description of the protocol. .Bl -tag -width Ds .It Fl a @@ -70,6 +73,8 @@ List directory paths of mount points instead of hosts Show the .Ar host Ns 's exports list +.It Fl 3 +Use mount protocol Version 3, compatible with NFS Version 3. .El .Sh SEE ALSO .Xr mount 1 , diff --git a/usr.bin/showmount/showmount.c b/usr.bin/showmount/showmount.c index e5a3752..8cb342d 100644 --- a/usr.bin/showmount/showmount.c +++ b/usr.bin/showmount/showmount.c @@ -90,6 +90,7 @@ int xdr_mntdump(), xdr_exports(); * This command queries the NFS mount daemon for it's mount list and/or * it's exports list and prints them out. * See "NFS: Network File System Protocol Specification, RFC1094, Appendix A" + * and the "Network File System Protocol XXX.." * for detailed information on the protocol. */ main(argc, argv) @@ -101,12 +102,12 @@ main(argc, argv) register struct grouplist *grp; extern char *optarg; extern int optind; - register int rpcs = 0; + register int rpcs = 0, mntvers = 1; char ch; char *host; int estat; - while ((ch = getopt(argc, argv, "ade")) != EOF) + while ((ch = getopt(argc, argv, "ade3")) != EOF) switch((char)ch) { case 'a': if (type == 0) { @@ -125,6 +126,9 @@ main(argc, argv) case 'e': rpcs |= DOEXPORTS; break; + case '3': + mntvers = 3; + break; case '?': default: usage(); @@ -141,7 +145,7 @@ main(argc, argv) rpcs = DODUMP; if (rpcs & DODUMP) - if ((estat = callrpc(host, RPCPROG_MNT, RPCMNT_VER1, + if ((estat = callrpc(host, RPCPROG_MNT, mntvers, RPCMNT_DUMP, xdr_void, (char *)0, xdr_mntdump, (char *)&mntdump)) != 0) { clnt_perrno(estat); @@ -149,7 +153,7 @@ main(argc, argv) exit(1); } if (rpcs & DOEXPORTS) - if ((estat = callrpc(host, RPCPROG_MNT, RPCMNT_VER1, + if ((estat = callrpc(host, RPCPROG_MNT, mntvers, RPCMNT_EXPORT, xdr_void, (char *)0, xdr_exports, (char *)&exports)) != 0) { clnt_perrno(estat); |