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 /sys/nfs/nfsdiskless.h | |
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 'sys/nfs/nfsdiskless.h')
-rw-r--r-- | sys/nfs/nfsdiskless.h | 34 |
1 files changed, 31 insertions, 3 deletions
diff --git a/sys/nfs/nfsdiskless.h b/sys/nfs/nfsdiskless.h index 5df85e0..f7371dc 100644 --- a/sys/nfs/nfsdiskless.h +++ b/sys/nfs/nfsdiskless.h @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfsdiskless.h 8.1 (Berkeley) 6/10/93 - * $Id: nfsdiskless.h,v 1.3 1994/08/05 09:28:49 davidg Exp $ + * $Id: nfsdiskless.h,v 1.4 1994/08/21 06:50:09 paul Exp $ */ #ifndef _NFS_NFSDISKLESS_H_ @@ -52,17 +52,45 @@ * NB: All fields are stored in net byte order to avoid hassles with * client/server byte ordering differences. */ + +/* + * I have defined a new structure that can handle an NFS Version 3 file handle + * but the kernel still expects the old Version 2 one to be provided. The + * changes required in nfs_vfsops.c for using the new are documented there in + * comments. (I felt that breaking network booting code by changing this + * structure would not be prudent at this time, since almost all servers are + * still Version 2 anyhow.) + */ +struct nfsv3_diskless { + struct ifaliasreq myif; /* Default interface */ + struct sockaddr_in mygateway; /* Default gateway */ + struct nfs_args swap_args; /* Mount args for swap file */ + int swap_fhsize; /* Size of file handle */ + u_char swap_fh[NFSX_V3FHMAX]; /* Swap file's file handle */ + struct sockaddr_in swap_saddr; /* Address of swap server */ + char swap_hostnam[MNAMELEN]; /* Host name for mount pt */ + int swap_nblks; /* Size of server swap file */ + struct ucred swap_ucred; /* Swap credentials */ + struct nfs_args root_args; /* Mount args for root fs */ + int root_fhsize; /* Size of root file handle */ + u_char root_fh[NFSX_V3FHMAX]; /* File handle of root dir */ + struct sockaddr_in root_saddr; /* Address of root server */ + char root_hostnam[MNAMELEN]; /* Host name for mount pt */ + long root_time; /* Timestamp of root fs */ + char my_hostnam[MAXHOSTNAMELEN]; /* Client host name */ +}; + struct nfs_diskless { struct ifaliasreq myif; /* Default interface */ struct sockaddr_in mygateway; /* Default gateway */ struct nfs_args swap_args; /* Mount args for swap file */ - u_char swap_fh[NFS_FHSIZE]; /* Swap file's file handle */ + u_char swap_fh[NFSX_V2FH]; /* Swap file's file handle */ struct sockaddr_in swap_saddr; /* Address of swap server */ char swap_hostnam[MNAMELEN]; /* Host name for mount pt */ int swap_nblks; /* Size of server swap file */ struct ucred swap_ucred; /* Swap credentials */ struct nfs_args root_args; /* Mount args for root fs */ - u_char root_fh[NFS_FHSIZE]; /* File handle of root dir */ + u_char root_fh[NFSX_V2FH]; /* File handle of root dir */ struct sockaddr_in root_saddr; /* Address of root server */ char root_hostnam[MNAMELEN]; /* Host name for mount pt */ long root_time; /* Timestamp of root fs */ |