home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / amiga / os / bsdss4.tz / bsdss4 / bsdss / server / nfs / nfsmount.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-04-22  |  5.1 KB  |  152 lines

  1. /* 
  2.  * Mach Operating System
  3.  * Copyright (c) 1992 Carnegie Mellon University
  4.  * All Rights Reserved.
  5.  * 
  6.  * Permission to use, copy, modify and distribute this software and its
  7.  * documentation is hereby granted, provided that both the copyright
  8.  * notice and this permission notice appear in all copies of the
  9.  * software, derivative works or modified versions, and any portions
  10.  * thereof, and that both notices appear in supporting documentation.
  11.  * 
  12.  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
  13.  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
  14.  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
  15.  * 
  16.  * Carnegie Mellon requests users of this software to return to
  17.  * 
  18.  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
  19.  *  School of Computer Science
  20.  *  Carnegie Mellon University
  21.  *  Pittsburgh PA 15213-3890
  22.  * 
  23.  * any improvements or extensions that they make and grant Carnegie Mellon 
  24.  * the rights to redistribute these changes.
  25.  */
  26. /*
  27.  * HISTORY
  28.  * $Log:    nfsmount.h,v $
  29.  * Revision 2.1  92/04/21  17:15:22  rwd
  30.  * BSDSS
  31.  * 
  32.  *
  33.  */
  34.  
  35. /*
  36.  * Copyright (c) 1989 The Regents of the University of California.
  37.  * All rights reserved.
  38.  *
  39.  * This code is derived from software contributed to Berkeley by
  40.  * Rick Macklem at The University of Guelph.
  41.  *
  42.  * Redistribution and use in source and binary forms, with or without
  43.  * modification, are permitted provided that the following conditions
  44.  * are met:
  45.  * 1. Redistributions of source code must retain the above copyright
  46.  *    notice, this list of conditions and the following disclaimer.
  47.  * 2. Redistributions in binary form must reproduce the above copyright
  48.  *    notice, this list of conditions and the following disclaimer in the
  49.  *    documentation and/or other materials provided with the distribution.
  50.  * 3. All advertising materials mentioning features or use of this software
  51.  *    must display the following acknowledgement:
  52.  *    This product includes software developed by the University of
  53.  *    California, Berkeley and its contributors.
  54.  * 4. Neither the name of the University nor the names of its contributors
  55.  *    may be used to endorse or promote products derived from this software
  56.  *    without specific prior written permission.
  57.  *
  58.  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  59.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  60.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  61.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  62.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  63.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  64.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  65.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  66.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  67.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  68.  * SUCH DAMAGE.
  69.  *
  70.  *    @(#)nfsmount.h    7.7 (Berkeley) 4/16/91
  71.  */
  72.  
  73. /*
  74.  * Mount structure.
  75.  * One allocated on every NFS mount.
  76.  * Holds NFS specific information for mount.
  77.  */
  78. struct    nfsmount {
  79.     int    nm_flag;        /* Flags for soft/hard... */
  80.     struct    mount *nm_mountp;    /* Vfs structure for this filesystem */
  81.     nfsv2fh_t nm_fh;        /* File handle of root dir */
  82.     struct    socket *nm_so;        /* Rpc socket */
  83.     int    nm_sotype;        /* Type of socket */
  84.     int    nm_soproto;        /* and protocol */
  85.     int    nm_soflags;        /* pr_flags for socket protocol */
  86.     struct    mbuf *nm_nam;        /* Addr of server */
  87.     short    nm_retry;        /* Max retry count */
  88.     short    nm_rexmit;        /* Rexmit on previous request */
  89.     short    nm_rtt;            /* Round trip timer ticks @ NFS_HZ */
  90.     short    nm_rto;            /* Current timeout */
  91.     short    nm_srtt;        /* Smoothed round trip time */
  92.     short    nm_rttvar;        /* RTT variance */
  93.     short    nm_currto;        /* Current rto of any nfsmount */
  94.     short    nm_currexmit;        /* Max rexmit count of nfsmounts */
  95.     short    nm_sent;        /* Request send count */
  96.     short    nm_window;        /* Request send window (max) */
  97.     short    nm_winext;        /* Window incremental value */
  98.     short    nm_ssthresh;        /* Slowstart threshold */
  99.     short    nm_salen;        /* Actual length of nm_sockaddr */
  100.     int    nm_rsize;        /* Max size of read rpc */
  101.     int    nm_wsize;        /* Max size of write rpc */
  102. };
  103.  
  104. #ifdef KERNEL
  105. /*
  106.  * Convert mount ptr to nfsmount ptr.
  107.  */
  108. #define VFSTONFS(mp)    ((struct nfsmount *)((mp)->mnt_data))
  109. #endif /* KERNEL */
  110.  
  111. /*
  112.  * Prototypes for NFS mount operations
  113.  */
  114. int    nfs_mount __P((
  115.         struct mount *mp,
  116.         char *path,
  117.         caddr_t data,
  118.         struct nameidata *ndp,
  119.         struct proc *p));
  120. int    nfs_start __P((
  121.         struct mount *mp,
  122.         int flags,
  123.         struct proc *p));
  124. int    nfs_unmount __P((
  125.         struct mount *mp,
  126.         int mntflags,
  127.         struct proc *p));
  128. int    nfs_root __P((
  129.         struct mount *mp,
  130.         struct vnode **vpp));
  131. int    nfs_quotactl __P((
  132.         struct mount *mp,
  133.         int cmds,
  134.         int uid,    /* should be uid_t */
  135.         caddr_t arg,
  136.         struct proc *p));
  137. int    nfs_statfs __P((
  138.         struct mount *mp,
  139.         struct statfs *sbp,
  140.         struct proc *p));
  141. int    nfs_sync __P((
  142.         struct mount *mp,
  143.         int waitfor));
  144. int    nfs_fhtovp __P((
  145.         struct mount *mp,
  146.         struct fid *fhp,
  147.         struct vnode **vpp));
  148. int    nfs_vptofh __P((
  149.         struct vnode *vp,
  150.         struct fid *fhp));
  151. int    nfs_init __P(());
  152.