summaryrefslogtreecommitdiffstats
path: root/usr.bin/showmount/showmount.c
diff options
context:
space:
mode:
authordfr <dfr@FreeBSD.org>1995-06-27 11:07:30 +0000
committerdfr <dfr@FreeBSD.org>1995-06-27 11:07:30 +0000
commit666343f7f055c064375d48bb9a608730d7145beb (patch)
tree372bad41f8c547f40d0826ed596c53dc772ab986 /usr.bin/showmount/showmount.c
parent6da3ef32238f37b3b45cf709205fcff60bcbda7f (diff)
downloadFreeBSD-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/showmount.c')
-rw-r--r--usr.bin/showmount/showmount.c12
1 files changed, 8 insertions, 4 deletions
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);
OpenPOWER on IntegriCloud