138414Smckusick /* 263236Sbostic * Copyright (c) 1989, 1993 363236Sbostic * The Regents of the University of California. All rights reserved. 438414Smckusick * 538414Smckusick * This code is derived from software contributed to Berkeley by 638414Smckusick * Rick Macklem at The University of Guelph. 738414Smckusick * 844515Sbostic * %sccs.include.redist.c% 938414Smckusick * 10*68653Smckusick * @(#)nfsmount.h 8.3 (Berkeley) 03/30/95 1138414Smckusick */ 1238414Smckusick 13*68653Smckusick 14*68653Smckusick #ifndef _NFS_NFSMOUNT_H_ 15*68653Smckusick #define _NFS_NFSMOUNT_H_ 16*68653Smckusick 1738414Smckusick /* 1838414Smckusick * Mount structure. 1940122Smckusick * One allocated on every NFS mount. 2040122Smckusick * Holds NFS specific information for mount. 2138414Smckusick */ 2238414Smckusick struct nfsmount { 2338414Smckusick int nm_flag; /* Flags for soft/hard... */ 2440122Smckusick struct mount *nm_mountp; /* Vfs structure for this filesystem */ 2552196Smckusick int nm_numgrps; /* Max. size of groupslist */ 26*68653Smckusick u_char nm_fh[NFSX_V3FHMAX]; /* File handle of root dir */ 27*68653Smckusick int nm_fhsize; /* Size of root file handle */ 2841895Smckusick struct socket *nm_so; /* Rpc socket */ 2941895Smckusick int nm_sotype; /* Type of socket */ 3041895Smckusick int nm_soproto; /* and protocol */ 3141895Smckusick int nm_soflags; /* pr_flags for socket protocol */ 3241895Smckusick struct mbuf *nm_nam; /* Addr of server */ 3352196Smckusick int nm_timeo; /* Init timer for NFSMNT_DUMBTIMR */ 3452196Smckusick int nm_retry; /* Max retries */ 3552196Smckusick int nm_srtt[4]; /* Timers for rpcs */ 3652196Smckusick int nm_sdrtt[4]; 3752196Smckusick int nm_sent; /* Request send count */ 3852196Smckusick int nm_cwnd; /* Request send window */ 3952196Smckusick int nm_timeouts; /* Request timeouts */ 4052196Smckusick int nm_deadthresh; /* Threshold of timeouts-->dead server*/ 4138414Smckusick int nm_rsize; /* Max size of read rpc */ 4238414Smckusick int nm_wsize; /* Max size of write rpc */ 43*68653Smckusick int nm_readdirsize; /* Size of a readdir rpc */ 4452196Smckusick int nm_readahead; /* Num. of blocks to readahead */ 4552196Smckusick int nm_leaseterm; /* Term (sec) for NQNFS lease */ 46*68653Smckusick CIRCLEQ_HEAD(, nfsnode) nm_timerhead; /* Head of lease timer queue */ 4752196Smckusick struct vnode *nm_inprog; /* Vnode in prog by nqnfs_clientd() */ 4852196Smckusick uid_t nm_authuid; /* Uid for authenticator */ 4952196Smckusick int nm_authtype; /* Authenticator type */ 5052196Smckusick int nm_authlen; /* and length */ 5152196Smckusick char *nm_authstr; /* Authenticator string */ 52*68653Smckusick char *nm_verfstr; /* and the verifier */ 53*68653Smckusick int nm_verflen; 54*68653Smckusick u_char nm_verf[NFSX_V3WRITEVERF]; /* V3 write verifier */ 55*68653Smckusick NFSKERBKEY_T nm_key; /* and the session key */ 56*68653Smckusick int nm_numuids; /* Number of nfsuid mappings */ 57*68653Smckusick TAILQ_HEAD(, nfsuid) nm_uidlruhead; /* Lists of nfsuid mappings */ 58*68653Smckusick LIST_HEAD(, nfsuid) nm_uidhashtbl[NFS_MUIDHASHSIZ]; 5938414Smckusick }; 6038414Smckusick 6141398Smckusick #ifdef KERNEL 6241398Smckusick /* 6341398Smckusick * Convert mount ptr to nfsmount ptr. 6441398Smckusick */ 6541398Smckusick #define VFSTONFS(mp) ((struct nfsmount *)((mp)->mnt_data)) 6641398Smckusick #endif /* KERNEL */ 6748045Smckusick 6848045Smckusick /* 6948045Smckusick * Prototypes for NFS mount operations 7048045Smckusick */ 7148045Smckusick int nfs_mount __P(( 7248045Smckusick struct mount *mp, 7348045Smckusick char *path, 7448045Smckusick caddr_t data, 7548045Smckusick struct nameidata *ndp, 7648045Smckusick struct proc *p)); 7748045Smckusick int nfs_start __P(( 7848045Smckusick struct mount *mp, 7948045Smckusick int flags, 8048045Smckusick struct proc *p)); 8148045Smckusick int nfs_unmount __P(( 8248045Smckusick struct mount *mp, 8348045Smckusick int mntflags, 8448045Smckusick struct proc *p)); 8548045Smckusick int nfs_root __P(( 8648045Smckusick struct mount *mp, 8748045Smckusick struct vnode **vpp)); 8848045Smckusick int nfs_quotactl __P(( 8948045Smckusick struct mount *mp, 9048045Smckusick int cmds, 9154444Smckusick uid_t uid, 9248045Smckusick caddr_t arg, 9348045Smckusick struct proc *p)); 9448045Smckusick int nfs_statfs __P(( 9548045Smckusick struct mount *mp, 9648045Smckusick struct statfs *sbp, 9748045Smckusick struct proc *p)); 9848045Smckusick int nfs_sync __P(( 9948045Smckusick struct mount *mp, 10054444Smckusick int waitfor, 10154444Smckusick struct ucred *cred, 10254444Smckusick struct proc *p)); 10348045Smckusick int nfs_fhtovp __P(( 10448045Smckusick struct mount *mp, 10548045Smckusick struct fid *fhp, 10654738Smckusick struct mbuf *nam, 10754738Smckusick struct vnode **vpp, 10854738Smckusick int *exflagsp, 10954738Smckusick struct ucred **credanonp)); 11048045Smckusick int nfs_vptofh __P(( 11148045Smckusick struct vnode *vp, 11248045Smckusick struct fid *fhp)); 11348045Smckusick int nfs_init __P(()); 114*68653Smckusick 115*68653Smckusick #endif 116