1 /* 2 * Copyright (c) 1989, 1993 3 * The Regents of the University of California. 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 8.3 (Berkeley) 03/30/95 11 */ 12 13 14 #ifndef _NFS_NFSMOUNT_H_ 15 #define _NFS_NFSMOUNT_H_ 16 17 /* 18 * Mount structure. 19 * One allocated on every NFS mount. 20 * Holds NFS specific information for mount. 21 */ 22 struct nfsmount { 23 int nm_flag; /* Flags for soft/hard... */ 24 struct mount *nm_mountp; /* Vfs structure for this filesystem */ 25 int nm_numgrps; /* Max. size of groupslist */ 26 u_char nm_fh[NFSX_V3FHMAX]; /* File handle of root dir */ 27 int nm_fhsize; /* Size of root file handle */ 28 struct socket *nm_so; /* Rpc socket */ 29 int nm_sotype; /* Type of socket */ 30 int nm_soproto; /* and protocol */ 31 int nm_soflags; /* pr_flags for socket protocol */ 32 struct mbuf *nm_nam; /* Addr of server */ 33 int nm_timeo; /* Init timer for NFSMNT_DUMBTIMR */ 34 int nm_retry; /* Max retries */ 35 int nm_srtt[4]; /* Timers for rpcs */ 36 int nm_sdrtt[4]; 37 int nm_sent; /* Request send count */ 38 int nm_cwnd; /* Request send window */ 39 int nm_timeouts; /* Request timeouts */ 40 int nm_deadthresh; /* Threshold of timeouts-->dead server*/ 41 int nm_rsize; /* Max size of read rpc */ 42 int nm_wsize; /* Max size of write rpc */ 43 int nm_readdirsize; /* Size of a readdir rpc */ 44 int nm_readahead; /* Num. of blocks to readahead */ 45 int nm_leaseterm; /* Term (sec) for NQNFS lease */ 46 CIRCLEQ_HEAD(, nfsnode) nm_timerhead; /* Head of lease timer queue */ 47 struct vnode *nm_inprog; /* Vnode in prog by nqnfs_clientd() */ 48 uid_t nm_authuid; /* Uid for authenticator */ 49 int nm_authtype; /* Authenticator type */ 50 int nm_authlen; /* and length */ 51 char *nm_authstr; /* Authenticator string */ 52 char *nm_verfstr; /* and the verifier */ 53 int nm_verflen; 54 u_char nm_verf[NFSX_V3WRITEVERF]; /* V3 write verifier */ 55 NFSKERBKEY_T nm_key; /* and the session key */ 56 int nm_numuids; /* Number of nfsuid mappings */ 57 TAILQ_HEAD(, nfsuid) nm_uidlruhead; /* Lists of nfsuid mappings */ 58 LIST_HEAD(, nfsuid) nm_uidhashtbl[NFS_MUIDHASHSIZ]; 59 }; 60 61 #ifdef KERNEL 62 /* 63 * Convert mount ptr to nfsmount ptr. 64 */ 65 #define VFSTONFS(mp) ((struct nfsmount *)((mp)->mnt_data)) 66 #endif /* KERNEL */ 67 68 /* 69 * Prototypes for NFS mount operations 70 */ 71 int nfs_mount __P(( 72 struct mount *mp, 73 char *path, 74 caddr_t data, 75 struct nameidata *ndp, 76 struct proc *p)); 77 int nfs_start __P(( 78 struct mount *mp, 79 int flags, 80 struct proc *p)); 81 int nfs_unmount __P(( 82 struct mount *mp, 83 int mntflags, 84 struct proc *p)); 85 int nfs_root __P(( 86 struct mount *mp, 87 struct vnode **vpp)); 88 int nfs_quotactl __P(( 89 struct mount *mp, 90 int cmds, 91 uid_t uid, 92 caddr_t arg, 93 struct proc *p)); 94 int nfs_statfs __P(( 95 struct mount *mp, 96 struct statfs *sbp, 97 struct proc *p)); 98 int nfs_sync __P(( 99 struct mount *mp, 100 int waitfor, 101 struct ucred *cred, 102 struct proc *p)); 103 int nfs_fhtovp __P(( 104 struct mount *mp, 105 struct fid *fhp, 106 struct mbuf *nam, 107 struct vnode **vpp, 108 int *exflagsp, 109 struct ucred **credanonp)); 110 int nfs_vptofh __P(( 111 struct vnode *vp, 112 struct fid *fhp)); 113 int nfs_init __P(()); 114 115 #endif 116