138414Smckusick /* 238414Smckusick * Copyright (c) 1989 The Regents of the University of California. 338414Smckusick * All rights reserved. 438414Smckusick * 538414Smckusick * This code is derived from software contributed to Berkeley by 638414Smckusick * Rick Macklem at The University of Guelph. 738414Smckusick * 838414Smckusick * Redistribution and use in source and binary forms are permitted 938414Smckusick * provided that the above copyright notice and this paragraph are 1038414Smckusick * duplicated in all such forms and that any documentation, 1138414Smckusick * advertising materials, and other materials related to such 1238414Smckusick * distribution and use acknowledge that the software was developed 1338414Smckusick * by the University of California, Berkeley. The name of the 1438414Smckusick * University may not be used to endorse or promote products derived 1538414Smckusick * from this software without specific prior written permission. 1638414Smckusick * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 1738414Smckusick * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 1838414Smckusick * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 1938414Smckusick * 20*40122Smckusick * @(#)nfsmount.h 7.2 (Berkeley) 02/16/90 2138414Smckusick */ 2238414Smckusick 2338414Smckusick /* 2438414Smckusick * Mount structure. 25*40122Smckusick * One allocated on every NFS mount. 26*40122Smckusick * Holds NFS specific information for mount. 2738414Smckusick */ 2838414Smckusick struct nfsmount { 2938414Smckusick int nm_flag; /* Flags for soft/hard... */ 30*40122Smckusick struct mount *nm_mountp; /* Vfs structure for this filesystem */ 3138414Smckusick nfsv2fh_t nm_fh; /* File handle of root dir */ 32*40122Smckusick struct socket *nm_so; /* Rpc socket */ 33*40122Smckusick struct nfshost *nm_hostinfo; /* Host and congestion information */ 34*40122Smckusick short nm_retry; /* Max retry count */ 35*40122Smckusick short nm_rexmit; /* Rexmit on previous request */ 36*40122Smckusick short nm_rtt; /* Round trip timer ticks @ NFS_HZ */ 37*40122Smckusick short nm_rto; /* Current timeout */ 38*40122Smckusick short nm_srtt; /* Smoothed round trip time */ 39*40122Smckusick short nm_rttvar; /* RTT variance */ 4038414Smckusick int nm_rsize; /* Max size of read rpc */ 4138414Smckusick int nm_wsize; /* Max size of write rpc */ 42*40122Smckusick char nm_host[MNAMELEN]; /* Remote host name */ 4338414Smckusick char nm_path[MNAMELEN]; /* Path mounted on */ 4438414Smckusick }; 4538414Smckusick 46*40122Smckusick /* 47*40122Smckusick * Hostinfo/congestion structure. 48*40122Smckusick * One allocated per NFS server. 49*40122Smckusick * Holds host address, congestion limits, request count, etc. 50*40122Smckusick * Reference count is of nfsmounts which point to it. 51*40122Smckusick */ 52*40122Smckusick struct nfshost { 53*40122Smckusick struct nfshost *nh_next, *nh_prev; 54*40122Smckusick short nh_refcnt; /* Reference count */ 55*40122Smckusick short nh_currto; /* Current rto of any nfsmount */ 56*40122Smckusick short nh_currexmit; /* Max rexmit count of nfsmounts */ 57*40122Smckusick short nh_sent; /* Request send count */ 58*40122Smckusick short nh_window; /* Request send window (max) */ 59*40122Smckusick short nh_winext; /* Window incremental value */ 60*40122Smckusick short nh_ssthresh; /* Slowstart threshold */ 61*40122Smckusick short nh_salen; /* Actual length of nh_sockaddr */ 62*40122Smckusick struct mbuf *nh_sockaddr; /* Address of server */ 63*40122Smckusick }; 64*40122Smckusick 6538414Smckusick struct nfsmount *vfs_to_nfs(); 66