137e65185Smckusick /* 283adbb3cSbostic * Copyright (c) 1989, 1991, 1993 383adbb3cSbostic * The Regents of the University of California. All rights reserved. 437e65185Smckusick * 598799fb9Sbostic * %sccs.include.redist.c% 637e65185Smckusick * 7*9a537971Smckusick * @(#)mount.h 8.15 (Berkeley) 07/14/94 837e65185Smckusick */ 937e65185Smckusick 109578c90fSmckusick #ifndef KERNEL 119578c90fSmckusick #include <sys/ucred.h> 129578c90fSmckusick #endif 13134356a5Smckusick #include <sys/queue.h> 149578c90fSmckusick 151349db62Smckusick typedef struct { long val[2]; } fsid_t; /* file system id type */ 1637e65185Smckusick 1737e65185Smckusick /* 1837e65185Smckusick * File identifier. 1937e65185Smckusick * These are unique per filesystem on a single machine. 2037e65185Smckusick */ 2137e65185Smckusick #define MAXFIDSZ 16 2237e65185Smckusick 2337e65185Smckusick struct fid { 2437e65185Smckusick u_short fid_len; /* length of data in bytes */ 25a504fefbSmckusick u_short fid_reserved; /* force longword alignment */ 2637e65185Smckusick char fid_data[MAXFIDSZ]; /* data (variable length) */ 2737e65185Smckusick }; 2837e65185Smckusick 2937e65185Smckusick /* 307321ffb6Smckusick * file system statistics 317321ffb6Smckusick */ 327321ffb6Smckusick 337321ffb6Smckusick #define MNAMELEN 90 /* length of buffer for returned name */ 347321ffb6Smckusick 357321ffb6Smckusick struct statfs { 367321ffb6Smckusick short f_type; /* type of filesystem (see below) */ 377321ffb6Smckusick short f_flags; /* copy of mount flags */ 38f6f794dcSmckusick long f_bsize; /* fundamental file system block size */ 39f6f794dcSmckusick long f_iosize; /* optimal transfer block size */ 407321ffb6Smckusick long f_blocks; /* total data blocks in file system */ 417321ffb6Smckusick long f_bfree; /* free blocks in fs */ 427321ffb6Smckusick long f_bavail; /* free blocks avail to non-superuser */ 437321ffb6Smckusick long f_files; /* total file nodes in file system */ 447321ffb6Smckusick long f_ffree; /* free file nodes in fs */ 457321ffb6Smckusick fsid_t f_fsid; /* file system id */ 46*9a537971Smckusick uid_t f_owner; /* user that mounted the filesystem */ 47*9a537971Smckusick long f_spare[8]; /* spare for later */ 487321ffb6Smckusick char f_mntonname[MNAMELEN]; /* directory on which mounted */ 497321ffb6Smckusick char f_mntfromname[MNAMELEN];/* mounted filesystem */ 507321ffb6Smckusick }; 5108be226dSkarels 527321ffb6Smckusick /* 537321ffb6Smckusick * File system types. 547321ffb6Smckusick */ 557321ffb6Smckusick #define MOUNT_NONE 0 56a0121656Smckusick #define MOUNT_UFS 1 /* Fast Filesystem */ 57a0121656Smckusick #define MOUNT_NFS 2 /* Sun-compatible Network Filesystem */ 58a0121656Smckusick #define MOUNT_MFS 3 /* Memory-based Filesystem */ 59a0121656Smckusick #define MOUNT_MSDOS 4 /* MS/DOS Filesystem */ 60a0121656Smckusick #define MOUNT_LFS 5 /* Log-based Filesystem */ 61a0121656Smckusick #define MOUNT_LOFS 6 /* Loopback Filesystem */ 62a0121656Smckusick #define MOUNT_FDESC 7 /* File Descriptor Filesystem */ 63a0121656Smckusick #define MOUNT_PORTAL 8 /* Portal Filesystem */ 64a0121656Smckusick #define MOUNT_NULL 9 /* Minimal Filesystem Layer */ 65a0121656Smckusick #define MOUNT_UMAP 10 /* User/Group Identifer Remapping Filesystem */ 66a0121656Smckusick #define MOUNT_KERNFS 11 /* Kernel Information Filesystem */ 67a0121656Smckusick #define MOUNT_PROCFS 12 /* /proc Filesystem */ 68f8c6f73fShibler #define MOUNT_AFS 13 /* Andrew Filesystem */ 691f306492Smckusick #define MOUNT_CD9660 14 /* ISO9660 (aka CDROM) Filesystem */ 70e9ff2716Spendry #define MOUNT_UNION 15 /* Union (translucent) Filesystem */ 71e9ff2716Spendry #define MOUNT_MAXTYPE 15 725dee720bSmckusick 735dee720bSmckusick #define INITMOUNTNAMES { \ 745dee720bSmckusick "none", /* 0 MOUNT_NONE */ \ 755dee720bSmckusick "ufs", /* 1 MOUNT_UFS */ \ 765dee720bSmckusick "nfs", /* 2 MOUNT_NFS */ \ 775dee720bSmckusick "mfs", /* 3 MOUNT_MFS */ \ 78ee126a73Smckusick "msdos", /* 4 MOUNT_MSDOS */ \ 795dee720bSmckusick "lfs", /* 5 MOUNT_LFS */ \ 805dee720bSmckusick "lofs", /* 6 MOUNT_LOFS */ \ 815dee720bSmckusick "fdesc", /* 7 MOUNT_FDESC */ \ 825dee720bSmckusick "portal", /* 8 MOUNT_PORTAL */ \ 835dee720bSmckusick "null", /* 9 MOUNT_NULL */ \ 845dee720bSmckusick "umap", /* 10 MOUNT_UMAP */ \ 85e85dc186Spendry "kernfs", /* 11 MOUNT_KERNFS */ \ 86a54ed4e5Spendry "procfs", /* 12 MOUNT_PROCFS */ \ 8751d4aa02Shibler "afs", /* 13 MOUNT_AFS */ \ 881f306492Smckusick "iso9660fs", /* 14 MOUNT_CD9660 */ \ 894b8f4b0dSpendry "union", /* 15 MOUNT_UNION */ \ 90e9ff2716Spendry 0, /* 16 MOUNT_SPARE */ \ 915dee720bSmckusick } 927321ffb6Smckusick 937321ffb6Smckusick /* 943cad2a65Sbostic * Structure per mounted file system. Each mounted file system has an 953cad2a65Sbostic * array of operations and an instance record. The file systems are 963cad2a65Sbostic * put on a doubly linked list. 9737e65185Smckusick */ 98134356a5Smckusick LIST_HEAD(vnodelst, vnode); 99134356a5Smckusick 10037e65185Smckusick struct mount { 101134356a5Smckusick TAILQ_ENTRY(mount) mnt_list; /* mount list */ 10242bc6a02Smckusick struct vfsops *mnt_op; /* operations on fs */ 10342bc6a02Smckusick struct vnode *mnt_vnodecovered; /* vnode we mounted on */ 104134356a5Smckusick struct vnodelst mnt_vnodelist; /* list of vnodes this mount */ 10542bc6a02Smckusick int mnt_flag; /* flags */ 10602cb89ebSmckusick int mnt_maxsymlinklen; /* max size of short symlink */ 10742bc6a02Smckusick struct statfs mnt_stat; /* cache of filesystem stats */ 10842bc6a02Smckusick qaddr_t mnt_data; /* private data */ 10937e65185Smckusick }; 11037e65185Smckusick 11137e65185Smckusick /* 112cc73f08eSmckusick * Mount flags. 1130ad268d3Smckusick * 1140ad268d3Smckusick * Unmount uses MNT_FORCE flag. 11537e65185Smckusick */ 11642bc6a02Smckusick #define MNT_RDONLY 0x00000001 /* read only filesystem */ 11742bc6a02Smckusick #define MNT_SYNCHRONOUS 0x00000002 /* file system written synchronously */ 11842bc6a02Smckusick #define MNT_NOEXEC 0x00000004 /* can't exec from filesystem */ 11942bc6a02Smckusick #define MNT_NOSUID 0x00000008 /* don't honor setuid bits on fs */ 12042bc6a02Smckusick #define MNT_NODEV 0x00000010 /* don't interpret special files */ 121b262b538Spendry #define MNT_UNION 0x00000020 /* union with underlying filesystem */ 12296aa0fb0Smckusick #define MNT_ASYNC 0x00000040 /* file system written asynchronously */ 12308be226dSkarels 12437e65185Smckusick /* 12537e65185Smckusick * exported mount flags. 12637e65185Smckusick */ 127d5bca046Smckusick #define MNT_EXRDONLY 0x00000080 /* exported read only */ 12842bc6a02Smckusick #define MNT_EXPORTED 0x00000100 /* file system is exported */ 129d5bca046Smckusick #define MNT_DEFEXPORTED 0x00000200 /* exported to the world */ 130d5bca046Smckusick #define MNT_EXPORTANON 0x00000400 /* use anon uid mapping for everyone */ 131d5bca046Smckusick #define MNT_EXKERB 0x00000800 /* exported with Kerberos uid mapping */ 13208be226dSkarels 13329abdb40Smckusick /* 13429abdb40Smckusick * Flags set by internal operations. 13529abdb40Smckusick */ 13642bc6a02Smckusick #define MNT_LOCAL 0x00001000 /* filesystem is stored locally */ 13742bc6a02Smckusick #define MNT_QUOTA 0x00002000 /* quotas are enabled on filesystem */ 138134356a5Smckusick #define MNT_ROOTFS 0x00004000 /* identifies the root filesystem */ 13908be226dSkarels 1406c77ce8eSmckusick /* 1416c77ce8eSmckusick * Mask of flags that are visible to statfs() 1426c77ce8eSmckusick */ 14342bc6a02Smckusick #define MNT_VISFLAGMASK 0x0000ffff 14408be226dSkarels 14537e65185Smckusick /* 146cc73f08eSmckusick * filesystem control flags. 147cc73f08eSmckusick * 14842bc6a02Smckusick * MNT_MLOCK lock the mount entry so that name lookup cannot proceed 149cc73f08eSmckusick * past the mount point. This keeps the subtree stable during mounts 150cc73f08eSmckusick * and unmounts. 15137e65185Smckusick */ 15242bc6a02Smckusick #define MNT_UPDATE 0x00010000 /* not a real mount, just an update */ 153d5bca046Smckusick #define MNT_DELEXPORT 0x00020000 /* delete export host lists */ 1540ad268d3Smckusick #define MNT_RELOAD 0x00040000 /* reload filesystem data */ 1550ad268d3Smckusick #define MNT_FORCE 0x00080000 /* force unmount or readonly change */ 15642bc6a02Smckusick #define MNT_MLOCK 0x00100000 /* lock so that subtree is stable */ 15742bc6a02Smckusick #define MNT_MWAIT 0x00200000 /* someone is waiting for lock */ 15842bc6a02Smckusick #define MNT_MPBUSY 0x00400000 /* scan of mount point in progress */ 15942bc6a02Smckusick #define MNT_MPWANT 0x00800000 /* waiting for mount point */ 16042bc6a02Smckusick #define MNT_UNMOUNT 0x01000000 /* unmount in progress */ 1610ad268d3Smckusick #define MNT_WANTRDWR 0x02000000 /* want upgrade to read/write */ 16237e65185Smckusick 16337e65185Smckusick /* 16437e65185Smckusick * Operations supported on mounted file system. 16537e65185Smckusick */ 1666f6d14e4Smckusick #ifdef KERNEL 16708be226dSkarels #ifdef __STDC__ 1683d6b36cdSmckusick struct nameidata; 169f59765e9Smckusick struct mbuf; 17008be226dSkarels #endif 17108be226dSkarels 17237e65185Smckusick struct vfsops { 17308be226dSkarels int (*vfs_mount) __P((struct mount *mp, char *path, caddr_t data, 17408be226dSkarels struct nameidata *ndp, struct proc *p)); 17508be226dSkarels int (*vfs_start) __P((struct mount *mp, int flags, 1763d6b36cdSmckusick struct proc *p)); 17708be226dSkarels int (*vfs_unmount) __P((struct mount *mp, int mntflags, 1783d6b36cdSmckusick struct proc *p)); 17908be226dSkarels int (*vfs_root) __P((struct mount *mp, struct vnode **vpp)); 180d0174f3dSmckusick int (*vfs_quotactl) __P((struct mount *mp, int cmds, uid_t uid, 18108be226dSkarels caddr_t arg, struct proc *p)); 18208be226dSkarels int (*vfs_statfs) __P((struct mount *mp, struct statfs *sbp, 1833d6b36cdSmckusick struct proc *p)); 184d0174f3dSmckusick int (*vfs_sync) __P((struct mount *mp, int waitfor, 185d0174f3dSmckusick struct ucred *cred, struct proc *p)); 186388852a9Smckusick int (*vfs_vget) __P((struct mount *mp, ino_t ino, 187388852a9Smckusick struct vnode **vpp)); 18808be226dSkarels int (*vfs_fhtovp) __P((struct mount *mp, struct fid *fhp, 189f59765e9Smckusick struct mbuf *nam, struct vnode **vpp, 190f59765e9Smckusick int *exflagsp, struct ucred **credanonp)); 19108be226dSkarels int (*vfs_vptofh) __P((struct vnode *vp, struct fid *fhp)); 1923cad2a65Sbostic int (*vfs_init) __P((void)); 19337e65185Smckusick }; 19437e65185Smckusick 1953d6b36cdSmckusick #define VFS_MOUNT(MP, PATH, DATA, NDP, P) \ 1963d6b36cdSmckusick (*(MP)->mnt_op->vfs_mount)(MP, PATH, DATA, NDP, P) 1973d6b36cdSmckusick #define VFS_START(MP, FLAGS, P) (*(MP)->mnt_op->vfs_start)(MP, FLAGS, P) 1983d6b36cdSmckusick #define VFS_UNMOUNT(MP, FORCE, P) (*(MP)->mnt_op->vfs_unmount)(MP, FORCE, P) 19942bc6a02Smckusick #define VFS_ROOT(MP, VPP) (*(MP)->mnt_op->vfs_root)(MP, VPP) 2003d6b36cdSmckusick #define VFS_QUOTACTL(MP,C,U,A,P) (*(MP)->mnt_op->vfs_quotactl)(MP, C, U, A, P) 2013d6b36cdSmckusick #define VFS_STATFS(MP, SBP, P) (*(MP)->mnt_op->vfs_statfs)(MP, SBP, P) 202d0174f3dSmckusick #define VFS_SYNC(MP, WAIT, C, P) (*(MP)->mnt_op->vfs_sync)(MP, WAIT, C, P) 203388852a9Smckusick #define VFS_VGET(MP, INO, VPP) (*(MP)->mnt_op->vfs_vget)(MP, INO, VPP) 204f59765e9Smckusick #define VFS_FHTOVP(MP, FIDP, NAM, VPP, EXFLG, CRED) \ 205f59765e9Smckusick (*(MP)->mnt_op->vfs_fhtovp)(MP, FIDP, NAM, VPP, EXFLG, CRED) 20642bc6a02Smckusick #define VFS_VPTOFH(VP, FIDP) (*(VP)->v_mount->mnt_op->vfs_vptofh)(VP, FIDP) 2076f6d14e4Smckusick #endif /* KERNEL */ 20837e65185Smckusick 20937e65185Smckusick /* 2107321ffb6Smckusick * Flags for various system call interfaces. 2117321ffb6Smckusick * 2127321ffb6Smckusick * waitfor flags to vfs_sync() and getfsstat() 21337e65185Smckusick */ 21437e65185Smckusick #define MNT_WAIT 1 21537e65185Smckusick #define MNT_NOWAIT 2 21637e65185Smckusick 21737e65185Smckusick /* 218da162f6bSmckusick * Generic file handle 219da162f6bSmckusick */ 220da162f6bSmckusick struct fhandle { 221da162f6bSmckusick fsid_t fh_fsid; /* File system id of mount point */ 2229578c90fSmckusick struct fid fh_fid; /* File sys specific id */ 223da162f6bSmckusick }; 224da162f6bSmckusick typedef struct fhandle fhandle_t; 225da162f6bSmckusick 226a04da360Smckusick #ifdef KERNEL 227a04da360Smckusick #include <net/radix.h> 22851d4aa02Shibler #include <sys/socket.h> /* XXX for AF_MAX */ 2299578c90fSmckusick 2309578c90fSmckusick /* 231a04da360Smckusick * Network address lookup element 2329578c90fSmckusick */ 233a04da360Smckusick struct netcred { 234a04da360Smckusick struct radix_node netc_rnodes[2]; 235a04da360Smckusick int netc_exflags; 236a04da360Smckusick struct ucred netc_anon; 237a04da360Smckusick }; 23851d4aa02Shibler 23951d4aa02Shibler /* 24051d4aa02Shibler * Network export information 24151d4aa02Shibler */ 24251d4aa02Shibler struct netexport { 24351d4aa02Shibler struct netcred ne_defexported; /* Default export */ 24451d4aa02Shibler struct radix_node_head *ne_rtable[AF_MAX+1]; /* Individual exports */ 24551d4aa02Shibler }; 246a04da360Smckusick #endif /* KERNEL */ 2479578c90fSmckusick 2489578c90fSmckusick /* 24951d4aa02Shibler * Export arguments for local filesystem mount calls. 25051d4aa02Shibler */ 25151d4aa02Shibler struct export_args { 25251d4aa02Shibler int ex_flags; /* export related flags */ 25351d4aa02Shibler uid_t ex_root; /* mapping for root uid */ 25451d4aa02Shibler struct ucred ex_anon; /* mapping for anonymous user */ 25551d4aa02Shibler struct sockaddr *ex_addr; /* net address to which exported */ 25651d4aa02Shibler int ex_addrlen; /* and the net address length */ 25751d4aa02Shibler struct sockaddr *ex_mask; /* mask of valid bits in saddr */ 25851d4aa02Shibler int ex_masklen; /* and the smask length */ 25951d4aa02Shibler }; 26051d4aa02Shibler 26151d4aa02Shibler /* 262d5bca046Smckusick * Arguments to mount UFS-based filesystems 263c933c9cbSmckusick */ 264c933c9cbSmckusick struct ufs_args { 265c933c9cbSmckusick char *fspec; /* block special device to mount */ 26651d4aa02Shibler struct export_args export; /* network export information */ 267c933c9cbSmckusick }; 268c933c9cbSmckusick 269cc73f08eSmckusick #ifdef MFS 270cc73f08eSmckusick /* 271cc73f08eSmckusick * Arguments to mount MFS 272cc73f08eSmckusick */ 273cc73f08eSmckusick struct mfs_args { 27451d4aa02Shibler char *fspec; /* name to export for statfs */ 27551d4aa02Shibler struct export_args export; /* if exported MFSes are supported */ 27651d4aa02Shibler caddr_t base; /* base of file system in memory */ 277c933c9cbSmckusick u_long size; /* size of file system */ 278cc73f08eSmckusick }; 2793cad2a65Sbostic #endif /* MFS */ 280cc73f08eSmckusick 2811f306492Smckusick #ifdef CD9660 28251d4aa02Shibler /* 28351d4aa02Shibler * Arguments to mount ISO 9660 filesystems. 28451d4aa02Shibler */ 28551d4aa02Shibler struct iso_args { 28651d4aa02Shibler char *fspec; /* block special device to mount */ 28751d4aa02Shibler struct export_args export; /* network export info */ 28851d4aa02Shibler int flags; /* mounting flags, see below */ 28951d4aa02Shibler 29051d4aa02Shibler }; 29151d4aa02Shibler #define ISOFSMNT_NORRIP 0x00000001 /* disable Rock Ridge Ext.*/ 29251d4aa02Shibler #define ISOFSMNT_GENS 0x00000002 /* enable generation numbers */ 29351d4aa02Shibler #define ISOFSMNT_EXTATT 0x00000004 /* enable extended attributes */ 2941f306492Smckusick #endif /* CD9660 */ 29551d4aa02Shibler 29637e65185Smckusick #ifdef NFS 29737e65185Smckusick /* 298b70b215bSmckusick * File Handle (32 bytes for version 2), variable up to 1024 for version 3 299b70b215bSmckusick */ 300e9cd9283Smckusick union nfsv2fh { 301e9cd9283Smckusick fhandle_t fh_generic; 302b70b215bSmckusick u_char fh_bytes[32]; 303b70b215bSmckusick }; 304e9cd9283Smckusick typedef union nfsv2fh nfsv2fh_t; 305b70b215bSmckusick 306b70b215bSmckusick /* 30737e65185Smckusick * Arguments to mount NFS 30837e65185Smckusick */ 30937e65185Smckusick struct nfs_args { 31035170248Smckusick struct sockaddr *addr; /* file server address */ 3119578c90fSmckusick int addrlen; /* length of address */ 31235170248Smckusick int sotype; /* Socket type */ 31335170248Smckusick int proto; /* and Protocol */ 314da162f6bSmckusick nfsv2fh_t *fh; /* File handle to be mounted */ 31537e65185Smckusick int flags; /* flags */ 31637e65185Smckusick int wsize; /* write size in bytes */ 31737e65185Smckusick int rsize; /* read size in bytes */ 31837e65185Smckusick int timeo; /* initial timeout in .1 secs */ 31937e65185Smckusick int retrans; /* times to retry send */ 3209578c90fSmckusick int maxgrouplist; /* Max. size of group list */ 3219578c90fSmckusick int readahead; /* # of blocks to readahead */ 3229578c90fSmckusick int leaseterm; /* Term (sec) of lease */ 3239578c90fSmckusick int deadthresh; /* Retrans threshold */ 32437e65185Smckusick char *hostname; /* server's name */ 32537e65185Smckusick }; 3263cad2a65Sbostic 3279578c90fSmckusick 32837e65185Smckusick /* 32937e65185Smckusick * NFS mount option flags 33037e65185Smckusick */ 3319578c90fSmckusick #define NFSMNT_SOFT 0x00000001 /* soft mount (hard is default) */ 3329578c90fSmckusick #define NFSMNT_WSIZE 0x00000002 /* set write size */ 3339578c90fSmckusick #define NFSMNT_RSIZE 0x00000004 /* set read size */ 3349578c90fSmckusick #define NFSMNT_TIMEO 0x00000008 /* set initial timeout */ 3359578c90fSmckusick #define NFSMNT_RETRANS 0x00000010 /* set number of request retrys */ 3369578c90fSmckusick #define NFSMNT_MAXGRPS 0x00000020 /* set maximum grouplist size */ 3379578c90fSmckusick #define NFSMNT_INT 0x00000040 /* allow interrupts on hard mount */ 3389578c90fSmckusick #define NFSMNT_NOCONN 0x00000080 /* Don't Connect the socket */ 3399578c90fSmckusick #define NFSMNT_NQNFS 0x00000100 /* Use Nqnfs protocol */ 3409578c90fSmckusick #define NFSMNT_MYWRITE 0x00000200 /* Assume writes were mine */ 3419578c90fSmckusick #define NFSMNT_KERB 0x00000400 /* Use Kerberos authentication */ 3429578c90fSmckusick #define NFSMNT_DUMBTIMR 0x00000800 /* Don't estimate rtt dynamically */ 3439578c90fSmckusick #define NFSMNT_RDIRALOOK 0x00001000 /* Do lookup with readdir (nqnfs) */ 3449578c90fSmckusick #define NFSMNT_LEASETERM 0x00002000 /* set lease term (nqnfs) */ 3459578c90fSmckusick #define NFSMNT_READAHEAD 0x00004000 /* set read ahead */ 3469578c90fSmckusick #define NFSMNT_DEADTHRESH 0x00008000 /* set dead server retry thresh */ 3479578c90fSmckusick #define NFSMNT_NQLOOKLEASE 0x00010000 /* Get lease for lookup */ 3489570c57eSmckusick #define NFSMNT_RESVPORT 0x00020000 /* Allocate a reserved port */ 3499578c90fSmckusick #define NFSMNT_INTERNAL 0xffe00000 /* Bits set internally */ 3509578c90fSmckusick #define NFSMNT_MNTD 0x00200000 /* Mnt server for mnt point */ 3519578c90fSmckusick #define NFSMNT_DISMINPROG 0x00400000 /* Dismount in progress */ 3529578c90fSmckusick #define NFSMNT_DISMNT 0x00800000 /* Dismounted */ 3539578c90fSmckusick #define NFSMNT_SNDLOCK 0x01000000 /* Send socket lock */ 3549578c90fSmckusick #define NFSMNT_WANTSND 0x02000000 /* Want above */ 3559578c90fSmckusick #define NFSMNT_RCVLOCK 0x04000000 /* Rcv socket lock */ 3569578c90fSmckusick #define NFSMNT_WANTRCV 0x08000000 /* Want above */ 3579578c90fSmckusick #define NFSMNT_WAITAUTH 0x10000000 /* Wait for authentication */ 3589578c90fSmckusick #define NFSMNT_HASAUTH 0x20000000 /* Has authenticator */ 3599578c90fSmckusick #define NFSMNT_WANTAUTH 0x40000000 /* Wants an authenticator */ 3609578c90fSmckusick #define NFSMNT_AUTHERR 0x80000000 /* Authentication error */ 3613cad2a65Sbostic #endif /* NFS */ 36237e65185Smckusick 36337e65185Smckusick #ifdef KERNEL 36437e65185Smckusick /* 36537e65185Smckusick * exported vnode operations 36637e65185Smckusick */ 36751d4aa02Shibler struct mount *getvfs __P((fsid_t *)); /* return vfs given fsid */ 36851d4aa02Shibler int vfs_export /* process mount export info */ 36951d4aa02Shibler __P((struct mount *, struct netexport *, struct export_args *)); 37051d4aa02Shibler struct netcred *vfs_export_lookup /* lookup host in fs export list */ 37151d4aa02Shibler __P((struct mount *, struct netexport *, struct mbuf *)); 37251d4aa02Shibler int vfs_lock __P((struct mount *)); /* lock a vfs */ 37351d4aa02Shibler int vfs_mountedon __P((struct vnode *));/* is a vfs mounted on vp */ 37451d4aa02Shibler void vfs_unlock __P((struct mount *)); /* unlock a vfs */ 375134356a5Smckusick extern TAILQ_HEAD(mntlist, mount) mountlist; /* mounted filesystem list */ 376134356a5Smckusick extern struct vfsops *vfssw[]; /* filesystem type table */ 37708be226dSkarels 37808be226dSkarels #else /* KERNEL */ 379bda92a63Sdonn 380bda92a63Sdonn #include <sys/cdefs.h> 381bda92a63Sdonn 382bda92a63Sdonn __BEGIN_DECLS 383bda92a63Sdonn int fstatfs __P((int, struct statfs *)); 384e4746589Sdonn int getfh __P((const char *, fhandle_t *)); 385e4746589Sdonn int getfsstat __P((struct statfs *, long, int)); 386bda92a63Sdonn int getmntinfo __P((struct statfs **, int)); 387e4746589Sdonn int mount __P((int, const char *, int, void *)); 388bda92a63Sdonn int statfs __P((const char *, struct statfs *)); 389bda92a63Sdonn int unmount __P((const char *, int)); 390bda92a63Sdonn __END_DECLS 391bda92a63Sdonn 39208be226dSkarels #endif /* KERNEL */ 393