1*64764edbSpgoyette /* $NetBSD: nfs_var.h,v 1.1.1.2 2016/11/18 07:49:12 pgoyette Exp $ */ 29012e0edSdholland /*- 39012e0edSdholland * Copyright (c) 1989, 1993 49012e0edSdholland * The Regents of the University of California. All rights reserved. 59012e0edSdholland * 69012e0edSdholland * This code is derived from software contributed to Berkeley by 79012e0edSdholland * Rick Macklem at The University of Guelph. 89012e0edSdholland * 99012e0edSdholland * Redistribution and use in source and binary forms, with or without 109012e0edSdholland * modification, are permitted provided that the following conditions 119012e0edSdholland * are met: 129012e0edSdholland * 1. Redistributions of source code must retain the above copyright 139012e0edSdholland * notice, this list of conditions and the following disclaimer. 149012e0edSdholland * 2. Redistributions in binary form must reproduce the above copyright 159012e0edSdholland * notice, this list of conditions and the following disclaimer in the 169012e0edSdholland * documentation and/or other materials provided with the distribution. 179012e0edSdholland * 4. Neither the name of the University nor the names of its contributors 189012e0edSdholland * may be used to endorse or promote products derived from this software 199012e0edSdholland * without specific prior written permission. 209012e0edSdholland * 219012e0edSdholland * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 229012e0edSdholland * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 239012e0edSdholland * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 249012e0edSdholland * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 259012e0edSdholland * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 269012e0edSdholland * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 279012e0edSdholland * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 289012e0edSdholland * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 299012e0edSdholland * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 309012e0edSdholland * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 319012e0edSdholland * SUCH DAMAGE. 329012e0edSdholland * 33*64764edbSpgoyette * FreeBSD: head/sys/fs/nfs/nfs_var.h 294084 2016-01-15 09:05:14Z melifaro 34*64764edbSpgoyette * $NetBSD: nfs_var.h,v 1.1.1.2 2016/11/18 07:49:12 pgoyette Exp $ 359012e0edSdholland */ 369012e0edSdholland 379012e0edSdholland /* 389012e0edSdholland * XXX needs <nfs/rpcv2.h> and <nfs/nfs.h> because of typedefs 399012e0edSdholland */ 409012e0edSdholland 419012e0edSdholland struct uio; 429012e0edSdholland struct ucred; 439012e0edSdholland struct nfscred; 449012e0edSdholland NFSPROC_T; 459012e0edSdholland struct buf; 469012e0edSdholland struct sockaddr_in; 479012e0edSdholland struct nfs_dlmount; 489012e0edSdholland struct file; 499012e0edSdholland struct nfsmount; 509012e0edSdholland struct socket; 519012e0edSdholland struct nfsreq; 529012e0edSdholland struct nfssockreq; 539012e0edSdholland struct vattr; 549012e0edSdholland struct nameidata; 559012e0edSdholland struct nfsnode; 569012e0edSdholland struct nfsfh; 579012e0edSdholland struct sillyrename; 589012e0edSdholland struct componentname; 599012e0edSdholland struct nfsd_srvargs; 609012e0edSdholland struct nfsrv_descript; 619012e0edSdholland struct nfs_fattr; 629012e0edSdholland union nethostaddr; 639012e0edSdholland struct nfsstate; 649012e0edSdholland struct nfslock; 659012e0edSdholland struct nfsclient; 66*64764edbSpgoyette struct nfsdsession; 679012e0edSdholland struct nfslockconflict; 689012e0edSdholland struct nfsd_idargs; 699012e0edSdholland struct nfsd_clid; 709012e0edSdholland struct nfsusrgrp; 719012e0edSdholland struct nfsclowner; 729012e0edSdholland struct nfsclopen; 739012e0edSdholland struct nfsclopenhead; 749012e0edSdholland struct nfsclclient; 759012e0edSdholland struct nfsclsession; 769012e0edSdholland struct nfscllockowner; 779012e0edSdholland struct nfscllock; 789012e0edSdholland struct nfscldeleg; 799012e0edSdholland struct nfscllayout; 809012e0edSdholland struct nfscldevinfo; 819012e0edSdholland struct nfsv4lock; 829012e0edSdholland struct nfsvattr; 839012e0edSdholland struct nfs_vattr; 849012e0edSdholland struct NFSSVCARGS; 859012e0edSdholland #ifdef __FreeBSD__ 869012e0edSdholland NFS_ACCESS_ARGS; 879012e0edSdholland NFS_OPEN_ARGS; 889012e0edSdholland NFS_GETATTR_ARGS; 899012e0edSdholland NFS_LOOKUP_ARGS; 909012e0edSdholland NFS_READDIR_ARGS; 919012e0edSdholland #endif 929012e0edSdholland 939012e0edSdholland /* nfs_nfsdstate.c */ 949012e0edSdholland int nfsrv_setclient(struct nfsrv_descript *, struct nfsclient **, 959012e0edSdholland nfsquad_t *, nfsquad_t *, NFSPROC_T *); 96*64764edbSpgoyette int nfsrv_getclient(nfsquad_t, int, struct nfsclient **, struct nfsdsession *, 97*64764edbSpgoyette nfsquad_t, uint32_t, struct nfsrv_descript *, NFSPROC_T *); 98*64764edbSpgoyette int nfsrv_destroyclient(nfsquad_t, NFSPROC_T *); 99*64764edbSpgoyette int nfsrv_destroysession(struct nfsrv_descript *, uint8_t *); 100*64764edbSpgoyette int nfsrv_freestateid(struct nfsrv_descript *, nfsv4stateid_t *, NFSPROC_T *); 1019012e0edSdholland int nfsrv_adminrevoke(struct nfsd_clid *, NFSPROC_T *); 1029012e0edSdholland void nfsrv_dumpclients(struct nfsd_dumpclients *, int); 1039012e0edSdholland void nfsrv_dumplocks(vnode_t, struct nfsd_dumplocks *, int, NFSPROC_T *); 1049012e0edSdholland int nfsrv_lockctrl(vnode_t, struct nfsstate **, 1059012e0edSdholland struct nfslock **, struct nfslockconflict *, nfsquad_t, nfsv4stateid_t *, 1069012e0edSdholland struct nfsexstuff *, struct nfsrv_descript *, NFSPROC_T *); 1079012e0edSdholland int nfsrv_openctrl(struct nfsrv_descript *, vnode_t, 1089012e0edSdholland struct nfsstate **, nfsquad_t, nfsv4stateid_t *, nfsv4stateid_t *, 1099012e0edSdholland u_int32_t *, struct nfsexstuff *, NFSPROC_T *, u_quad_t); 1109012e0edSdholland int nfsrv_opencheck(nfsquad_t, nfsv4stateid_t *, struct nfsstate *, 1119012e0edSdholland vnode_t, struct nfsrv_descript *, NFSPROC_T *, int); 1129012e0edSdholland int nfsrv_openupdate(vnode_t, struct nfsstate *, nfsquad_t, 1139012e0edSdholland nfsv4stateid_t *, struct nfsrv_descript *, NFSPROC_T *); 114*64764edbSpgoyette int nfsrv_delegupdate(struct nfsrv_descript *, nfsquad_t, nfsv4stateid_t *, 115*64764edbSpgoyette vnode_t, int, struct ucred *, NFSPROC_T *); 1169012e0edSdholland int nfsrv_releaselckown(struct nfsstate *, nfsquad_t, NFSPROC_T *); 1179012e0edSdholland void nfsrv_zapclient(struct nfsclient *, NFSPROC_T *); 1189012e0edSdholland int nfssvc_idname(struct nfsd_idargs *); 1199012e0edSdholland void nfsrv_servertimer(void); 1209012e0edSdholland int nfsrv_getclientipaddr(struct nfsrv_descript *, struct nfsclient *); 1219012e0edSdholland void nfsrv_setupstable(NFSPROC_T *); 1229012e0edSdholland void nfsrv_updatestable(NFSPROC_T *); 1239012e0edSdholland void nfsrv_writestable(u_char *, int, int, NFSPROC_T *); 1249012e0edSdholland void nfsrv_throwawayopens(NFSPROC_T *); 1259012e0edSdholland int nfsrv_checkremove(vnode_t, int, NFSPROC_T *); 1269012e0edSdholland void nfsd_recalldelegation(vnode_t, NFSPROC_T *); 1279012e0edSdholland void nfsd_disabledelegation(vnode_t, NFSPROC_T *); 1289012e0edSdholland int nfsrv_checksetattr(vnode_t, struct nfsrv_descript *, 1299012e0edSdholland nfsv4stateid_t *, struct nfsvattr *, nfsattrbit_t *, struct nfsexstuff *, 1309012e0edSdholland NFSPROC_T *); 1319012e0edSdholland int nfsrv_checkgetattr(struct nfsrv_descript *, vnode_t, 1329012e0edSdholland struct nfsvattr *, nfsattrbit_t *, struct ucred *, NFSPROC_T *); 1339012e0edSdholland int nfsrv_nfsuserdport(u_short, NFSPROC_T *); 1349012e0edSdholland void nfsrv_nfsuserddelport(void); 1359012e0edSdholland void nfsrv_throwawayallstate(NFSPROC_T *); 136*64764edbSpgoyette int nfsrv_checksequence(struct nfsrv_descript *, uint32_t, uint32_t *, 137*64764edbSpgoyette uint32_t *, int, uint32_t *, NFSPROC_T *); 138*64764edbSpgoyette int nfsrv_checkreclaimcomplete(struct nfsrv_descript *); 139*64764edbSpgoyette void nfsrv_cache_session(uint8_t *, uint32_t, int, struct mbuf **); 140*64764edbSpgoyette void nfsrv_freeallbackchannel_xprts(void); 1419012e0edSdholland 1429012e0edSdholland /* nfs_nfsdserv.c */ 1439012e0edSdholland int nfsrvd_access(struct nfsrv_descript *, int, 1449012e0edSdholland vnode_t, NFSPROC_T *, struct nfsexstuff *); 1459012e0edSdholland int nfsrvd_getattr(struct nfsrv_descript *, int, 1469012e0edSdholland vnode_t, NFSPROC_T *, struct nfsexstuff *); 1479012e0edSdholland int nfsrvd_setattr(struct nfsrv_descript *, int, 1489012e0edSdholland vnode_t, NFSPROC_T *, struct nfsexstuff *); 1499012e0edSdholland int nfsrvd_lookup(struct nfsrv_descript *, int, 1509012e0edSdholland vnode_t, vnode_t *, fhandle_t *, NFSPROC_T *, 1519012e0edSdholland struct nfsexstuff *); 1529012e0edSdholland int nfsrvd_readlink(struct nfsrv_descript *, int, 1539012e0edSdholland vnode_t, NFSPROC_T *, struct nfsexstuff *); 1549012e0edSdholland int nfsrvd_read(struct nfsrv_descript *, int, 1559012e0edSdholland vnode_t, NFSPROC_T *, struct nfsexstuff *); 1569012e0edSdholland int nfsrvd_write(struct nfsrv_descript *, int, 1579012e0edSdholland vnode_t, NFSPROC_T *, struct nfsexstuff *); 1589012e0edSdholland int nfsrvd_create(struct nfsrv_descript *, int, 1599012e0edSdholland vnode_t, NFSPROC_T *, struct nfsexstuff *); 1609012e0edSdholland int nfsrvd_mknod(struct nfsrv_descript *, int, 1619012e0edSdholland vnode_t, vnode_t *, fhandle_t *, NFSPROC_T *, 1629012e0edSdholland struct nfsexstuff *); 1639012e0edSdholland int nfsrvd_remove(struct nfsrv_descript *, int, 1649012e0edSdholland vnode_t, NFSPROC_T *, struct nfsexstuff *); 1659012e0edSdholland int nfsrvd_rename(struct nfsrv_descript *, int, 1669012e0edSdholland vnode_t, vnode_t, NFSPROC_T *, struct nfsexstuff *, 1679012e0edSdholland struct nfsexstuff *); 1689012e0edSdholland int nfsrvd_link(struct nfsrv_descript *, int, 1699012e0edSdholland vnode_t, vnode_t, NFSPROC_T *, struct nfsexstuff *, 1709012e0edSdholland struct nfsexstuff *); 1719012e0edSdholland int nfsrvd_symlink(struct nfsrv_descript *, int, 1729012e0edSdholland vnode_t, vnode_t *, fhandle_t *, NFSPROC_T *, 1739012e0edSdholland struct nfsexstuff *); 1749012e0edSdholland int nfsrvd_mkdir(struct nfsrv_descript *, int, 1759012e0edSdholland vnode_t, vnode_t *, fhandle_t *, NFSPROC_T *, 1769012e0edSdholland struct nfsexstuff *); 1779012e0edSdholland int nfsrvd_readdir(struct nfsrv_descript *, int, 1789012e0edSdholland vnode_t, NFSPROC_T *, struct nfsexstuff *); 1799012e0edSdholland int nfsrvd_readdirplus(struct nfsrv_descript *, int, 1809012e0edSdholland vnode_t, NFSPROC_T *, struct nfsexstuff *); 1819012e0edSdholland int nfsrvd_commit(struct nfsrv_descript *, int, 1829012e0edSdholland vnode_t, NFSPROC_T *, struct nfsexstuff *); 1839012e0edSdholland int nfsrvd_statfs(struct nfsrv_descript *, int, 1849012e0edSdholland vnode_t, NFSPROC_T *, struct nfsexstuff *); 1859012e0edSdholland int nfsrvd_fsinfo(struct nfsrv_descript *, int, 1869012e0edSdholland vnode_t, NFSPROC_T *, struct nfsexstuff *); 1879012e0edSdholland int nfsrvd_close(struct nfsrv_descript *, int, 1889012e0edSdholland vnode_t, NFSPROC_T *, struct nfsexstuff *); 1899012e0edSdholland int nfsrvd_delegpurge(struct nfsrv_descript *, int, 1909012e0edSdholland vnode_t, NFSPROC_T *, struct nfsexstuff *); 1919012e0edSdholland int nfsrvd_delegreturn(struct nfsrv_descript *, int, 1929012e0edSdholland vnode_t, NFSPROC_T *, struct nfsexstuff *); 1939012e0edSdholland int nfsrvd_getfh(struct nfsrv_descript *, int, 1949012e0edSdholland vnode_t, NFSPROC_T *, struct nfsexstuff *); 1959012e0edSdholland int nfsrvd_lock(struct nfsrv_descript *, int, 1969012e0edSdholland vnode_t, NFSPROC_T *, struct nfsexstuff *); 1979012e0edSdholland int nfsrvd_lockt(struct nfsrv_descript *, int, 1989012e0edSdholland vnode_t, NFSPROC_T *, struct nfsexstuff *); 1999012e0edSdholland int nfsrvd_locku(struct nfsrv_descript *, int, 2009012e0edSdholland vnode_t, NFSPROC_T *, struct nfsexstuff *); 2019012e0edSdholland int nfsrvd_openconfirm(struct nfsrv_descript *, int, 2029012e0edSdholland vnode_t, NFSPROC_T *, struct nfsexstuff *); 2039012e0edSdholland int nfsrvd_opendowngrade(struct nfsrv_descript *, int, 2049012e0edSdholland vnode_t, NFSPROC_T *, struct nfsexstuff *); 2059012e0edSdholland int nfsrvd_renew(struct nfsrv_descript *, int, 2069012e0edSdholland vnode_t, NFSPROC_T *, struct nfsexstuff *); 2079012e0edSdholland int nfsrvd_secinfo(struct nfsrv_descript *, int, 2089012e0edSdholland vnode_t, NFSPROC_T *, struct nfsexstuff *); 2099012e0edSdholland int nfsrvd_setclientid(struct nfsrv_descript *, int, 2109012e0edSdholland vnode_t, NFSPROC_T *, struct nfsexstuff *); 2119012e0edSdholland int nfsrvd_setclientidcfrm(struct nfsrv_descript *, int, 2129012e0edSdholland vnode_t, NFSPROC_T *, struct nfsexstuff *); 2139012e0edSdholland int nfsrvd_verify(struct nfsrv_descript *, int, 2149012e0edSdholland vnode_t, NFSPROC_T *, struct nfsexstuff *); 2159012e0edSdholland int nfsrvd_open(struct nfsrv_descript *, int, 2169012e0edSdholland vnode_t, vnode_t *, fhandle_t *, NFSPROC_T *, 2179012e0edSdholland struct nfsexstuff *); 2189012e0edSdholland int nfsrvd_openattr(struct nfsrv_descript *, int, 2199012e0edSdholland vnode_t, vnode_t *, fhandle_t *, NFSPROC_T *, 2209012e0edSdholland struct nfsexstuff *); 2219012e0edSdholland int nfsrvd_releaselckown(struct nfsrv_descript *, int, 2229012e0edSdholland vnode_t, NFSPROC_T *, struct nfsexstuff *); 2239012e0edSdholland int nfsrvd_pathconf(struct nfsrv_descript *, int, 2249012e0edSdholland vnode_t, NFSPROC_T *, struct nfsexstuff *); 225*64764edbSpgoyette int nfsrvd_exchangeid(struct nfsrv_descript *, int, 226*64764edbSpgoyette vnode_t, NFSPROC_T *, struct nfsexstuff *); 227*64764edbSpgoyette int nfsrvd_createsession(struct nfsrv_descript *, int, 228*64764edbSpgoyette vnode_t, NFSPROC_T *, struct nfsexstuff *); 229*64764edbSpgoyette int nfsrvd_sequence(struct nfsrv_descript *, int, 230*64764edbSpgoyette vnode_t, NFSPROC_T *, struct nfsexstuff *); 231*64764edbSpgoyette int nfsrvd_reclaimcomplete(struct nfsrv_descript *, int, 232*64764edbSpgoyette vnode_t, NFSPROC_T *, struct nfsexstuff *); 233*64764edbSpgoyette int nfsrvd_destroyclientid(struct nfsrv_descript *, int, 234*64764edbSpgoyette vnode_t, NFSPROC_T *, struct nfsexstuff *); 235*64764edbSpgoyette int nfsrvd_destroysession(struct nfsrv_descript *, int, 236*64764edbSpgoyette vnode_t, NFSPROC_T *, struct nfsexstuff *); 237*64764edbSpgoyette int nfsrvd_freestateid(struct nfsrv_descript *, int, 238*64764edbSpgoyette vnode_t, NFSPROC_T *, struct nfsexstuff *); 239*64764edbSpgoyette int nfsrvd_notsupp(struct nfsrv_descript *, int, 240*64764edbSpgoyette vnode_t, NFSPROC_T *, struct nfsexstuff *); 2419012e0edSdholland 2429012e0edSdholland /* nfs_nfsdsocket.c */ 2439012e0edSdholland void nfsrvd_rephead(struct nfsrv_descript *); 244*64764edbSpgoyette void nfsrvd_dorpc(struct nfsrv_descript *, int, u_char *, int, u_int32_t, 245*64764edbSpgoyette NFSPROC_T *); 2469012e0edSdholland 2479012e0edSdholland /* nfs_nfsdcache.c */ 2489012e0edSdholland void nfsrvd_initcache(void); 249*64764edbSpgoyette int nfsrvd_getcache(struct nfsrv_descript *); 250*64764edbSpgoyette struct nfsrvcache *nfsrvd_updatecache(struct nfsrv_descript *); 251*64764edbSpgoyette void nfsrvd_sentcache(struct nfsrvcache *, int, uint32_t); 2529012e0edSdholland void nfsrvd_cleancache(void); 2539012e0edSdholland void nfsrvd_refcache(struct nfsrvcache *); 2549012e0edSdholland void nfsrvd_derefcache(struct nfsrvcache *); 2559012e0edSdholland void nfsrvd_delcache(struct nfsrvcache *); 256*64764edbSpgoyette void nfsrc_trimcache(uint64_t, uint32_t, int); 2579012e0edSdholland 2589012e0edSdholland /* nfs_commonsubs.c */ 2599012e0edSdholland void newnfs_init(void); 2609012e0edSdholland int nfsaddr_match(int, union nethostaddr *, NFSSOCKADDR_T); 2619012e0edSdholland int nfsaddr2_match(NFSSOCKADDR_T, NFSSOCKADDR_T); 2629012e0edSdholland int nfsm_strtom(struct nfsrv_descript *, const char *, int); 2639012e0edSdholland int nfsm_mbufuio(struct nfsrv_descript *, struct uio *, int); 2649012e0edSdholland int nfsm_fhtom(struct nfsrv_descript *, u_int8_t *, int, int); 2659012e0edSdholland int nfsm_advance(struct nfsrv_descript *, int, int); 2669012e0edSdholland void *nfsm_dissct(struct nfsrv_descript *, int, int); 2679012e0edSdholland void newnfs_trimleading(struct nfsrv_descript *); 2689012e0edSdholland void newnfs_trimtrailing(struct nfsrv_descript *, mbuf_t, 2699012e0edSdholland caddr_t); 2709012e0edSdholland void newnfs_copycred(struct nfscred *, struct ucred *); 2719012e0edSdholland void newnfs_copyincred(struct ucred *, struct nfscred *); 2729012e0edSdholland int nfsrv_dissectacl(struct nfsrv_descript *, NFSACL_T *, int *, 2739012e0edSdholland int *, NFSPROC_T *); 2749012e0edSdholland int nfsrv_getattrbits(struct nfsrv_descript *, nfsattrbit_t *, int *, 2759012e0edSdholland int *); 2769012e0edSdholland int nfsv4_loadattr(struct nfsrv_descript *, vnode_t, 2779012e0edSdholland struct nfsvattr *, struct nfsfh **, fhandle_t *, int, 2789012e0edSdholland struct nfsv3_pathconf *, struct statfs *, struct nfsstatfs *, 2799012e0edSdholland struct nfsfsinfo *, NFSACL_T *, 2809012e0edSdholland int, int *, u_int32_t *, u_int32_t *, NFSPROC_T *, struct ucred *); 2819012e0edSdholland int nfsv4_lock(struct nfsv4lock *, int, int *, void *, struct mount *); 2829012e0edSdholland void nfsv4_unlock(struct nfsv4lock *, int); 2839012e0edSdholland void nfsv4_relref(struct nfsv4lock *); 2849012e0edSdholland void nfsv4_getref(struct nfsv4lock *, int *, void *, struct mount *); 2859012e0edSdholland int nfsv4_getref_nonblock(struct nfsv4lock *); 2869012e0edSdholland int nfsv4_testlock(struct nfsv4lock *); 2879012e0edSdholland int nfsrv_mtostr(struct nfsrv_descript *, char *, int); 288*64764edbSpgoyette void nfsrv_cleanusergroup(void); 2899012e0edSdholland int nfsrv_checkutf8(u_int8_t *, int); 2909012e0edSdholland int newnfs_sndlock(int *); 2919012e0edSdholland void newnfs_sndunlock(int *); 2929012e0edSdholland int nfsv4_getipaddr(struct nfsrv_descript *, struct sockaddr_storage *, 2939012e0edSdholland int *); 2949012e0edSdholland int nfsv4_seqsession(uint32_t, uint32_t, uint32_t, struct nfsslot *, 2959012e0edSdholland struct mbuf **, uint16_t); 296*64764edbSpgoyette void nfsv4_seqsess_cacherep(uint32_t, struct nfsslot *, int, struct mbuf **); 297*64764edbSpgoyette void nfsv4_setsequence(struct nfsmount *, struct nfsrv_descript *, 298*64764edbSpgoyette struct nfsclsession *, int); 299*64764edbSpgoyette int nfsv4_sequencelookup(struct nfsmount *, struct nfsclsession *, int *, 300*64764edbSpgoyette int *, uint32_t *, uint8_t *); 3019012e0edSdholland void nfsv4_freeslot(struct nfsclsession *, int); 302*64764edbSpgoyette struct ucred *nfsrv_getgrpscred(struct ucred *); 3039012e0edSdholland 3049012e0edSdholland /* nfs_clcomsubs.c */ 3059012e0edSdholland void nfsm_uiombuf(struct nfsrv_descript *, struct uio *, int); 3069012e0edSdholland void nfscl_reqstart(struct nfsrv_descript *, int, struct nfsmount *, 3079012e0edSdholland u_int8_t *, int, u_int32_t **, struct nfsclsession *); 3089012e0edSdholland nfsuint64 *nfscl_getcookie(struct nfsnode *, off_t off, int); 3099012e0edSdholland void nfscl_fillsattr(struct nfsrv_descript *, struct vattr *, 3109012e0edSdholland vnode_t, int, u_int32_t); 311*64764edbSpgoyette u_int8_t *nfscl_getmyip(struct nfsmount *, struct in6_addr *, int *); 3129012e0edSdholland int nfsm_getfh(struct nfsrv_descript *, struct nfsfh **); 3139012e0edSdholland int nfscl_mtofh(struct nfsrv_descript *, struct nfsfh **, 3149012e0edSdholland struct nfsvattr *, int *); 3159012e0edSdholland int nfscl_postop_attr(struct nfsrv_descript *, struct nfsvattr *, int *, 3169012e0edSdholland void *); 3179012e0edSdholland int nfscl_wcc_data(struct nfsrv_descript *, vnode_t, 3189012e0edSdholland struct nfsvattr *, int *, int *, void *); 3199012e0edSdholland int nfsm_loadattr(struct nfsrv_descript *, struct nfsvattr *); 3209012e0edSdholland int nfscl_request(struct nfsrv_descript *, vnode_t, 3219012e0edSdholland NFSPROC_T *, struct ucred *, void *); 3229012e0edSdholland void nfsm_stateidtom(struct nfsrv_descript *, nfsv4stateid_t *, int); 3239012e0edSdholland 3249012e0edSdholland /* nfs_nfsdsubs.c */ 3259012e0edSdholland void nfsd_fhtovp(struct nfsrv_descript *, struct nfsrvfh *, int, 3269012e0edSdholland vnode_t *, struct nfsexstuff *, 3279012e0edSdholland mount_t *, int, NFSPROC_T *); 3289012e0edSdholland int nfsd_excred(struct nfsrv_descript *, struct nfsexstuff *, struct ucred *); 3299012e0edSdholland int nfsrv_mtofh(struct nfsrv_descript *, struct nfsrvfh *); 3309012e0edSdholland int nfsrv_putattrbit(struct nfsrv_descript *, nfsattrbit_t *); 3319012e0edSdholland void nfsrv_wcc(struct nfsrv_descript *, int, struct nfsvattr *, int, 3329012e0edSdholland struct nfsvattr *); 3339012e0edSdholland int nfsv4_fillattr(struct nfsrv_descript *, struct mount *, vnode_t, NFSACL_T *, 3349012e0edSdholland struct vattr *, fhandle_t *, int, nfsattrbit_t *, 3359012e0edSdholland struct ucred *, NFSPROC_T *, int, int, int, int, uint64_t); 3369012e0edSdholland void nfsrv_fillattr(struct nfsrv_descript *, struct nfsvattr *); 3379012e0edSdholland void nfsrv_adj(mbuf_t, int, int); 3389012e0edSdholland void nfsrv_postopattr(struct nfsrv_descript *, int, struct nfsvattr *); 3399012e0edSdholland int nfsd_errmap(struct nfsrv_descript *); 3409012e0edSdholland void nfsv4_uidtostr(uid_t, u_char **, int *, NFSPROC_T *); 3419012e0edSdholland int nfsv4_strtouid(struct nfsrv_descript *, u_char *, int, uid_t *, 3429012e0edSdholland NFSPROC_T *); 3439012e0edSdholland void nfsv4_gidtostr(gid_t, u_char **, int *, NFSPROC_T *); 3449012e0edSdholland int nfsv4_strtogid(struct nfsrv_descript *, u_char *, int, gid_t *, 3459012e0edSdholland NFSPROC_T *); 3469012e0edSdholland int nfsrv_checkuidgid(struct nfsrv_descript *, struct nfsvattr *); 3479012e0edSdholland void nfsrv_fixattr(struct nfsrv_descript *, vnode_t, 3489012e0edSdholland struct nfsvattr *, NFSACL_T *, NFSPROC_T *, nfsattrbit_t *, 3499012e0edSdholland struct nfsexstuff *); 3509012e0edSdholland int nfsrv_errmoved(int); 3519012e0edSdholland int nfsrv_putreferralattr(struct nfsrv_descript *, nfsattrbit_t *, 3529012e0edSdholland struct nfsreferral *, int, int *); 3539012e0edSdholland int nfsrv_parsename(struct nfsrv_descript *, char *, u_long *, 3549012e0edSdholland NFSPATHLEN_T *); 3559012e0edSdholland void nfsd_init(void); 3569012e0edSdholland int nfsd_checkrootexp(struct nfsrv_descript *); 357*64764edbSpgoyette void nfsd_getminorvers(struct nfsrv_descript *, u_char *, u_char **, int *, 358*64764edbSpgoyette u_int32_t *); 3599012e0edSdholland 3609012e0edSdholland /* nfs_clvfsops.c */ 3619012e0edSdholland void nfscl_retopts(struct nfsmount *, char *, size_t); 3629012e0edSdholland 3639012e0edSdholland /* nfs_commonport.c */ 3649012e0edSdholland int nfsrv_lookupfilename(struct nameidata *, char *, NFSPROC_T *); 3659012e0edSdholland void nfsrv_object_create(vnode_t, NFSPROC_T *); 3669012e0edSdholland int nfsrv_mallocmget_limit(void); 3679012e0edSdholland int nfsvno_v4rootexport(struct nfsrv_descript *); 3689012e0edSdholland void newnfs_portinit(void); 3699012e0edSdholland struct ucred *newnfs_getcred(void); 3709012e0edSdholland void newnfs_setroot(struct ucred *); 3719012e0edSdholland int nfs_catnap(int, int, const char *); 3729012e0edSdholland struct nfsreferral *nfsv4root_getreferral(vnode_t, vnode_t, u_int32_t); 3739012e0edSdholland int nfsvno_pathconf(vnode_t, int, register_t *, struct ucred *, 3749012e0edSdholland NFSPROC_T *); 3759012e0edSdholland int nfsrv_atroot(vnode_t, long *); 3769012e0edSdholland void newnfs_timer(void *); 3779012e0edSdholland int nfs_supportsnfsv4acls(vnode_t); 3789012e0edSdholland 3799012e0edSdholland /* nfs_commonacl.c */ 3809012e0edSdholland int nfsrv_dissectace(struct nfsrv_descript *, struct acl_entry *, 3819012e0edSdholland int *, int *, NFSPROC_T *); 3829012e0edSdholland int nfsrv_buildacl(struct nfsrv_descript *, NFSACL_T *, enum vtype, 3839012e0edSdholland NFSPROC_T *); 3849012e0edSdholland int nfsrv_setacl(vnode_t, NFSACL_T *, struct ucred *, 3859012e0edSdholland NFSPROC_T *); 3869012e0edSdholland int nfsrv_compareacl(NFSACL_T *, NFSACL_T *); 3879012e0edSdholland 3889012e0edSdholland /* nfs_clrpcops.c */ 3899012e0edSdholland int nfsrpc_null(vnode_t, struct ucred *, NFSPROC_T *); 3909012e0edSdholland int nfsrpc_access(vnode_t, int, struct ucred *, NFSPROC_T *, 3919012e0edSdholland struct nfsvattr *, int *); 3929012e0edSdholland int nfsrpc_accessrpc(vnode_t, u_int32_t, struct ucred *, 3939012e0edSdholland NFSPROC_T *, struct nfsvattr *, int *, u_int32_t *, void *); 3949012e0edSdholland int nfsrpc_open(vnode_t, int, struct ucred *, NFSPROC_T *); 3959012e0edSdholland int nfsrpc_openrpc(struct nfsmount *, vnode_t, u_int8_t *, int, u_int8_t *, int, 3969012e0edSdholland u_int32_t, struct nfsclopen *, u_int8_t *, int, struct nfscldeleg **, int, 3979012e0edSdholland u_int32_t, struct ucred *, NFSPROC_T *, int, int); 3989012e0edSdholland int nfsrpc_opendowngrade(vnode_t, u_int32_t, struct nfsclopen *, 3999012e0edSdholland struct ucred *, NFSPROC_T *); 4009012e0edSdholland int nfsrpc_close(vnode_t, int, NFSPROC_T *); 4019012e0edSdholland int nfsrpc_closerpc(struct nfsrv_descript *, struct nfsmount *, 4029012e0edSdholland struct nfsclopen *, struct ucred *, NFSPROC_T *, int); 4039012e0edSdholland int nfsrpc_openconfirm(vnode_t, u_int8_t *, int, struct nfsclopen *, 4049012e0edSdholland struct ucred *, NFSPROC_T *); 4059012e0edSdholland int nfsrpc_setclient(struct nfsmount *, struct nfsclclient *, int, 4069012e0edSdholland struct ucred *, NFSPROC_T *); 4079012e0edSdholland int nfsrpc_getattr(vnode_t, struct ucred *, NFSPROC_T *, 4089012e0edSdholland struct nfsvattr *, void *); 4099012e0edSdholland int nfsrpc_getattrnovp(struct nfsmount *, u_int8_t *, int, int, 4109012e0edSdholland struct ucred *, NFSPROC_T *, struct nfsvattr *, u_int64_t *, uint32_t *); 4119012e0edSdholland int nfsrpc_setattr(vnode_t, struct vattr *, NFSACL_T *, struct ucred *, 4129012e0edSdholland NFSPROC_T *, struct nfsvattr *, int *, void *); 4139012e0edSdholland int nfsrpc_lookup(vnode_t, char *, int, struct ucred *, NFSPROC_T *, 4149012e0edSdholland struct nfsvattr *, struct nfsvattr *, struct nfsfh **, int *, int *, 4159012e0edSdholland void *); 4169012e0edSdholland int nfsrpc_readlink(vnode_t, struct uio *, struct ucred *, 4179012e0edSdholland NFSPROC_T *, struct nfsvattr *, int *, void *); 4189012e0edSdholland int nfsrpc_read(vnode_t, struct uio *, struct ucred *, NFSPROC_T *, 4199012e0edSdholland struct nfsvattr *, int *, void *); 4209012e0edSdholland int nfsrpc_write(vnode_t, struct uio *, int *, int *, 4219012e0edSdholland struct ucred *, NFSPROC_T *, struct nfsvattr *, int *, void *, int); 4229012e0edSdholland int nfsrpc_mknod(vnode_t, char *, int, struct vattr *, u_int32_t, 4239012e0edSdholland enum vtype, struct ucred *, NFSPROC_T *, struct nfsvattr *, 4249012e0edSdholland struct nfsvattr *, struct nfsfh **, int *, int *, void *); 4259012e0edSdholland int nfsrpc_create(vnode_t, char *, int, struct vattr *, nfsquad_t, 4269012e0edSdholland int, struct ucred *, NFSPROC_T *, struct nfsvattr *, struct nfsvattr *, 4279012e0edSdholland struct nfsfh **, int *, int *, void *); 4289012e0edSdholland int nfsrpc_remove(vnode_t, char *, int, vnode_t, struct ucred *, NFSPROC_T *, 4299012e0edSdholland struct nfsvattr *, int *, void *); 4309012e0edSdholland int nfsrpc_rename(vnode_t, vnode_t, char *, int, vnode_t, vnode_t, char *, int, 4319012e0edSdholland struct ucred *, NFSPROC_T *, struct nfsvattr *, struct nfsvattr *, 4329012e0edSdholland int *, int *, void *, void *); 4339012e0edSdholland int nfsrpc_link(vnode_t, vnode_t, char *, int, 4349012e0edSdholland struct ucred *, NFSPROC_T *, struct nfsvattr *, struct nfsvattr *, 4359012e0edSdholland int *, int *, void *); 4369012e0edSdholland int nfsrpc_symlink(vnode_t, char *, int, char *, struct vattr *, 4379012e0edSdholland struct ucred *, NFSPROC_T *, struct nfsvattr *, struct nfsvattr *, 4389012e0edSdholland struct nfsfh **, int *, int *, void *); 4399012e0edSdholland int nfsrpc_mkdir(vnode_t, char *, int, struct vattr *, 4409012e0edSdholland struct ucred *, NFSPROC_T *, struct nfsvattr *, struct nfsvattr *, 4419012e0edSdholland struct nfsfh **, int *, int *, void *); 4429012e0edSdholland int nfsrpc_rmdir(vnode_t, char *, int, struct ucred *, NFSPROC_T *, 4439012e0edSdholland struct nfsvattr *, int *, void *); 4449012e0edSdholland int nfsrpc_readdir(vnode_t, struct uio *, nfsuint64 *, struct ucred *, 4459012e0edSdholland NFSPROC_T *, struct nfsvattr *, int *, int *, void *); 4469012e0edSdholland int nfsrpc_readdirplus(vnode_t, struct uio *, nfsuint64 *, 4479012e0edSdholland struct ucred *, NFSPROC_T *, struct nfsvattr *, int *, int *, void *); 4489012e0edSdholland int nfsrpc_commit(vnode_t, u_quad_t, int, struct ucred *, 4499012e0edSdholland NFSPROC_T *, struct nfsvattr *, int *, void *); 4509012e0edSdholland int nfsrpc_advlock(vnode_t, off_t, int, struct flock *, int, 4519012e0edSdholland struct ucred *, NFSPROC_T *, void *, int); 4529012e0edSdholland int nfsrpc_lockt(struct nfsrv_descript *, vnode_t, 4539012e0edSdholland struct nfsclclient *, u_int64_t, u_int64_t, struct flock *, 4549012e0edSdholland struct ucred *, NFSPROC_T *, void *, int); 4559012e0edSdholland int nfsrpc_lock(struct nfsrv_descript *, struct nfsmount *, vnode_t, 4569012e0edSdholland u_int8_t *, int, struct nfscllockowner *, int, int, u_int64_t, 4579012e0edSdholland u_int64_t, short, struct ucred *, NFSPROC_T *, int); 4589012e0edSdholland int nfsrpc_statfs(vnode_t, struct nfsstatfs *, struct nfsfsinfo *, 4599012e0edSdholland struct ucred *, NFSPROC_T *, struct nfsvattr *, int *, void *); 4609012e0edSdholland int nfsrpc_fsinfo(vnode_t, struct nfsfsinfo *, struct ucred *, 4619012e0edSdholland NFSPROC_T *, struct nfsvattr *, int *, void *); 4629012e0edSdholland int nfsrpc_pathconf(vnode_t, struct nfsv3_pathconf *, 4639012e0edSdholland struct ucred *, NFSPROC_T *, struct nfsvattr *, int *, void *); 4649012e0edSdholland int nfsrpc_renew(struct nfsclclient *, struct nfsclds *, struct ucred *, 4659012e0edSdholland NFSPROC_T *); 4669012e0edSdholland int nfsrpc_rellockown(struct nfsmount *, struct nfscllockowner *, uint8_t *, 4679012e0edSdholland int, struct ucred *, NFSPROC_T *); 4689012e0edSdholland int nfsrpc_getdirpath(struct nfsmount *, u_char *, struct ucred *, 4699012e0edSdholland NFSPROC_T *); 4709012e0edSdholland int nfsrpc_delegreturn(struct nfscldeleg *, struct ucred *, 4719012e0edSdholland struct nfsmount *, NFSPROC_T *, int); 4729012e0edSdholland int nfsrpc_getacl(vnode_t, struct ucred *, NFSPROC_T *, NFSACL_T *, void *); 4739012e0edSdholland int nfsrpc_setacl(vnode_t, struct ucred *, NFSPROC_T *, NFSACL_T *, void *); 4749012e0edSdholland int nfsrpc_exchangeid(struct nfsmount *, struct nfsclclient *, 4759012e0edSdholland struct nfssockreq *, uint32_t, struct nfsclds **, struct ucred *, 4769012e0edSdholland NFSPROC_T *); 4779012e0edSdholland int nfsrpc_createsession(struct nfsmount *, struct nfsclsession *, 4789012e0edSdholland struct nfssockreq *, uint32_t, int, struct ucred *, NFSPROC_T *); 4799012e0edSdholland int nfsrpc_destroysession(struct nfsmount *, struct nfsclclient *, 4809012e0edSdholland struct ucred *, NFSPROC_T *); 4819012e0edSdholland int nfsrpc_destroyclient(struct nfsmount *, struct nfsclclient *, 4829012e0edSdholland struct ucred *, NFSPROC_T *); 4839012e0edSdholland int nfsrpc_layoutget(struct nfsmount *, uint8_t *, int, int, uint64_t, uint64_t, 4849012e0edSdholland uint64_t, int, nfsv4stateid_t *, int *, struct nfsclflayouthead *, 4859012e0edSdholland struct ucred *, NFSPROC_T *, void *); 4869012e0edSdholland int nfsrpc_getdeviceinfo(struct nfsmount *, uint8_t *, int, uint32_t *, 4879012e0edSdholland struct nfscldevinfo **, struct ucred *, NFSPROC_T *); 4889012e0edSdholland int nfsrpc_layoutcommit(struct nfsmount *, uint8_t *, int, int, 4899012e0edSdholland uint64_t, uint64_t, uint64_t, nfsv4stateid_t *, int, int, uint8_t *, 4909012e0edSdholland struct ucred *, NFSPROC_T *, void *); 4919012e0edSdholland int nfsrpc_layoutreturn(struct nfsmount *, uint8_t *, int, int, int, uint32_t, 4929012e0edSdholland int, uint64_t, uint64_t, nfsv4stateid_t *, int, uint32_t *, struct ucred *, 4939012e0edSdholland NFSPROC_T *, void *); 4949012e0edSdholland int nfsrpc_reclaimcomplete(struct nfsmount *, struct ucred *, NFSPROC_T *); 4959012e0edSdholland int nfscl_doiods(vnode_t, struct uio *, int *, int *, uint32_t, 4969012e0edSdholland struct ucred *, NFSPROC_T *); 4979012e0edSdholland int nfscl_findlayoutforio(struct nfscllayout *, uint64_t, uint32_t, 4989012e0edSdholland struct nfsclflayout **); 4999012e0edSdholland void nfscl_freenfsclds(struct nfsclds *); 5009012e0edSdholland 5019012e0edSdholland /* nfs_clstate.c */ 5029012e0edSdholland int nfscl_open(vnode_t, u_int8_t *, int, u_int32_t, int, 5039012e0edSdholland struct ucred *, NFSPROC_T *, struct nfsclowner **, struct nfsclopen **, 5049012e0edSdholland int *, int *, int); 5059012e0edSdholland int nfscl_getstateid(vnode_t, u_int8_t *, int, u_int32_t, int, struct ucred *, 5069012e0edSdholland NFSPROC_T *, nfsv4stateid_t *, void **); 5079012e0edSdholland void nfscl_ownerrelease(struct nfsclowner *, int, int, int); 5089012e0edSdholland void nfscl_openrelease(struct nfsclopen *, int, int); 5099012e0edSdholland int nfscl_getcl(struct mount *, struct ucred *, NFSPROC_T *, int, 5109012e0edSdholland struct nfsclclient **); 5119012e0edSdholland struct nfsclclient *nfscl_findcl(struct nfsmount *); 5129012e0edSdholland void nfscl_clientrelease(struct nfsclclient *); 5139012e0edSdholland void nfscl_freelock(struct nfscllock *, int); 5149012e0edSdholland void nfscl_freelockowner(struct nfscllockowner *, int); 5159012e0edSdholland int nfscl_getbytelock(vnode_t, u_int64_t, u_int64_t, short, 5169012e0edSdholland struct ucred *, NFSPROC_T *, struct nfsclclient *, int, void *, int, 5179012e0edSdholland u_int8_t *, u_int8_t *, struct nfscllockowner **, int *, int *); 5189012e0edSdholland int nfscl_relbytelock(vnode_t, u_int64_t, u_int64_t, 5199012e0edSdholland struct ucred *, NFSPROC_T *, int, struct nfsclclient *, 5209012e0edSdholland void *, int, struct nfscllockowner **, int *); 5219012e0edSdholland int nfscl_checkwritelocked(vnode_t, struct flock *, 5229012e0edSdholland struct ucred *, NFSPROC_T *, void *, int); 5239012e0edSdholland void nfscl_lockrelease(struct nfscllockowner *, int, int); 5249012e0edSdholland void nfscl_fillclid(u_int64_t, char *, u_int8_t *, u_int16_t); 5259012e0edSdholland void nfscl_filllockowner(void *, u_int8_t *, int); 5269012e0edSdholland void nfscl_freeopen(struct nfsclopen *, int); 5279012e0edSdholland void nfscl_umount(struct nfsmount *, NFSPROC_T *); 5289012e0edSdholland void nfscl_renewthread(struct nfsclclient *, NFSPROC_T *); 5299012e0edSdholland void nfscl_initiate_recovery(struct nfsclclient *); 5309012e0edSdholland int nfscl_hasexpired(struct nfsclclient *, u_int32_t, NFSPROC_T *); 5319012e0edSdholland void nfscl_dumpstate(struct nfsmount *, int, int, int, int); 5329012e0edSdholland void nfscl_dupopen(vnode_t, int); 5339012e0edSdholland int nfscl_getclose(vnode_t, struct nfsclclient **); 5349012e0edSdholland int nfscl_doclose(vnode_t, struct nfsclclient **, NFSPROC_T *); 5359012e0edSdholland void nfsrpc_doclose(struct nfsmount *, struct nfsclopen *, NFSPROC_T *); 5369012e0edSdholland int nfscl_deleg(mount_t, struct nfsclclient *, u_int8_t *, int, 5379012e0edSdholland struct ucred *, NFSPROC_T *, struct nfscldeleg **); 5389012e0edSdholland void nfscl_lockinit(struct nfsv4lock *); 5399012e0edSdholland void nfscl_lockexcl(struct nfsv4lock *, void *); 5409012e0edSdholland void nfscl_lockunlock(struct nfsv4lock *); 5419012e0edSdholland void nfscl_lockderef(struct nfsv4lock *); 5429012e0edSdholland void nfscl_docb(struct nfsrv_descript *, NFSPROC_T *); 5439012e0edSdholland void nfscl_releasealllocks(struct nfsclclient *, vnode_t, NFSPROC_T *, void *, 5449012e0edSdholland int); 5459012e0edSdholland int nfscl_lockt(vnode_t, struct nfsclclient *, u_int64_t, 5469012e0edSdholland u_int64_t, struct flock *, NFSPROC_T *, void *, int); 5479012e0edSdholland int nfscl_mustflush(vnode_t); 5489012e0edSdholland int nfscl_nodeleg(vnode_t, int); 5499012e0edSdholland int nfscl_removedeleg(vnode_t, NFSPROC_T *, nfsv4stateid_t *); 5509012e0edSdholland int nfscl_getref(struct nfsmount *); 5519012e0edSdholland void nfscl_relref(struct nfsmount *); 5529012e0edSdholland int nfscl_renamedeleg(vnode_t, nfsv4stateid_t *, int *, vnode_t, 5539012e0edSdholland nfsv4stateid_t *, int *, NFSPROC_T *); 5549012e0edSdholland void nfscl_reclaimnode(vnode_t); 5559012e0edSdholland void nfscl_newnode(vnode_t); 5569012e0edSdholland void nfscl_delegmodtime(vnode_t); 5579012e0edSdholland void nfscl_deleggetmodtime(vnode_t, struct timespec *); 5589012e0edSdholland int nfscl_tryclose(struct nfsclopen *, struct ucred *, 5599012e0edSdholland struct nfsmount *, NFSPROC_T *); 5609012e0edSdholland void nfscl_cleanup(NFSPROC_T *); 5619012e0edSdholland int nfscl_layout(struct nfsmount *, vnode_t, u_int8_t *, int, nfsv4stateid_t *, 5629012e0edSdholland int, struct nfsclflayouthead *, struct nfscllayout **, struct ucred *, 5639012e0edSdholland NFSPROC_T *); 5649012e0edSdholland struct nfscllayout *nfscl_getlayout(struct nfsclclient *, uint8_t *, int, 5659012e0edSdholland uint64_t, struct nfsclflayout **, int *); 5669012e0edSdholland void nfscl_rellayout(struct nfscllayout *, int); 5679012e0edSdholland struct nfscldevinfo *nfscl_getdevinfo(struct nfsclclient *, uint8_t *, 5689012e0edSdholland struct nfscldevinfo *); 5699012e0edSdholland void nfscl_reldevinfo(struct nfscldevinfo *); 5709012e0edSdholland int nfscl_adddevinfo(struct nfsmount *, struct nfscldevinfo *, 5719012e0edSdholland struct nfsclflayout *); 5729012e0edSdholland void nfscl_freelayout(struct nfscllayout *); 5739012e0edSdholland void nfscl_freeflayout(struct nfsclflayout *); 5749012e0edSdholland void nfscl_freedevinfo(struct nfscldevinfo *); 5759012e0edSdholland int nfscl_layoutcommit(vnode_t, NFSPROC_T *); 5769012e0edSdholland 5779012e0edSdholland /* nfs_clport.c */ 5789012e0edSdholland int nfscl_nget(mount_t, vnode_t, struct nfsfh *, 5799012e0edSdholland struct componentname *, NFSPROC_T *, struct nfsnode **, void *, int); 5809012e0edSdholland NFSPROC_T *nfscl_getparent(NFSPROC_T *); 5819012e0edSdholland void nfscl_start_renewthread(struct nfsclclient *); 5829012e0edSdholland void nfscl_loadsbinfo(struct nfsmount *, struct nfsstatfs *, void *); 5839012e0edSdholland void nfscl_loadfsinfo (struct nfsmount *, struct nfsfsinfo *); 5849012e0edSdholland void nfscl_delegreturn(struct nfscldeleg *, int, struct nfsmount *, 5859012e0edSdholland struct ucred *, NFSPROC_T *); 5869012e0edSdholland void nfsrvd_cbinit(int); 5879012e0edSdholland int nfscl_checksattr(struct vattr *, struct nfsvattr *); 5889012e0edSdholland int nfscl_ngetreopen(mount_t, u_int8_t *, int, NFSPROC_T *, 5899012e0edSdholland struct nfsnode **); 5909012e0edSdholland int nfscl_procdoesntexist(u_int8_t *); 5919012e0edSdholland int nfscl_maperr(NFSPROC_T *, int, uid_t, gid_t); 5929012e0edSdholland 5939012e0edSdholland /* nfs_clsubs.c */ 5949012e0edSdholland void nfscl_init(void); 5959012e0edSdholland 5969012e0edSdholland /* nfs_clbio.c */ 5979012e0edSdholland int ncl_flush(vnode_t, int, struct ucred *, NFSPROC_T *, int, int); 5989012e0edSdholland 5999012e0edSdholland /* nfs_clnode.c */ 6009012e0edSdholland void ncl_invalcaches(vnode_t); 6019012e0edSdholland 6029012e0edSdholland /* nfs_nfsdport.c */ 6039012e0edSdholland int nfsvno_getattr(vnode_t, struct nfsvattr *, struct ucred *, 6049012e0edSdholland NFSPROC_T *, int); 6059012e0edSdholland int nfsvno_setattr(vnode_t, struct nfsvattr *, struct ucred *, 6069012e0edSdholland NFSPROC_T *, struct nfsexstuff *); 6079012e0edSdholland int nfsvno_getfh(vnode_t, fhandle_t *, NFSPROC_T *); 6089012e0edSdholland int nfsvno_accchk(vnode_t, accmode_t, struct ucred *, 6099012e0edSdholland struct nfsexstuff *, NFSPROC_T *, int, int, u_int32_t *); 6109012e0edSdholland int nfsvno_namei(struct nfsrv_descript *, struct nameidata *, 6119012e0edSdholland vnode_t, int, struct nfsexstuff *, NFSPROC_T *, vnode_t *); 6129012e0edSdholland void nfsvno_setpathbuf(struct nameidata *, char **, u_long **); 6139012e0edSdholland void nfsvno_relpathbuf(struct nameidata *); 6149012e0edSdholland int nfsvno_readlink(vnode_t, struct ucred *, NFSPROC_T *, mbuf_t *, 6159012e0edSdholland mbuf_t *, int *); 6169012e0edSdholland int nfsvno_read(vnode_t, off_t, int, struct ucred *, NFSPROC_T *, 6179012e0edSdholland mbuf_t *, mbuf_t *); 6189012e0edSdholland int nfsvno_write(vnode_t, off_t, int, int, int, mbuf_t, 6199012e0edSdholland char *, struct ucred *, NFSPROC_T *); 6209012e0edSdholland int nfsvno_createsub(struct nfsrv_descript *, struct nameidata *, 6219012e0edSdholland vnode_t *, struct nfsvattr *, int *, int32_t *, NFSDEV_T, NFSPROC_T *, 6229012e0edSdholland struct nfsexstuff *); 6239012e0edSdholland int nfsvno_mknod(struct nameidata *, struct nfsvattr *, struct ucred *, 6249012e0edSdholland NFSPROC_T *); 6259012e0edSdholland int nfsvno_mkdir(struct nameidata *, 6269012e0edSdholland struct nfsvattr *, uid_t, struct ucred *, NFSPROC_T *, 6279012e0edSdholland struct nfsexstuff *); 6289012e0edSdholland int nfsvno_symlink(struct nameidata *, struct nfsvattr *, char *, int, int, 6299012e0edSdholland uid_t, struct ucred *, NFSPROC_T *, struct nfsexstuff *); 6309012e0edSdholland int nfsvno_getsymlink(struct nfsrv_descript *, struct nfsvattr *, 6319012e0edSdholland NFSPROC_T *, char **, int *); 6329012e0edSdholland int nfsvno_removesub(struct nameidata *, int, struct ucred *, NFSPROC_T *, 6339012e0edSdholland struct nfsexstuff *); 6349012e0edSdholland int nfsvno_rmdirsub(struct nameidata *, int, struct ucred *, NFSPROC_T *, 6359012e0edSdholland struct nfsexstuff *); 6369012e0edSdholland int nfsvno_rename(struct nameidata *, struct nameidata *, u_int32_t, 6379012e0edSdholland u_int32_t, struct ucred *, NFSPROC_T *); 6389012e0edSdholland int nfsvno_link(struct nameidata *, vnode_t, struct ucred *, 6399012e0edSdholland NFSPROC_T *, struct nfsexstuff *); 6409012e0edSdholland int nfsvno_fsync(vnode_t, u_int64_t, int, struct ucred *, NFSPROC_T *); 6419012e0edSdholland int nfsvno_statfs(vnode_t, struct statfs *); 6429012e0edSdholland void nfsvno_getfs(struct nfsfsinfo *, int); 6439012e0edSdholland void nfsvno_open(struct nfsrv_descript *, struct nameidata *, nfsquad_t, 6449012e0edSdholland nfsv4stateid_t *, struct nfsstate *, int *, struct nfsvattr *, int32_t *, 6459012e0edSdholland int, NFSACL_T *, nfsattrbit_t *, struct ucred *, NFSPROC_T *, 6469012e0edSdholland struct nfsexstuff *, vnode_t *); 647*64764edbSpgoyette int nfsvno_updfilerev(vnode_t, struct nfsvattr *, struct ucred *, 6489012e0edSdholland NFSPROC_T *); 6499012e0edSdholland int nfsvno_fillattr(struct nfsrv_descript *, struct mount *, vnode_t, 6509012e0edSdholland struct nfsvattr *, fhandle_t *, int, nfsattrbit_t *, 6519012e0edSdholland struct ucred *, NFSPROC_T *, int, int, int, int, uint64_t); 652*64764edbSpgoyette int nfsrv_sattr(struct nfsrv_descript *, vnode_t, struct nfsvattr *, nfsattrbit_t *, 6539012e0edSdholland NFSACL_T *, NFSPROC_T *); 654*64764edbSpgoyette int nfsv4_sattr(struct nfsrv_descript *, vnode_t, struct nfsvattr *, nfsattrbit_t *, 6559012e0edSdholland NFSACL_T *, NFSPROC_T *); 6569012e0edSdholland int nfsvno_checkexp(mount_t, NFSSOCKADDR_T, struct nfsexstuff *, 6579012e0edSdholland struct ucred **); 6589012e0edSdholland int nfsvno_fhtovp(mount_t, fhandle_t *, NFSSOCKADDR_T, int, 6599012e0edSdholland vnode_t *, struct nfsexstuff *, struct ucred **); 6609012e0edSdholland vnode_t nfsvno_getvp(fhandle_t *); 6619012e0edSdholland int nfsvno_advlock(vnode_t, int, u_int64_t, u_int64_t, NFSPROC_T *); 6629012e0edSdholland int nfsrv_v4rootexport(void *, struct ucred *, NFSPROC_T *); 6639012e0edSdholland int nfsvno_testexp(struct nfsrv_descript *, struct nfsexstuff *); 6649012e0edSdholland uint32_t nfsrv_hashfh(fhandle_t *); 665*64764edbSpgoyette uint32_t nfsrv_hashsessionid(uint8_t *); 6669012e0edSdholland void nfsrv_backupstable(void); 6679012e0edSdholland 6689012e0edSdholland /* nfs_commonkrpc.c */ 6699012e0edSdholland int newnfs_nmcancelreqs(struct nfsmount *); 6709012e0edSdholland void newnfs_set_sigmask(struct thread *, sigset_t *); 6719012e0edSdholland void newnfs_restore_sigmask(struct thread *, sigset_t *); 6729012e0edSdholland int newnfs_msleep(struct thread *, void *, struct mtx *, int, char *, int); 6739012e0edSdholland int newnfs_request(struct nfsrv_descript *, struct nfsmount *, 6749012e0edSdholland struct nfsclient *, struct nfssockreq *, vnode_t, NFSPROC_T *, 6759012e0edSdholland struct ucred *, u_int32_t, u_int32_t, u_char *, int, u_int64_t *, 6769012e0edSdholland struct nfsclsession *); 6779012e0edSdholland int newnfs_connect(struct nfsmount *, struct nfssockreq *, 6789012e0edSdholland struct ucred *, NFSPROC_T *, int); 6799012e0edSdholland void newnfs_disconnect(struct nfssockreq *); 6809012e0edSdholland int newnfs_sigintr(struct nfsmount *, NFSPROC_T *); 6819012e0edSdholland 6829012e0edSdholland /* nfs_nfsdkrpc.c */ 6839012e0edSdholland int nfsrvd_addsock(struct file *); 6849012e0edSdholland int nfsrvd_nfsd(NFSPROC_T *, struct nfsd_nfsd_args *); 6859012e0edSdholland void nfsrvd_init(int); 6869012e0edSdholland 6879012e0edSdholland /* nfs_clkrpc.c */ 6889012e0edSdholland int nfscbd_addsock(struct file *); 6899012e0edSdholland int nfscbd_nfsd(NFSPROC_T *, struct nfsd_nfscbd_args *); 6909012e0edSdholland 691