xref: /original-bsd/sys/nfs/nfsmount.h (revision 2a4161ef)
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  * Redistribution and use in source and binary forms are permitted
9  * provided that the above copyright notice and this paragraph are
10  * duplicated in all such forms and that any documentation,
11  * advertising materials, and other materials related to such
12  * distribution and use acknowledge that the software was developed
13  * by the University of California, Berkeley.  The name of the
14  * University may not be used to endorse or promote products derived
15  * from this software without specific prior written permission.
16  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
17  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
18  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
19  *
20  *	@(#)nfsmount.h	7.2 (Berkeley) 02/16/90
21  */
22 
23 /*
24  * Mount structure.
25  * One allocated on every NFS mount.
26  * Holds NFS specific information for mount.
27  */
28 struct	nfsmount {
29 	int	nm_flag;		/* Flags for soft/hard... */
30 	struct	mount *nm_mountp;	/* Vfs structure for this filesystem */
31 	nfsv2fh_t nm_fh;		/* File handle of root dir */
32 	struct	socket	*nm_so;		/* Rpc socket */
33 	struct	nfshost *nm_hostinfo;	/* Host and congestion information */
34 	short	nm_retry;		/* Max retry count */
35 	short	nm_rexmit;		/* Rexmit on previous request */
36 	short	nm_rtt;			/* Round trip timer ticks @ NFS_HZ */
37 	short	nm_rto;			/* Current timeout */
38 	short	nm_srtt;		/* Smoothed round trip time */
39 	short	nm_rttvar;		/* RTT variance */
40 	int	nm_rsize;		/* Max size of read rpc */
41 	int	nm_wsize;		/* Max size of write rpc */
42 	char	nm_host[MNAMELEN];	/* Remote host name */
43 	char	nm_path[MNAMELEN];	/* Path mounted on */
44 };
45 
46 /*
47  * Hostinfo/congestion structure.
48  * One allocated per NFS server.
49  * Holds host address, congestion limits, request count, etc.
50  * Reference count is of nfsmounts which point to it.
51  */
52 struct nfshost {
53 	struct	nfshost *nh_next, *nh_prev;
54 	short	nh_refcnt;		/* Reference count */
55 	short	nh_currto;		/* Current rto of any nfsmount */
56 	short	nh_currexmit;		/* Max rexmit count of nfsmounts */
57 	short	nh_sent;		/* Request send count */
58 	short	nh_window;		/* Request send window (max) */
59 	short	nh_winext;		/* Window incremental value */
60 	short	nh_ssthresh;		/* Slowstart threshold */
61 	short	nh_salen;		/* Actual length of nh_sockaddr */
62 	struct	mbuf *nh_sockaddr;	/* Address of server */
63 };
64 
65 struct nfsmount *vfs_to_nfs();
66