xref: /freebsd/sys/nfsserver/nfs.h (revision 33420ec6e765d8f873ab8f627fc00adc2b08301f)
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
3733420ec6SPaul Richards  * $Id: nfs.h,v 1.3 1994/08/04 06:03:46 davidg Exp $
38df8bae1dSRodney W. Grimes  */
39df8bae1dSRodney W. Grimes 
4033420ec6SPaul Richards #ifndef _NFS_NFS_H_
4133420ec6SPaul Richards #define _NFS_NFS_H_
4233420ec6SPaul Richards 
43df8bae1dSRodney W. Grimes /*
44df8bae1dSRodney W. Grimes  * Tunable constants for nfs
45df8bae1dSRodney W. Grimes  */
46df8bae1dSRodney W. Grimes 
47df8bae1dSRodney W. Grimes #define	NFS_MAXIOVEC	34
48df8bae1dSRodney W. Grimes #define NFS_HZ		25		/* Ticks per second for NFS timeouts */
49df8bae1dSRodney W. Grimes #define	NFS_TIMEO	(1*NFS_HZ)	/* Default timeout = 1 second */
50df8bae1dSRodney W. Grimes #define	NFS_MINTIMEO	(1*NFS_HZ)	/* Min timeout to use */
51df8bae1dSRodney W. Grimes #define	NFS_MAXTIMEO	(60*NFS_HZ)	/* Max timeout to backoff to */
52df8bae1dSRodney W. Grimes #define	NFS_MINIDEMTIMEO (5*NFS_HZ)	/* Min timeout for non-idempotent ops*/
53df8bae1dSRodney W. Grimes #define	NFS_MAXREXMIT	100		/* Stop counting after this many */
54df8bae1dSRodney W. Grimes #define	NFS_MAXWINDOW	1024		/* Max number of outstanding requests */
55df8bae1dSRodney W. Grimes #define	NFS_RETRANS	10		/* Num of retrans for soft mounts */
56df8bae1dSRodney W. Grimes #define	NFS_MAXGRPS	16		/* Max. size of groups list */
57b1b76581SDavid Greenman #ifndef NFS_MINATTRTIMO
58df8bae1dSRodney W. Grimes #define	NFS_MINATTRTIMO 5		/* Attribute cache timeout in sec */
59b1b76581SDavid Greenman #endif
60b1b76581SDavid Greenman #ifndef NFS_MAXATTRTIMO
61df8bae1dSRodney W. Grimes #define	NFS_MAXATTRTIMO 60
62b1b76581SDavid Greenman #endif
63df8bae1dSRodney W. Grimes #define	NFS_WSIZE	8192		/* Def. write data size <= 8192 */
64df8bae1dSRodney W. Grimes #define	NFS_RSIZE	8192		/* Def. read data size <= 8192 */
65df8bae1dSRodney W. Grimes #define	NFS_DEFRAHEAD	1		/* Def. read ahead # blocks */
66df8bae1dSRodney W. Grimes #define	NFS_MAXRAHEAD	4		/* Max. read ahead # blocks */
67df8bae1dSRodney W. Grimes #define	NFS_MAXREADDIR	NFS_MAXDATA	/* Max. size of directory read */
68df8bae1dSRodney W. Grimes #define	NFS_MAXUIDHASH	64		/* Max. # of hashed uid entries/mp */
69df8bae1dSRodney W. Grimes #define	NFS_MAXASYNCDAEMON 20	/* Max. number async_daemons runable */
70df8bae1dSRodney W. Grimes #define	NFS_DIRBLKSIZ	1024		/* Size of an NFS directory block */
71df8bae1dSRodney W. Grimes #define	NMOD(a)		((a) % nfs_asyncdaemons)
72df8bae1dSRodney W. Grimes 
73df8bae1dSRodney W. Grimes /*
74df8bae1dSRodney W. Grimes  * Set the attribute timeout based on how recently the file has been modified.
75df8bae1dSRodney W. Grimes  */
76df8bae1dSRodney W. Grimes #define	NFS_ATTRTIMEO(np) \
77df8bae1dSRodney W. Grimes 	((((np)->n_flag & NMODIFIED) || \
78df8bae1dSRodney W. Grimes 	 (time.tv_sec - (np)->n_mtime) / 10 < NFS_MINATTRTIMO) ? NFS_MINATTRTIMO : \
79df8bae1dSRodney W. Grimes 	 ((time.tv_sec - (np)->n_mtime) / 10 > NFS_MAXATTRTIMO ? NFS_MAXATTRTIMO : \
80df8bae1dSRodney W. Grimes 	  (time.tv_sec - (np)->n_mtime) / 10))
81df8bae1dSRodney W. Grimes 
82df8bae1dSRodney W. Grimes /*
83df8bae1dSRodney W. Grimes  * Structures for the nfssvc(2) syscall. Not that anyone but nfsd and mount_nfs
84df8bae1dSRodney W. Grimes  * should ever try and use it.
85df8bae1dSRodney W. Grimes  */
86df8bae1dSRodney W. Grimes struct nfsd_args {
87df8bae1dSRodney W. Grimes 	int	sock;		/* Socket to serve */
88df8bae1dSRodney W. Grimes 	caddr_t	name;		/* Client address for connection based sockets */
89df8bae1dSRodney W. Grimes 	int	namelen;	/* Length of name */
90df8bae1dSRodney W. Grimes };
91df8bae1dSRodney W. Grimes 
92df8bae1dSRodney W. Grimes struct nfsd_srvargs {
93df8bae1dSRodney W. Grimes 	struct nfsd	*nsd_nfsd;	/* Pointer to in kernel nfsd struct */
94df8bae1dSRodney W. Grimes 	uid_t		nsd_uid;	/* Effective uid mapped to cred */
95df8bae1dSRodney W. Grimes 	u_long		nsd_haddr;	/* Ip address of client */
96df8bae1dSRodney W. Grimes 	struct ucred	nsd_cr;		/* Cred. uid maps to */
97df8bae1dSRodney W. Grimes 	int		nsd_authlen;	/* Length of auth string (ret) */
98df8bae1dSRodney W. Grimes 	char		*nsd_authstr;	/* Auth string (ret) */
99df8bae1dSRodney W. Grimes };
100df8bae1dSRodney W. Grimes 
101df8bae1dSRodney W. Grimes struct nfsd_cargs {
102df8bae1dSRodney W. Grimes 	char		*ncd_dirp;	/* Mount dir path */
103df8bae1dSRodney W. Grimes 	uid_t		ncd_authuid;	/* Effective uid */
104df8bae1dSRodney W. Grimes 	int		ncd_authtype;	/* Type of authenticator */
105df8bae1dSRodney W. Grimes 	int		ncd_authlen;	/* Length of authenticator string */
106df8bae1dSRodney W. Grimes 	char		*ncd_authstr;	/* Authenticator string */
107df8bae1dSRodney W. Grimes };
108df8bae1dSRodney W. Grimes 
109df8bae1dSRodney W. Grimes /*
110df8bae1dSRodney W. Grimes  * Stats structure
111df8bae1dSRodney W. Grimes  */
112df8bae1dSRodney W. Grimes struct nfsstats {
113df8bae1dSRodney W. Grimes 	int	attrcache_hits;
114df8bae1dSRodney W. Grimes 	int	attrcache_misses;
115df8bae1dSRodney W. Grimes 	int	lookupcache_hits;
116df8bae1dSRodney W. Grimes 	int	lookupcache_misses;
117df8bae1dSRodney W. Grimes 	int	direofcache_hits;
118df8bae1dSRodney W. Grimes 	int	direofcache_misses;
119df8bae1dSRodney W. Grimes 	int	biocache_reads;
120df8bae1dSRodney W. Grimes 	int	read_bios;
121df8bae1dSRodney W. Grimes 	int	read_physios;
122df8bae1dSRodney W. Grimes 	int	biocache_writes;
123df8bae1dSRodney W. Grimes 	int	write_bios;
124df8bae1dSRodney W. Grimes 	int	write_physios;
125df8bae1dSRodney W. Grimes 	int	biocache_readlinks;
126df8bae1dSRodney W. Grimes 	int	readlink_bios;
127df8bae1dSRodney W. Grimes 	int	biocache_readdirs;
128df8bae1dSRodney W. Grimes 	int	readdir_bios;
129df8bae1dSRodney W. Grimes 	int	rpccnt[NFS_NPROCS];
130df8bae1dSRodney W. Grimes 	int	rpcretries;
131df8bae1dSRodney W. Grimes 	int	srvrpccnt[NFS_NPROCS];
132df8bae1dSRodney W. Grimes 	int	srvrpc_errs;
133df8bae1dSRodney W. Grimes 	int	srv_errs;
134df8bae1dSRodney W. Grimes 	int	rpcrequests;
135df8bae1dSRodney W. Grimes 	int	rpctimeouts;
136df8bae1dSRodney W. Grimes 	int	rpcunexpected;
137df8bae1dSRodney W. Grimes 	int	rpcinvalid;
138df8bae1dSRodney W. Grimes 	int	srvcache_inproghits;
139df8bae1dSRodney W. Grimes 	int	srvcache_idemdonehits;
140df8bae1dSRodney W. Grimes 	int	srvcache_nonidemdonehits;
141df8bae1dSRodney W. Grimes 	int	srvcache_misses;
142df8bae1dSRodney W. Grimes 	int	srvnqnfs_leases;
143df8bae1dSRodney W. Grimes 	int	srvnqnfs_maxleases;
144df8bae1dSRodney W. Grimes 	int	srvnqnfs_getleases;
145df8bae1dSRodney W. Grimes };
146df8bae1dSRodney W. Grimes 
147df8bae1dSRodney W. Grimes /*
148df8bae1dSRodney W. Grimes  * Flags for nfssvc() system call.
149df8bae1dSRodney W. Grimes  */
150df8bae1dSRodney W. Grimes #define	NFSSVC_BIOD	0x002
151df8bae1dSRodney W. Grimes #define	NFSSVC_NFSD	0x004
152df8bae1dSRodney W. Grimes #define	NFSSVC_ADDSOCK	0x008
153df8bae1dSRodney W. Grimes #define	NFSSVC_AUTHIN	0x010
154df8bae1dSRodney W. Grimes #define	NFSSVC_GOTAUTH	0x040
155df8bae1dSRodney W. Grimes #define	NFSSVC_AUTHINFAIL 0x080
156df8bae1dSRodney W. Grimes #define	NFSSVC_MNTD	0x100
157df8bae1dSRodney W. Grimes 
158df8bae1dSRodney W. Grimes /*
159df8bae1dSRodney W. Grimes  * The set of signals the interrupt an I/O in progress for NFSMNT_INT mounts.
160df8bae1dSRodney W. Grimes  * What should be in this set is open to debate, but I believe that since
161df8bae1dSRodney W. Grimes  * I/O system calls on ufs are never interrupted by signals the set should
162df8bae1dSRodney W. Grimes  * be minimal. My reasoning is that many current programs that use signals
163df8bae1dSRodney W. Grimes  * such as SIGALRM will not expect file I/O system calls to be interrupted
164df8bae1dSRodney W. Grimes  * by them and break.
165df8bae1dSRodney W. Grimes  */
166df8bae1dSRodney W. Grimes #ifdef KERNEL
167df8bae1dSRodney W. Grimes #define	NFSINT_SIGMASK	(sigmask(SIGINT)|sigmask(SIGTERM)|sigmask(SIGKILL)| \
168df8bae1dSRodney W. Grimes 			 sigmask(SIGHUP)|sigmask(SIGQUIT))
169df8bae1dSRodney W. Grimes 
170df8bae1dSRodney W. Grimes /*
171df8bae1dSRodney W. Grimes  * Socket errors ignored for connectionless sockets??
172df8bae1dSRodney W. Grimes  * For now, ignore them all
173df8bae1dSRodney W. Grimes  */
174df8bae1dSRodney W. Grimes #define	NFSIGNORE_SOERROR(s, e) \
175df8bae1dSRodney W. Grimes 		((e) != EINTR && (e) != ERESTART && (e) != EWOULDBLOCK && \
176df8bae1dSRodney W. Grimes 		((s) & PR_CONNREQUIRED) == 0)
177df8bae1dSRodney W. Grimes 
178df8bae1dSRodney W. Grimes /*
179df8bae1dSRodney W. Grimes  * Nfs outstanding request list element
180df8bae1dSRodney W. Grimes  */
181df8bae1dSRodney W. Grimes struct nfsreq {
182df8bae1dSRodney W. Grimes 	struct nfsreq	*r_next;
183df8bae1dSRodney W. Grimes 	struct nfsreq	*r_prev;
184df8bae1dSRodney W. Grimes 	struct mbuf	*r_mreq;
185df8bae1dSRodney W. Grimes 	struct mbuf	*r_mrep;
186df8bae1dSRodney W. Grimes 	struct mbuf	*r_md;
187df8bae1dSRodney W. Grimes 	caddr_t		r_dpos;
188df8bae1dSRodney W. Grimes 	struct nfsmount *r_nmp;
189df8bae1dSRodney W. Grimes 	struct vnode	*r_vp;
190df8bae1dSRodney W. Grimes 	u_long		r_xid;
191df8bae1dSRodney W. Grimes 	int		r_flags;	/* flags on request, see below */
192df8bae1dSRodney W. Grimes 	int		r_retry;	/* max retransmission count */
193df8bae1dSRodney W. Grimes 	int		r_rexmit;	/* current retrans count */
194df8bae1dSRodney W. Grimes 	int		r_timer;	/* tick counter on reply */
195df8bae1dSRodney W. Grimes 	int		r_procnum;	/* NFS procedure number */
196df8bae1dSRodney W. Grimes 	int		r_rtt;		/* RTT for rpc */
197df8bae1dSRodney W. Grimes 	struct proc	*r_procp;	/* Proc that did I/O system call */
198df8bae1dSRodney W. Grimes };
199df8bae1dSRodney W. Grimes 
200df8bae1dSRodney W. Grimes /* Flag values for r_flags */
201df8bae1dSRodney W. Grimes #define R_TIMING	0x01		/* timing request (in mntp) */
202df8bae1dSRodney W. Grimes #define R_SENT		0x02		/* request has been sent */
203df8bae1dSRodney W. Grimes #define	R_SOFTTERM	0x04		/* soft mnt, too many retries */
204df8bae1dSRodney W. Grimes #define	R_INTR		0x08		/* intr mnt, signal pending */
205df8bae1dSRodney W. Grimes #define	R_SOCKERR	0x10		/* Fatal error on socket */
206df8bae1dSRodney W. Grimes #define	R_TPRINTFMSG	0x20		/* Did a tprintf msg. */
207df8bae1dSRodney W. Grimes #define	R_MUSTRESEND	0x40		/* Must resend request */
208df8bae1dSRodney W. Grimes #define	R_GETONEREP	0x80		/* Probe for one reply only */
209df8bae1dSRodney W. Grimes 
210df8bae1dSRodney W. Grimes struct nfsstats nfsstats;
211df8bae1dSRodney W. Grimes 
212df8bae1dSRodney W. Grimes /*
213df8bae1dSRodney W. Grimes  * A list of nfssvc_sock structures is maintained with all the sockets
214df8bae1dSRodney W. Grimes  * that require service by the nfsd.
215df8bae1dSRodney W. Grimes  * The nfsuid structs hang off of the nfssvc_sock structs in both lru
216df8bae1dSRodney W. Grimes  * and uid hash lists.
217df8bae1dSRodney W. Grimes  */
218df8bae1dSRodney W. Grimes #define	NUIDHASHSIZ	32
219df8bae1dSRodney W. Grimes #define	NUIDHASH(uid)	((uid) & (NUIDHASHSIZ - 1))
220df8bae1dSRodney W. Grimes 
221df8bae1dSRodney W. Grimes /*
222df8bae1dSRodney W. Grimes  * Network address hash list element
223df8bae1dSRodney W. Grimes  */
224df8bae1dSRodney W. Grimes union nethostaddr {
225df8bae1dSRodney W. Grimes 	u_long had_inetaddr;
226df8bae1dSRodney W. Grimes 	struct mbuf *had_nam;
227df8bae1dSRodney W. Grimes };
228df8bae1dSRodney W. Grimes 
229df8bae1dSRodney W. Grimes struct nfsuid {
230df8bae1dSRodney W. Grimes 	struct nfsuid	*nu_lrunext;	/* MUST be first */
231df8bae1dSRodney W. Grimes 	struct nfsuid	*nu_lruprev;
232df8bae1dSRodney W. Grimes 	struct nfsuid	*nu_hnext;
233df8bae1dSRodney W. Grimes 	struct nfsuid	*nu_hprev;
234df8bae1dSRodney W. Grimes 	int		nu_flag;	/* Flags */
235df8bae1dSRodney W. Grimes 	uid_t		nu_uid;		/* Uid mapped by this entry */
236df8bae1dSRodney W. Grimes 	union nethostaddr nu_haddr;	/* Host addr. for dgram sockets */
237df8bae1dSRodney W. Grimes 	struct ucred	nu_cr;		/* Cred uid mapped to */
238df8bae1dSRodney W. Grimes };
239df8bae1dSRodney W. Grimes 
240df8bae1dSRodney W. Grimes #define	nu_inetaddr	nu_haddr.had_inetaddr
241df8bae1dSRodney W. Grimes #define	nu_nam		nu_haddr.had_nam
242df8bae1dSRodney W. Grimes /* Bits for nu_flag */
243df8bae1dSRodney W. Grimes #define	NU_INETADDR	0x1
244df8bae1dSRodney W. Grimes 
245df8bae1dSRodney W. Grimes struct nfssvc_sock {
246df8bae1dSRodney W. Grimes 	struct nfsuid	*ns_lrunext;	/* MUST be first */
247df8bae1dSRodney W. Grimes 	struct nfsuid	*ns_lruprev;
248df8bae1dSRodney W. Grimes 	struct nfssvc_sock *ns_next;
249df8bae1dSRodney W. Grimes 	struct nfssvc_sock *ns_prev;
250df8bae1dSRodney W. Grimes 	int		ns_flag;
251df8bae1dSRodney W. Grimes 	u_long		ns_sref;
252df8bae1dSRodney W. Grimes 	struct file	*ns_fp;
253df8bae1dSRodney W. Grimes 	struct socket	*ns_so;
254df8bae1dSRodney W. Grimes 	int		ns_solock;
255df8bae1dSRodney W. Grimes 	struct mbuf	*ns_nam;
256df8bae1dSRodney W. Grimes 	int		ns_cc;
257df8bae1dSRodney W. Grimes 	struct mbuf	*ns_raw;
258df8bae1dSRodney W. Grimes 	struct mbuf	*ns_rawend;
259df8bae1dSRodney W. Grimes 	int		ns_reclen;
260df8bae1dSRodney W. Grimes 	struct mbuf	*ns_rec;
261df8bae1dSRodney W. Grimes 	struct mbuf	*ns_recend;
262df8bae1dSRodney W. Grimes 	int		ns_numuids;
263df8bae1dSRodney W. Grimes 	struct nfsuid	*ns_uidh[NUIDHASHSIZ];
264df8bae1dSRodney W. Grimes };
265df8bae1dSRodney W. Grimes 
266df8bae1dSRodney W. Grimes /* Bits for "ns_flag" */
267df8bae1dSRodney W. Grimes #define	SLP_VALID	0x01
268df8bae1dSRodney W. Grimes #define	SLP_DOREC	0x02
269df8bae1dSRodney W. Grimes #define	SLP_NEEDQ	0x04
270df8bae1dSRodney W. Grimes #define	SLP_DISCONN	0x08
271df8bae1dSRodney W. Grimes #define	SLP_GETSTREAM	0x10
272df8bae1dSRodney W. Grimes #define	SLP_INIT	0x20
273df8bae1dSRodney W. Grimes #define	SLP_WANTINIT	0x40
274df8bae1dSRodney W. Grimes 
275df8bae1dSRodney W. Grimes #define SLP_ALLFLAGS	0xff
276df8bae1dSRodney W. Grimes 
277df8bae1dSRodney W. Grimes /*
278df8bae1dSRodney W. Grimes  * One of these structures is allocated for each nfsd.
279df8bae1dSRodney W. Grimes  */
280df8bae1dSRodney W. Grimes struct nfsd {
281df8bae1dSRodney W. Grimes 	struct nfsd	*nd_next;	/* Must be first */
282df8bae1dSRodney W. Grimes 	struct nfsd	*nd_prev;
283df8bae1dSRodney W. Grimes 	int		nd_flag;	/* NFSD_ flags */
284df8bae1dSRodney W. Grimes 	struct nfssvc_sock *nd_slp;	/* Current socket */
285df8bae1dSRodney W. Grimes 	struct mbuf	*nd_nam;	/* Client addr for datagram req. */
286df8bae1dSRodney W. Grimes 	struct mbuf	*nd_mrep;	/* Req. mbuf list */
287df8bae1dSRodney W. Grimes 	struct mbuf	*nd_md;
288df8bae1dSRodney W. Grimes 	caddr_t		nd_dpos;	/* Position in list */
289df8bae1dSRodney W. Grimes 	int		nd_procnum;	/* RPC procedure number */
290df8bae1dSRodney W. Grimes 	u_long		nd_retxid;	/* RPC xid */
291df8bae1dSRodney W. Grimes 	int		nd_repstat;	/* Reply status value */
292df8bae1dSRodney W. Grimes 	struct ucred	nd_cr;		/* Credentials for req. */
293df8bae1dSRodney W. Grimes 	int		nd_nqlflag;	/* Leasing flag */
294df8bae1dSRodney W. Grimes 	int		nd_duration;	/* Lease duration */
295df8bae1dSRodney W. Grimes 	int		nd_authlen;	/* Authenticator len */
296df8bae1dSRodney W. Grimes 	u_char		nd_authstr[RPCAUTH_MAXSIZ]; /* Authenticator data */
297df8bae1dSRodney W. Grimes 	struct proc	*nd_procp;	/* Proc ptr */
298df8bae1dSRodney W. Grimes };
299df8bae1dSRodney W. Grimes 
300df8bae1dSRodney W. Grimes #define	NFSD_WAITING	0x01
301df8bae1dSRodney W. Grimes #define	NFSD_CHECKSLP	0x02
302df8bae1dSRodney W. Grimes #define	NFSD_REQINPROG	0x04
303df8bae1dSRodney W. Grimes #define	NFSD_NEEDAUTH	0x08
304df8bae1dSRodney W. Grimes #define	NFSD_AUTHFAIL	0x10
305df8bae1dSRodney W. Grimes #endif	/* KERNEL */
30633420ec6SPaul Richards 
30733420ec6SPaul Richards #endif
308