xref: /freebsd/sys/nfsclient/nfs.h (revision b1b7658158f600e16a72965b59a4fe392eb0505d)
1df8bae1dSRodney W. Grimes /*
2df8bae1dSRodney W. Grimes  * Copyright (c) 1989, 1993
3df8bae1dSRodney W. Grimes  *	The Regents of the University of California.  All rights reserved.
4df8bae1dSRodney W. Grimes  *
5df8bae1dSRodney W. Grimes  * This code is derived from software contributed to Berkeley by
6df8bae1dSRodney W. Grimes  * Rick Macklem at The University of Guelph.
7df8bae1dSRodney W. Grimes  *
8df8bae1dSRodney W. Grimes  * Redistribution and use in source and binary forms, with or without
9df8bae1dSRodney W. Grimes  * modification, are permitted provided that the following conditions
10df8bae1dSRodney W. Grimes  * are met:
11df8bae1dSRodney W. Grimes  * 1. Redistributions of source code must retain the above copyright
12df8bae1dSRodney W. Grimes  *    notice, this list of conditions and the following disclaimer.
13df8bae1dSRodney W. Grimes  * 2. Redistributions in binary form must reproduce the above copyright
14df8bae1dSRodney W. Grimes  *    notice, this list of conditions and the following disclaimer in the
15df8bae1dSRodney W. Grimes  *    documentation and/or other materials provided with the distribution.
16df8bae1dSRodney W. Grimes  * 3. All advertising materials mentioning features or use of this software
17df8bae1dSRodney W. Grimes  *    must display the following acknowledgement:
18df8bae1dSRodney W. Grimes  *	This product includes software developed by the University of
19df8bae1dSRodney W. Grimes  *	California, Berkeley and its contributors.
20df8bae1dSRodney W. Grimes  * 4. Neither the name of the University nor the names of its contributors
21df8bae1dSRodney W. Grimes  *    may be used to endorse or promote products derived from this software
22df8bae1dSRodney W. Grimes  *    without specific prior written permission.
23df8bae1dSRodney W. Grimes  *
24df8bae1dSRodney W. Grimes  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
25df8bae1dSRodney W. Grimes  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26df8bae1dSRodney W. Grimes  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27df8bae1dSRodney W. Grimes  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
28df8bae1dSRodney W. Grimes  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29df8bae1dSRodney W. Grimes  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30df8bae1dSRodney W. Grimes  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31df8bae1dSRodney W. Grimes  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32df8bae1dSRodney W. Grimes  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33df8bae1dSRodney W. Grimes  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34df8bae1dSRodney W. Grimes  * SUCH DAMAGE.
35df8bae1dSRodney W. Grimes  *
36df8bae1dSRodney W. Grimes  *	@(#)nfs.h	8.1 (Berkeley) 6/10/93
37b1b76581SDavid Greenman  * $Id: nfs.h,v 1.2 1994/08/02 07:52:04 davidg Exp $
38df8bae1dSRodney W. Grimes  */
39df8bae1dSRodney W. Grimes 
40df8bae1dSRodney W. Grimes /*
41df8bae1dSRodney W. Grimes  * Tunable constants for nfs
42df8bae1dSRodney W. Grimes  */
43df8bae1dSRodney W. Grimes 
44df8bae1dSRodney W. Grimes #define	NFS_MAXIOVEC	34
45df8bae1dSRodney W. Grimes #define NFS_HZ		25		/* Ticks per second for NFS timeouts */
46df8bae1dSRodney W. Grimes #define	NFS_TIMEO	(1*NFS_HZ)	/* Default timeout = 1 second */
47df8bae1dSRodney W. Grimes #define	NFS_MINTIMEO	(1*NFS_HZ)	/* Min timeout to use */
48df8bae1dSRodney W. Grimes #define	NFS_MAXTIMEO	(60*NFS_HZ)	/* Max timeout to backoff to */
49df8bae1dSRodney W. Grimes #define	NFS_MINIDEMTIMEO (5*NFS_HZ)	/* Min timeout for non-idempotent ops*/
50df8bae1dSRodney W. Grimes #define	NFS_MAXREXMIT	100		/* Stop counting after this many */
51df8bae1dSRodney W. Grimes #define	NFS_MAXWINDOW	1024		/* Max number of outstanding requests */
52df8bae1dSRodney W. Grimes #define	NFS_RETRANS	10		/* Num of retrans for soft mounts */
53df8bae1dSRodney W. Grimes #define	NFS_MAXGRPS	16		/* Max. size of groups list */
54b1b76581SDavid Greenman #ifndef NFS_MINATTRTIMO
55df8bae1dSRodney W. Grimes #define	NFS_MINATTRTIMO 5		/* Attribute cache timeout in sec */
56b1b76581SDavid Greenman #endif
57b1b76581SDavid Greenman #ifndef NFS_MAXATTRTIMO
58df8bae1dSRodney W. Grimes #define	NFS_MAXATTRTIMO 60
59b1b76581SDavid Greenman #endif
60df8bae1dSRodney W. Grimes #define	NFS_WSIZE	8192		/* Def. write data size <= 8192 */
61df8bae1dSRodney W. Grimes #define	NFS_RSIZE	8192		/* Def. read data size <= 8192 */
62df8bae1dSRodney W. Grimes #define	NFS_DEFRAHEAD	1		/* Def. read ahead # blocks */
63df8bae1dSRodney W. Grimes #define	NFS_MAXRAHEAD	4		/* Max. read ahead # blocks */
64df8bae1dSRodney W. Grimes #define	NFS_MAXREADDIR	NFS_MAXDATA	/* Max. size of directory read */
65df8bae1dSRodney W. Grimes #define	NFS_MAXUIDHASH	64		/* Max. # of hashed uid entries/mp */
66df8bae1dSRodney W. Grimes #define	NFS_MAXASYNCDAEMON 20	/* Max. number async_daemons runable */
67df8bae1dSRodney W. Grimes #define	NFS_DIRBLKSIZ	1024		/* Size of an NFS directory block */
68df8bae1dSRodney W. Grimes #define	NMOD(a)		((a) % nfs_asyncdaemons)
69df8bae1dSRodney W. Grimes 
70df8bae1dSRodney W. Grimes /*
71df8bae1dSRodney W. Grimes  * Set the attribute timeout based on how recently the file has been modified.
72df8bae1dSRodney W. Grimes  */
73df8bae1dSRodney W. Grimes #define	NFS_ATTRTIMEO(np) \
74df8bae1dSRodney W. Grimes 	((((np)->n_flag & NMODIFIED) || \
75df8bae1dSRodney W. Grimes 	 (time.tv_sec - (np)->n_mtime) / 10 < NFS_MINATTRTIMO) ? NFS_MINATTRTIMO : \
76df8bae1dSRodney W. Grimes 	 ((time.tv_sec - (np)->n_mtime) / 10 > NFS_MAXATTRTIMO ? NFS_MAXATTRTIMO : \
77df8bae1dSRodney W. Grimes 	  (time.tv_sec - (np)->n_mtime) / 10))
78df8bae1dSRodney W. Grimes 
79df8bae1dSRodney W. Grimes /*
80df8bae1dSRodney W. Grimes  * Structures for the nfssvc(2) syscall. Not that anyone but nfsd and mount_nfs
81df8bae1dSRodney W. Grimes  * should ever try and use it.
82df8bae1dSRodney W. Grimes  */
83df8bae1dSRodney W. Grimes struct nfsd_args {
84df8bae1dSRodney W. Grimes 	int	sock;		/* Socket to serve */
85df8bae1dSRodney W. Grimes 	caddr_t	name;		/* Client address for connection based sockets */
86df8bae1dSRodney W. Grimes 	int	namelen;	/* Length of name */
87df8bae1dSRodney W. Grimes };
88df8bae1dSRodney W. Grimes 
89df8bae1dSRodney W. Grimes struct nfsd_srvargs {
90df8bae1dSRodney W. Grimes 	struct nfsd	*nsd_nfsd;	/* Pointer to in kernel nfsd struct */
91df8bae1dSRodney W. Grimes 	uid_t		nsd_uid;	/* Effective uid mapped to cred */
92df8bae1dSRodney W. Grimes 	u_long		nsd_haddr;	/* Ip address of client */
93df8bae1dSRodney W. Grimes 	struct ucred	nsd_cr;		/* Cred. uid maps to */
94df8bae1dSRodney W. Grimes 	int		nsd_authlen;	/* Length of auth string (ret) */
95df8bae1dSRodney W. Grimes 	char		*nsd_authstr;	/* Auth string (ret) */
96df8bae1dSRodney W. Grimes };
97df8bae1dSRodney W. Grimes 
98df8bae1dSRodney W. Grimes struct nfsd_cargs {
99df8bae1dSRodney W. Grimes 	char		*ncd_dirp;	/* Mount dir path */
100df8bae1dSRodney W. Grimes 	uid_t		ncd_authuid;	/* Effective uid */
101df8bae1dSRodney W. Grimes 	int		ncd_authtype;	/* Type of authenticator */
102df8bae1dSRodney W. Grimes 	int		ncd_authlen;	/* Length of authenticator string */
103df8bae1dSRodney W. Grimes 	char		*ncd_authstr;	/* Authenticator string */
104df8bae1dSRodney W. Grimes };
105df8bae1dSRodney W. Grimes 
106df8bae1dSRodney W. Grimes /*
107df8bae1dSRodney W. Grimes  * Stats structure
108df8bae1dSRodney W. Grimes  */
109df8bae1dSRodney W. Grimes struct nfsstats {
110df8bae1dSRodney W. Grimes 	int	attrcache_hits;
111df8bae1dSRodney W. Grimes 	int	attrcache_misses;
112df8bae1dSRodney W. Grimes 	int	lookupcache_hits;
113df8bae1dSRodney W. Grimes 	int	lookupcache_misses;
114df8bae1dSRodney W. Grimes 	int	direofcache_hits;
115df8bae1dSRodney W. Grimes 	int	direofcache_misses;
116df8bae1dSRodney W. Grimes 	int	biocache_reads;
117df8bae1dSRodney W. Grimes 	int	read_bios;
118df8bae1dSRodney W. Grimes 	int	read_physios;
119df8bae1dSRodney W. Grimes 	int	biocache_writes;
120df8bae1dSRodney W. Grimes 	int	write_bios;
121df8bae1dSRodney W. Grimes 	int	write_physios;
122df8bae1dSRodney W. Grimes 	int	biocache_readlinks;
123df8bae1dSRodney W. Grimes 	int	readlink_bios;
124df8bae1dSRodney W. Grimes 	int	biocache_readdirs;
125df8bae1dSRodney W. Grimes 	int	readdir_bios;
126df8bae1dSRodney W. Grimes 	int	rpccnt[NFS_NPROCS];
127df8bae1dSRodney W. Grimes 	int	rpcretries;
128df8bae1dSRodney W. Grimes 	int	srvrpccnt[NFS_NPROCS];
129df8bae1dSRodney W. Grimes 	int	srvrpc_errs;
130df8bae1dSRodney W. Grimes 	int	srv_errs;
131df8bae1dSRodney W. Grimes 	int	rpcrequests;
132df8bae1dSRodney W. Grimes 	int	rpctimeouts;
133df8bae1dSRodney W. Grimes 	int	rpcunexpected;
134df8bae1dSRodney W. Grimes 	int	rpcinvalid;
135df8bae1dSRodney W. Grimes 	int	srvcache_inproghits;
136df8bae1dSRodney W. Grimes 	int	srvcache_idemdonehits;
137df8bae1dSRodney W. Grimes 	int	srvcache_nonidemdonehits;
138df8bae1dSRodney W. Grimes 	int	srvcache_misses;
139df8bae1dSRodney W. Grimes 	int	srvnqnfs_leases;
140df8bae1dSRodney W. Grimes 	int	srvnqnfs_maxleases;
141df8bae1dSRodney W. Grimes 	int	srvnqnfs_getleases;
142df8bae1dSRodney W. Grimes };
143df8bae1dSRodney W. Grimes 
144df8bae1dSRodney W. Grimes /*
145df8bae1dSRodney W. Grimes  * Flags for nfssvc() system call.
146df8bae1dSRodney W. Grimes  */
147df8bae1dSRodney W. Grimes #define	NFSSVC_BIOD	0x002
148df8bae1dSRodney W. Grimes #define	NFSSVC_NFSD	0x004
149df8bae1dSRodney W. Grimes #define	NFSSVC_ADDSOCK	0x008
150df8bae1dSRodney W. Grimes #define	NFSSVC_AUTHIN	0x010
151df8bae1dSRodney W. Grimes #define	NFSSVC_GOTAUTH	0x040
152df8bae1dSRodney W. Grimes #define	NFSSVC_AUTHINFAIL 0x080
153df8bae1dSRodney W. Grimes #define	NFSSVC_MNTD	0x100
154df8bae1dSRodney W. Grimes 
155df8bae1dSRodney W. Grimes /*
156df8bae1dSRodney W. Grimes  * The set of signals the interrupt an I/O in progress for NFSMNT_INT mounts.
157df8bae1dSRodney W. Grimes  * What should be in this set is open to debate, but I believe that since
158df8bae1dSRodney W. Grimes  * I/O system calls on ufs are never interrupted by signals the set should
159df8bae1dSRodney W. Grimes  * be minimal. My reasoning is that many current programs that use signals
160df8bae1dSRodney W. Grimes  * such as SIGALRM will not expect file I/O system calls to be interrupted
161df8bae1dSRodney W. Grimes  * by them and break.
162df8bae1dSRodney W. Grimes  */
163df8bae1dSRodney W. Grimes #ifdef KERNEL
164df8bae1dSRodney W. Grimes #define	NFSINT_SIGMASK	(sigmask(SIGINT)|sigmask(SIGTERM)|sigmask(SIGKILL)| \
165df8bae1dSRodney W. Grimes 			 sigmask(SIGHUP)|sigmask(SIGQUIT))
166df8bae1dSRodney W. Grimes 
167df8bae1dSRodney W. Grimes /*
168df8bae1dSRodney W. Grimes  * Socket errors ignored for connectionless sockets??
169df8bae1dSRodney W. Grimes  * For now, ignore them all
170df8bae1dSRodney W. Grimes  */
171df8bae1dSRodney W. Grimes #define	NFSIGNORE_SOERROR(s, e) \
172df8bae1dSRodney W. Grimes 		((e) != EINTR && (e) != ERESTART && (e) != EWOULDBLOCK && \
173df8bae1dSRodney W. Grimes 		((s) & PR_CONNREQUIRED) == 0)
174df8bae1dSRodney W. Grimes 
175df8bae1dSRodney W. Grimes /*
176df8bae1dSRodney W. Grimes  * Nfs outstanding request list element
177df8bae1dSRodney W. Grimes  */
178df8bae1dSRodney W. Grimes struct nfsreq {
179df8bae1dSRodney W. Grimes 	struct nfsreq	*r_next;
180df8bae1dSRodney W. Grimes 	struct nfsreq	*r_prev;
181df8bae1dSRodney W. Grimes 	struct mbuf	*r_mreq;
182df8bae1dSRodney W. Grimes 	struct mbuf	*r_mrep;
183df8bae1dSRodney W. Grimes 	struct mbuf	*r_md;
184df8bae1dSRodney W. Grimes 	caddr_t		r_dpos;
185df8bae1dSRodney W. Grimes 	struct nfsmount *r_nmp;
186df8bae1dSRodney W. Grimes 	struct vnode	*r_vp;
187df8bae1dSRodney W. Grimes 	u_long		r_xid;
188df8bae1dSRodney W. Grimes 	int		r_flags;	/* flags on request, see below */
189df8bae1dSRodney W. Grimes 	int		r_retry;	/* max retransmission count */
190df8bae1dSRodney W. Grimes 	int		r_rexmit;	/* current retrans count */
191df8bae1dSRodney W. Grimes 	int		r_timer;	/* tick counter on reply */
192df8bae1dSRodney W. Grimes 	int		r_procnum;	/* NFS procedure number */
193df8bae1dSRodney W. Grimes 	int		r_rtt;		/* RTT for rpc */
194df8bae1dSRodney W. Grimes 	struct proc	*r_procp;	/* Proc that did I/O system call */
195df8bae1dSRodney W. Grimes };
196df8bae1dSRodney W. Grimes 
197df8bae1dSRodney W. Grimes /* Flag values for r_flags */
198df8bae1dSRodney W. Grimes #define R_TIMING	0x01		/* timing request (in mntp) */
199df8bae1dSRodney W. Grimes #define R_SENT		0x02		/* request has been sent */
200df8bae1dSRodney W. Grimes #define	R_SOFTTERM	0x04		/* soft mnt, too many retries */
201df8bae1dSRodney W. Grimes #define	R_INTR		0x08		/* intr mnt, signal pending */
202df8bae1dSRodney W. Grimes #define	R_SOCKERR	0x10		/* Fatal error on socket */
203df8bae1dSRodney W. Grimes #define	R_TPRINTFMSG	0x20		/* Did a tprintf msg. */
204df8bae1dSRodney W. Grimes #define	R_MUSTRESEND	0x40		/* Must resend request */
205df8bae1dSRodney W. Grimes #define	R_GETONEREP	0x80		/* Probe for one reply only */
206df8bae1dSRodney W. Grimes 
207df8bae1dSRodney W. Grimes struct nfsstats nfsstats;
208df8bae1dSRodney W. Grimes 
209df8bae1dSRodney W. Grimes /*
210df8bae1dSRodney W. Grimes  * A list of nfssvc_sock structures is maintained with all the sockets
211df8bae1dSRodney W. Grimes  * that require service by the nfsd.
212df8bae1dSRodney W. Grimes  * The nfsuid structs hang off of the nfssvc_sock structs in both lru
213df8bae1dSRodney W. Grimes  * and uid hash lists.
214df8bae1dSRodney W. Grimes  */
215df8bae1dSRodney W. Grimes #define	NUIDHASHSIZ	32
216df8bae1dSRodney W. Grimes #define	NUIDHASH(uid)	((uid) & (NUIDHASHSIZ - 1))
217df8bae1dSRodney W. Grimes 
218df8bae1dSRodney W. Grimes /*
219df8bae1dSRodney W. Grimes  * Network address hash list element
220df8bae1dSRodney W. Grimes  */
221df8bae1dSRodney W. Grimes union nethostaddr {
222df8bae1dSRodney W. Grimes 	u_long had_inetaddr;
223df8bae1dSRodney W. Grimes 	struct mbuf *had_nam;
224df8bae1dSRodney W. Grimes };
225df8bae1dSRodney W. Grimes 
226df8bae1dSRodney W. Grimes struct nfsuid {
227df8bae1dSRodney W. Grimes 	struct nfsuid	*nu_lrunext;	/* MUST be first */
228df8bae1dSRodney W. Grimes 	struct nfsuid	*nu_lruprev;
229df8bae1dSRodney W. Grimes 	struct nfsuid	*nu_hnext;
230df8bae1dSRodney W. Grimes 	struct nfsuid	*nu_hprev;
231df8bae1dSRodney W. Grimes 	int		nu_flag;	/* Flags */
232df8bae1dSRodney W. Grimes 	uid_t		nu_uid;		/* Uid mapped by this entry */
233df8bae1dSRodney W. Grimes 	union nethostaddr nu_haddr;	/* Host addr. for dgram sockets */
234df8bae1dSRodney W. Grimes 	struct ucred	nu_cr;		/* Cred uid mapped to */
235df8bae1dSRodney W. Grimes };
236df8bae1dSRodney W. Grimes 
237df8bae1dSRodney W. Grimes #define	nu_inetaddr	nu_haddr.had_inetaddr
238df8bae1dSRodney W. Grimes #define	nu_nam		nu_haddr.had_nam
239df8bae1dSRodney W. Grimes /* Bits for nu_flag */
240df8bae1dSRodney W. Grimes #define	NU_INETADDR	0x1
241df8bae1dSRodney W. Grimes 
242df8bae1dSRodney W. Grimes struct nfssvc_sock {
243df8bae1dSRodney W. Grimes 	struct nfsuid	*ns_lrunext;	/* MUST be first */
244df8bae1dSRodney W. Grimes 	struct nfsuid	*ns_lruprev;
245df8bae1dSRodney W. Grimes 	struct nfssvc_sock *ns_next;
246df8bae1dSRodney W. Grimes 	struct nfssvc_sock *ns_prev;
247df8bae1dSRodney W. Grimes 	int		ns_flag;
248df8bae1dSRodney W. Grimes 	u_long		ns_sref;
249df8bae1dSRodney W. Grimes 	struct file	*ns_fp;
250df8bae1dSRodney W. Grimes 	struct socket	*ns_so;
251df8bae1dSRodney W. Grimes 	int		ns_solock;
252df8bae1dSRodney W. Grimes 	struct mbuf	*ns_nam;
253df8bae1dSRodney W. Grimes 	int		ns_cc;
254df8bae1dSRodney W. Grimes 	struct mbuf	*ns_raw;
255df8bae1dSRodney W. Grimes 	struct mbuf	*ns_rawend;
256df8bae1dSRodney W. Grimes 	int		ns_reclen;
257df8bae1dSRodney W. Grimes 	struct mbuf	*ns_rec;
258df8bae1dSRodney W. Grimes 	struct mbuf	*ns_recend;
259df8bae1dSRodney W. Grimes 	int		ns_numuids;
260df8bae1dSRodney W. Grimes 	struct nfsuid	*ns_uidh[NUIDHASHSIZ];
261df8bae1dSRodney W. Grimes };
262df8bae1dSRodney W. Grimes 
263df8bae1dSRodney W. Grimes /* Bits for "ns_flag" */
264df8bae1dSRodney W. Grimes #define	SLP_VALID	0x01
265df8bae1dSRodney W. Grimes #define	SLP_DOREC	0x02
266df8bae1dSRodney W. Grimes #define	SLP_NEEDQ	0x04
267df8bae1dSRodney W. Grimes #define	SLP_DISCONN	0x08
268df8bae1dSRodney W. Grimes #define	SLP_GETSTREAM	0x10
269df8bae1dSRodney W. Grimes #define	SLP_INIT	0x20
270df8bae1dSRodney W. Grimes #define	SLP_WANTINIT	0x40
271df8bae1dSRodney W. Grimes 
272df8bae1dSRodney W. Grimes #define SLP_ALLFLAGS	0xff
273df8bae1dSRodney W. Grimes 
274df8bae1dSRodney W. Grimes /*
275df8bae1dSRodney W. Grimes  * One of these structures is allocated for each nfsd.
276df8bae1dSRodney W. Grimes  */
277df8bae1dSRodney W. Grimes struct nfsd {
278df8bae1dSRodney W. Grimes 	struct nfsd	*nd_next;	/* Must be first */
279df8bae1dSRodney W. Grimes 	struct nfsd	*nd_prev;
280df8bae1dSRodney W. Grimes 	int		nd_flag;	/* NFSD_ flags */
281df8bae1dSRodney W. Grimes 	struct nfssvc_sock *nd_slp;	/* Current socket */
282df8bae1dSRodney W. Grimes 	struct mbuf	*nd_nam;	/* Client addr for datagram req. */
283df8bae1dSRodney W. Grimes 	struct mbuf	*nd_mrep;	/* Req. mbuf list */
284df8bae1dSRodney W. Grimes 	struct mbuf	*nd_md;
285df8bae1dSRodney W. Grimes 	caddr_t		nd_dpos;	/* Position in list */
286df8bae1dSRodney W. Grimes 	int		nd_procnum;	/* RPC procedure number */
287df8bae1dSRodney W. Grimes 	u_long		nd_retxid;	/* RPC xid */
288df8bae1dSRodney W. Grimes 	int		nd_repstat;	/* Reply status value */
289df8bae1dSRodney W. Grimes 	struct ucred	nd_cr;		/* Credentials for req. */
290df8bae1dSRodney W. Grimes 	int		nd_nqlflag;	/* Leasing flag */
291df8bae1dSRodney W. Grimes 	int		nd_duration;	/* Lease duration */
292df8bae1dSRodney W. Grimes 	int		nd_authlen;	/* Authenticator len */
293df8bae1dSRodney W. Grimes 	u_char		nd_authstr[RPCAUTH_MAXSIZ]; /* Authenticator data */
294df8bae1dSRodney W. Grimes 	struct proc	*nd_procp;	/* Proc ptr */
295df8bae1dSRodney W. Grimes };
296df8bae1dSRodney W. Grimes 
297df8bae1dSRodney W. Grimes #define	NFSD_WAITING	0x01
298df8bae1dSRodney W. Grimes #define	NFSD_CHECKSLP	0x02
299df8bae1dSRodney W. Grimes #define	NFSD_REQINPROG	0x04
300df8bae1dSRodney W. Grimes #define	NFSD_NEEDAUTH	0x08
301df8bae1dSRodney W. Grimes #define	NFSD_AUTHFAIL	0x10
302df8bae1dSRodney W. Grimes #endif	/* KERNEL */
303