xref: /csrg-svn/sys/nfs/nfsdiskless.h (revision 52196)
146986Smckusick /*
246986Smckusick  * Copyright (c) 1991 The Regents of the University of California.
346986Smckusick  * All rights reserved.
446986Smckusick  *
546986Smckusick  * This code is derived from software contributed to Berkeley by
646986Smckusick  * Rick Macklem at The University of Guelph.
746986Smckusick  *
846986Smckusick  * %sccs.include.redist.c%
946986Smckusick  *
10*52196Smckusick  *	@(#)nfsdiskless.h	7.2 (Berkeley) 01/14/92
1146986Smckusick  */
1246986Smckusick 
1346986Smckusick /*
1446986Smckusick  * Structure that must be initialized for a diskless nfs client.
1546986Smckusick  * This structure is used by nfs_mountroot() to set up the root and swap
1646986Smckusick  * vnodes plus do a partial ifconfig(8) and route(8) so that the critical net
1746986Smckusick  * interface can communicate with the server.
18*52196Smckusick  * The primary bootstrap is expected to fill in the appropriate fields before
19*52196Smckusick  * starting vmunix. Whether or not the swap area is nfs mounted is determined
20*52196Smckusick  * by the value in swdevt[0]. (equal to NODEV --> swap over nfs)
21*52196Smckusick  * Currently only works for AF_INET protocols.
22*52196Smckusick  * NB: All fields are stored in net byte order to avoid hassles with
23*52196Smckusick  * client/server byte ordering differences.
2446986Smckusick  */
2546986Smckusick struct nfs_diskless {
26*52196Smckusick 	struct ifaliasreq myif;			/* Default interface */
27*52196Smckusick 	struct sockaddr_in mygateway;		/* Default gateway */
28*52196Smckusick 	struct nfs_args	swap_args;		/* Mount args for swap file */
29*52196Smckusick 	u_char		swap_fh[NFS_FHSIZE];	/* Swap file's file handle */
30*52196Smckusick 	struct sockaddr_in swap_saddr;		/* Address of swap server */
31*52196Smckusick 	char		swap_hostnam[MNAMELEN];	/* Host name for mount pt */
32*52196Smckusick 	int		swap_nblks;		/* Size of server swap file */
33*52196Smckusick 	struct nfs_args	root_args;		/* Mount args for root fs */
34*52196Smckusick 	u_char		root_fh[NFS_FHSIZE];	/* File handle of root dir */
35*52196Smckusick 	struct sockaddr_in root_saddr;		/* Address of root server */
36*52196Smckusick 	char		root_hostnam[MNAMELEN];	/* Host name for mount pt */
3746986Smckusick };
38