1 /* 2 * Copyright (c) 1989 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 * @(#)nfsmount.h 7.9 (Berkeley) 01/14/92 11 */ 12 13 /* 14 * Mount structure. 15 * One allocated on every NFS mount. 16 * Holds NFS specific information for mount. 17 */ 18 struct nfsmount { 19 int nm_flag; /* Flags for soft/hard... */ 20 struct mount *nm_mountp; /* Vfs structure for this filesystem */ 21 int nm_numgrps; /* Max. size of groupslist */ 22 nfsv2fh_t nm_fh; /* File handle of root dir */ 23 struct socket *nm_so; /* Rpc socket */ 24 int nm_sotype; /* Type of socket */ 25 int nm_soproto; /* and protocol */ 26 int nm_soflags; /* pr_flags for socket protocol */ 27 struct mbuf *nm_nam; /* Addr of server */ 28 int nm_timeo; /* Init timer for NFSMNT_DUMBTIMR */ 29 int nm_retry; /* Max retries */ 30 int nm_srtt[4]; /* Timers for rpcs */ 31 int nm_sdrtt[4]; 32 int nm_sent; /* Request send count */ 33 int nm_cwnd; /* Request send window */ 34 int nm_timeouts; /* Request timeouts */ 35 int nm_deadthresh; /* Threshold of timeouts-->dead server*/ 36 int nm_rsize; /* Max size of read rpc */ 37 int nm_wsize; /* Max size of write rpc */ 38 int nm_readahead; /* Num. of blocks to readahead */ 39 int nm_leaseterm; /* Term (sec) for NQNFS lease */ 40 struct nfsnode *nm_tnext; /* Head of lease timer queue */ 41 struct nfsnode *nm_tprev; 42 struct vnode *nm_inprog; /* Vnode in prog by nqnfs_clientd() */ 43 uid_t nm_authuid; /* Uid for authenticator */ 44 int nm_authtype; /* Authenticator type */ 45 int nm_authlen; /* and length */ 46 char *nm_authstr; /* Authenticator string */ 47 }; 48 49 #ifdef KERNEL 50 /* 51 * Convert mount ptr to nfsmount ptr. 52 */ 53 #define VFSTONFS(mp) ((struct nfsmount *)((mp)->mnt_data)) 54 #endif /* KERNEL */ 55 56 /* 57 * Prototypes for NFS mount operations 58 */ 59 int nfs_mount __P(( 60 struct mount *mp, 61 char *path, 62 caddr_t data, 63 struct nameidata *ndp, 64 struct proc *p)); 65 int nfs_start __P(( 66 struct mount *mp, 67 int flags, 68 struct proc *p)); 69 int nfs_unmount __P(( 70 struct mount *mp, 71 int mntflags, 72 struct proc *p)); 73 int nfs_root __P(( 74 struct mount *mp, 75 struct vnode **vpp)); 76 int nfs_quotactl __P(( 77 struct mount *mp, 78 int cmds, 79 u_int uid, /* should be uid_t */ 80 caddr_t arg, 81 struct proc *p)); 82 int nfs_statfs __P(( 83 struct mount *mp, 84 struct statfs *sbp, 85 struct proc *p)); 86 int nfs_sync __P(( 87 struct mount *mp, 88 int waitfor)); 89 int nfs_fhtovp __P(( 90 struct mount *mp, 91 struct fid *fhp, 92 int setgen, 93 struct vnode **vpp)); 94 int nfs_vptofh __P(( 95 struct vnode *vp, 96 struct fid *fhp)); 97 int nfs_init __P(()); 98