146986Smckusick /* 2*63236Sbostic * Copyright (c) 1991, 1993 3*63236Sbostic * The Regents of the University of California. 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*63236Sbostic * @(#)nfsdiskless.h 8.1 (Berkeley) 06/10/93 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. 1852196Smckusick * The primary bootstrap is expected to fill in the appropriate fields before 1952196Smckusick * starting vmunix. Whether or not the swap area is nfs mounted is determined 2052196Smckusick * by the value in swdevt[0]. (equal to NODEV --> swap over nfs) 2152196Smckusick * Currently only works for AF_INET protocols. 2252196Smckusick * NB: All fields are stored in net byte order to avoid hassles with 2352196Smckusick * client/server byte ordering differences. 2446986Smckusick */ 2546986Smckusick struct nfs_diskless { 2652196Smckusick struct ifaliasreq myif; /* Default interface */ 2752196Smckusick struct sockaddr_in mygateway; /* Default gateway */ 2852196Smckusick struct nfs_args swap_args; /* Mount args for swap file */ 2952196Smckusick u_char swap_fh[NFS_FHSIZE]; /* Swap file's file handle */ 3052196Smckusick struct sockaddr_in swap_saddr; /* Address of swap server */ 3152196Smckusick char swap_hostnam[MNAMELEN]; /* Host name for mount pt */ 3252196Smckusick int swap_nblks; /* Size of server swap file */ 3355081Storek struct ucred swap_ucred; /* Swap credentials */ 3452196Smckusick struct nfs_args root_args; /* Mount args for root fs */ 3552196Smckusick u_char root_fh[NFS_FHSIZE]; /* File handle of root dir */ 3652196Smckusick struct sockaddr_in root_saddr; /* Address of root server */ 3752196Smckusick char root_hostnam[MNAMELEN]; /* Host name for mount pt */ 3857782Smckusick long root_time; /* Timestamp of root fs */ 3952444Smckusick char my_hostnam[MAXHOSTNAMELEN]; /* Client host name */ 4046986Smckusick }; 41