Commit | Line | Data |
---|---|---|
0348afce KM |
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 | * | |
ffbde618 | 10 | * @(#)nfsdiskless.h 7.4 (Berkeley) %G% |
0348afce KM |
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. | |
2c5b44a2 KM |
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. | |
0348afce KM |
24 | */ |
25 | struct nfs_diskless { | |
2c5b44a2 KM |
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 */ | |
ffbde618 | 33 | struct ucred swap_ucred; /* Swap credentials */ |
2c5b44a2 KM |
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 */ | |
ffbde618 | 38 | time_t root_time; /* Timestamp of root fs */ |
ab84b0a7 | 39 | char my_hostnam[MAXHOSTNAMELEN]; /* Client host name */ |
0348afce | 40 | }; |