xref: /original-bsd/sys/nfs/nfsdiskless.h (revision b4971bb3)
1 /*
2  * Copyright (c) 1991 The Regents of the University of California.
3  * All rights reserved.
4  *
5  * This code is derived from software contributed to Berkeley by
6  * Rick Macklem at The University of Guelph.
7  *
8  * %sccs.include.redist.c%
9  *
10  *	@(#)nfsdiskless.h	7.5 (Berkeley) 02/02/93
11  */
12 
13 /*
14  * Structure that must be initialized for a diskless nfs client.
15  * This structure is used by nfs_mountroot() to set up the root and swap
16  * vnodes plus do a partial ifconfig(8) and route(8) so that the critical net
17  * interface can communicate with the server.
18  * The primary bootstrap is expected to fill in the appropriate fields before
19  * starting vmunix. Whether or not the swap area is nfs mounted is determined
20  * by the value in swdevt[0]. (equal to NODEV --> swap over nfs)
21  * Currently only works for AF_INET protocols.
22  * NB: All fields are stored in net byte order to avoid hassles with
23  * client/server byte ordering differences.
24  */
25 struct nfs_diskless {
26 	struct ifaliasreq myif;			/* Default interface */
27 	struct sockaddr_in mygateway;		/* Default gateway */
28 	struct nfs_args	swap_args;		/* Mount args for swap file */
29 	u_char		swap_fh[NFS_FHSIZE];	/* Swap file's file handle */
30 	struct sockaddr_in swap_saddr;		/* Address of swap server */
31 	char		swap_hostnam[MNAMELEN];	/* Host name for mount pt */
32 	int		swap_nblks;		/* Size of server swap file */
33 	struct ucred	swap_ucred;		/* Swap credentials */
34 	struct nfs_args	root_args;		/* Mount args for root fs */
35 	u_char		root_fh[NFS_FHSIZE];	/* File handle of root dir */
36 	struct sockaddr_in root_saddr;		/* Address of root server */
37 	char		root_hostnam[MNAMELEN];	/* Host name for mount pt */
38 	long		root_time;		/* Timestamp of root fs */
39 	char		my_hostnam[MAXHOSTNAMELEN]; /* Client host name */
40 };
41