xref: /netbsd/sys/fs/nfs/common/nfs_var.h (revision a2a6649f)
1*a2a6649fSpgoyette /*	$NetBSD: nfs_var.h,v 1.2 2016/12/13 22:52:46 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  *
3364764edbSpgoyette  * FreeBSD: head/sys/fs/nfs/nfs_var.h 294084 2016-01-15 09:05:14Z melifaro
34*a2a6649fSpgoyette  * $NetBSD: nfs_var.h,v 1.2 2016/12/13 22:52:46 pgoyette Exp $
359012e0edSdholland  */
369012e0edSdholland 
379012e0edSdholland /*
389012e0edSdholland  * XXX needs <nfs/rpcv2.h> and <nfs/nfs.h> because of typedefs
399012e0edSdholland  */
409012e0edSdholland 
419012e0edSdholland struct uio;
42*a2a6649fSpgoyette struct kauth_cred;
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;
6664764edbSpgoyette 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 *);
9664764edbSpgoyette int nfsrv_getclient(nfsquad_t, int, struct nfsclient **, struct nfsdsession *,
9764764edbSpgoyette     nfsquad_t, uint32_t, struct nfsrv_descript *, NFSPROC_T *);
9864764edbSpgoyette int nfsrv_destroyclient(nfsquad_t, NFSPROC_T *);
9964764edbSpgoyette int nfsrv_destroysession(struct nfsrv_descript *, uint8_t *);
10064764edbSpgoyette 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 *);
11464764edbSpgoyette int nfsrv_delegupdate(struct nfsrv_descript *, nfsquad_t, nfsv4stateid_t *,
115*a2a6649fSpgoyette     vnode_t, int, struct kauth_cred *, 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,
132*a2a6649fSpgoyette     struct nfsvattr *, nfsattrbit_t *, struct kauth_cred *, NFSPROC_T *);
1339012e0edSdholland int nfsrv_nfsuserdport(u_short, NFSPROC_T *);
1349012e0edSdholland void nfsrv_nfsuserddelport(void);
1359012e0edSdholland void nfsrv_throwawayallstate(NFSPROC_T *);
13664764edbSpgoyette int nfsrv_checksequence(struct nfsrv_descript *, uint32_t, uint32_t *,
13764764edbSpgoyette     uint32_t *, int, uint32_t *, NFSPROC_T *);
13864764edbSpgoyette int nfsrv_checkreclaimcomplete(struct nfsrv_descript *);
13964764edbSpgoyette void nfsrv_cache_session(uint8_t *, uint32_t, int, struct mbuf **);
14064764edbSpgoyette 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 *);
22564764edbSpgoyette int nfsrvd_exchangeid(struct nfsrv_descript *, int,
22664764edbSpgoyette     vnode_t, NFSPROC_T *, struct nfsexstuff *);
22764764edbSpgoyette int nfsrvd_createsession(struct nfsrv_descript *, int,
22864764edbSpgoyette     vnode_t, NFSPROC_T *, struct nfsexstuff *);
22964764edbSpgoyette int nfsrvd_sequence(struct nfsrv_descript *, int,
23064764edbSpgoyette     vnode_t, NFSPROC_T *, struct nfsexstuff *);
23164764edbSpgoyette int nfsrvd_reclaimcomplete(struct nfsrv_descript *, int,
23264764edbSpgoyette     vnode_t, NFSPROC_T *, struct nfsexstuff *);
23364764edbSpgoyette int nfsrvd_destroyclientid(struct nfsrv_descript *, int,
23464764edbSpgoyette     vnode_t, NFSPROC_T *, struct nfsexstuff *);
23564764edbSpgoyette int nfsrvd_destroysession(struct nfsrv_descript *, int,
23664764edbSpgoyette     vnode_t, NFSPROC_T *, struct nfsexstuff *);
23764764edbSpgoyette int nfsrvd_freestateid(struct nfsrv_descript *, int,
23864764edbSpgoyette     vnode_t, NFSPROC_T *, struct nfsexstuff *);
23964764edbSpgoyette int nfsrvd_notsupp(struct nfsrv_descript *, int,
24064764edbSpgoyette     vnode_t, NFSPROC_T *, struct nfsexstuff *);
2419012e0edSdholland 
2429012e0edSdholland /* nfs_nfsdsocket.c */
2439012e0edSdholland void nfsrvd_rephead(struct nfsrv_descript *);
24464764edbSpgoyette void nfsrvd_dorpc(struct nfsrv_descript *, int, u_char *, int, u_int32_t,
24564764edbSpgoyette     NFSPROC_T *);
2469012e0edSdholland 
2479012e0edSdholland /* nfs_nfsdcache.c */
2489012e0edSdholland void nfsrvd_initcache(void);
24964764edbSpgoyette int nfsrvd_getcache(struct nfsrv_descript *);
25064764edbSpgoyette struct nfsrvcache *nfsrvd_updatecache(struct nfsrv_descript *);
25164764edbSpgoyette 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 *);
25664764edbSpgoyette 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 *);
268*a2a6649fSpgoyette void newnfs_trimtrailing(struct nfsrv_descript *, mbuf_t, char *);
269*a2a6649fSpgoyette void newnfs_copycred(struct nfscred *, struct kauth_cred *);
270*a2a6649fSpgoyette void newnfs_copyincred(struct kauth_cred *, struct nfscred *);
2719012e0edSdholland int nfsrv_dissectacl(struct nfsrv_descript *, NFSACL_T *, int *,
2729012e0edSdholland     int *, NFSPROC_T *);
2739012e0edSdholland int nfsrv_getattrbits(struct nfsrv_descript *, nfsattrbit_t *, int *,
2749012e0edSdholland     int *);
2759012e0edSdholland int nfsv4_loadattr(struct nfsrv_descript *, vnode_t,
2769012e0edSdholland     struct nfsvattr *, struct nfsfh **, fhandle_t *, int,
2779012e0edSdholland     struct nfsv3_pathconf *, struct statfs *, struct nfsstatfs *,
2789012e0edSdholland     struct nfsfsinfo *, NFSACL_T *,
279*a2a6649fSpgoyette     int, int *, u_int32_t *, u_int32_t *, NFSPROC_T *, struct kauth_cred *);
2809012e0edSdholland int nfsv4_lock(struct nfsv4lock *, int, int *, void *, struct mount *);
2819012e0edSdholland void nfsv4_unlock(struct nfsv4lock *, int);
2829012e0edSdholland void nfsv4_relref(struct nfsv4lock *);
2839012e0edSdholland void nfsv4_getref(struct nfsv4lock *, int *, void *, struct mount *);
2849012e0edSdholland int nfsv4_getref_nonblock(struct nfsv4lock *);
2859012e0edSdholland int nfsv4_testlock(struct nfsv4lock *);
2869012e0edSdholland int nfsrv_mtostr(struct nfsrv_descript *, char *, int);
28764764edbSpgoyette void nfsrv_cleanusergroup(void);
2889012e0edSdholland int nfsrv_checkutf8(u_int8_t *, int);
2899012e0edSdholland int newnfs_sndlock(int *);
2909012e0edSdholland void newnfs_sndunlock(int *);
2919012e0edSdholland int nfsv4_getipaddr(struct nfsrv_descript *, struct sockaddr_storage *,
2929012e0edSdholland     int *);
2939012e0edSdholland int nfsv4_seqsession(uint32_t, uint32_t, uint32_t, struct nfsslot *,
2949012e0edSdholland     struct mbuf **, uint16_t);
29564764edbSpgoyette void nfsv4_seqsess_cacherep(uint32_t, struct nfsslot *, int, struct mbuf **);
29664764edbSpgoyette void nfsv4_setsequence(struct nfsmount *, struct nfsrv_descript *,
29764764edbSpgoyette     struct nfsclsession *, int);
29864764edbSpgoyette int nfsv4_sequencelookup(struct nfsmount *, struct nfsclsession *, int *,
29964764edbSpgoyette     int *, uint32_t *, uint8_t *);
3009012e0edSdholland void nfsv4_freeslot(struct nfsclsession *, int);
301*a2a6649fSpgoyette struct kauth_cred *nfsrv_getgrpscred(struct kauth_cred *);
3029012e0edSdholland 
3039012e0edSdholland /* nfs_clcomsubs.c */
3049012e0edSdholland void nfsm_uiombuf(struct nfsrv_descript *, struct uio *, int);
3059012e0edSdholland void nfscl_reqstart(struct nfsrv_descript *, int, struct nfsmount *,
3069012e0edSdholland     u_int8_t *, int, u_int32_t **, struct nfsclsession *);
3079012e0edSdholland nfsuint64 *nfscl_getcookie(struct nfsnode *, off_t off, int);
3089012e0edSdholland void nfscl_fillsattr(struct nfsrv_descript *, struct vattr *,
3099012e0edSdholland       vnode_t, int, u_int32_t);
31064764edbSpgoyette u_int8_t *nfscl_getmyip(struct nfsmount *, struct in6_addr *, int *);
3119012e0edSdholland int nfsm_getfh(struct nfsrv_descript *, struct nfsfh **);
3129012e0edSdholland int nfscl_mtofh(struct nfsrv_descript *, struct nfsfh **,
3139012e0edSdholland         struct nfsvattr *, int *);
3149012e0edSdholland int nfscl_postop_attr(struct nfsrv_descript *, struct nfsvattr *, int *,
3159012e0edSdholland     void *);
3169012e0edSdholland int nfscl_wcc_data(struct nfsrv_descript *, vnode_t,
3179012e0edSdholland     struct nfsvattr *, int *, int *, void *);
3189012e0edSdholland int nfsm_loadattr(struct nfsrv_descript *, struct nfsvattr *);
3199012e0edSdholland int nfscl_request(struct nfsrv_descript *, vnode_t,
320*a2a6649fSpgoyette          NFSPROC_T *, struct kauth_cred *, void *);
3219012e0edSdholland void nfsm_stateidtom(struct nfsrv_descript *, nfsv4stateid_t *, int);
3229012e0edSdholland 
3239012e0edSdholland /* nfs_nfsdsubs.c */
3249012e0edSdholland void nfsd_fhtovp(struct nfsrv_descript *, struct nfsrvfh *, int,
3259012e0edSdholland     vnode_t *, struct nfsexstuff *,
3269012e0edSdholland     mount_t *, int, NFSPROC_T *);
327*a2a6649fSpgoyette int nfsd_excred(struct nfsrv_descript *, struct nfsexstuff *, struct kauth_cred *);
3289012e0edSdholland int nfsrv_mtofh(struct nfsrv_descript *, struct nfsrvfh *);
3299012e0edSdholland int nfsrv_putattrbit(struct nfsrv_descript *, nfsattrbit_t *);
3309012e0edSdholland void nfsrv_wcc(struct nfsrv_descript *, int, struct nfsvattr *, int,
3319012e0edSdholland     struct nfsvattr *);
3329012e0edSdholland int nfsv4_fillattr(struct nfsrv_descript *, struct mount *, vnode_t, NFSACL_T *,
3339012e0edSdholland     struct vattr *, fhandle_t *, int, nfsattrbit_t *,
334*a2a6649fSpgoyette     struct kauth_cred *, NFSPROC_T *, int, int, int, int, uint64_t);
3359012e0edSdholland void nfsrv_fillattr(struct nfsrv_descript *, struct nfsvattr *);
3369012e0edSdholland void nfsrv_adj(mbuf_t, int, int);
3379012e0edSdholland void nfsrv_postopattr(struct nfsrv_descript *, int, struct nfsvattr *);
3389012e0edSdholland int nfsd_errmap(struct nfsrv_descript *);
3399012e0edSdholland void nfsv4_uidtostr(uid_t, u_char **, int *, NFSPROC_T *);
3409012e0edSdholland int nfsv4_strtouid(struct nfsrv_descript *, u_char *, int, uid_t *,
3419012e0edSdholland     NFSPROC_T *);
3429012e0edSdholland void nfsv4_gidtostr(gid_t, u_char **, int *, NFSPROC_T *);
3439012e0edSdholland int nfsv4_strtogid(struct nfsrv_descript *, u_char *, int, gid_t *,
3449012e0edSdholland     NFSPROC_T *);
3459012e0edSdholland int nfsrv_checkuidgid(struct nfsrv_descript *, struct nfsvattr *);
3469012e0edSdholland void nfsrv_fixattr(struct nfsrv_descript *, vnode_t,
3479012e0edSdholland     struct nfsvattr *, NFSACL_T *, NFSPROC_T *, nfsattrbit_t *,
3489012e0edSdholland     struct nfsexstuff *);
3499012e0edSdholland int nfsrv_errmoved(int);
3509012e0edSdholland int nfsrv_putreferralattr(struct nfsrv_descript *, nfsattrbit_t *,
3519012e0edSdholland     struct nfsreferral *, int, int *);
3529012e0edSdholland int nfsrv_parsename(struct nfsrv_descript *, char *, u_long *,
3539012e0edSdholland     NFSPATHLEN_T *);
3549012e0edSdholland void nfsd_init(void);
3559012e0edSdholland int nfsd_checkrootexp(struct nfsrv_descript *);
35664764edbSpgoyette void nfsd_getminorvers(struct nfsrv_descript *, u_char *, u_char **, int *,
35764764edbSpgoyette     u_int32_t *);
3589012e0edSdholland 
3599012e0edSdholland /* nfs_clvfsops.c */
3609012e0edSdholland void nfscl_retopts(struct nfsmount *, char *, size_t);
3619012e0edSdholland 
3629012e0edSdholland /* nfs_commonport.c */
3639012e0edSdholland int nfsrv_lookupfilename(struct nameidata *, char *, NFSPROC_T *);
3649012e0edSdholland void nfsrv_object_create(vnode_t, NFSPROC_T *);
3659012e0edSdholland int nfsrv_mallocmget_limit(void);
3669012e0edSdholland int nfsvno_v4rootexport(struct nfsrv_descript *);
3679012e0edSdholland void newnfs_portinit(void);
368*a2a6649fSpgoyette struct kauth_cred *newnfs_getcred(void);
369*a2a6649fSpgoyette void newnfs_setroot(struct kauth_cred *);
3709012e0edSdholland int nfs_catnap(int, int, const char *);
3719012e0edSdholland struct nfsreferral *nfsv4root_getreferral(vnode_t, vnode_t, u_int32_t);
372*a2a6649fSpgoyette int nfsvno_pathconf(vnode_t, int, register_t *, struct kauth_cred *,
3739012e0edSdholland     NFSPROC_T *);
3749012e0edSdholland int nfsrv_atroot(vnode_t, long *);
3759012e0edSdholland void newnfs_timer(void *);
3769012e0edSdholland int nfs_supportsnfsv4acls(vnode_t);
3779012e0edSdholland 
3789012e0edSdholland /* nfs_commonacl.c */
3799012e0edSdholland int nfsrv_dissectace(struct nfsrv_descript *, struct acl_entry *,
3809012e0edSdholland     int *, int *, NFSPROC_T *);
3819012e0edSdholland int nfsrv_buildacl(struct nfsrv_descript *, NFSACL_T *, enum vtype,
3829012e0edSdholland     NFSPROC_T *);
383*a2a6649fSpgoyette int nfsrv_setacl(vnode_t, NFSACL_T *, struct kauth_cred *,
3849012e0edSdholland     NFSPROC_T *);
3859012e0edSdholland int nfsrv_compareacl(NFSACL_T *, NFSACL_T *);
3869012e0edSdholland 
3879012e0edSdholland /* nfs_clrpcops.c */
388*a2a6649fSpgoyette int nfsrpc_null(vnode_t, struct kauth_cred *, NFSPROC_T *);
389*a2a6649fSpgoyette int nfsrpc_access(vnode_t, int, struct kauth_cred *, NFSPROC_T *,
3909012e0edSdholland     struct nfsvattr *, int *);
391*a2a6649fSpgoyette int nfsrpc_accessrpc(vnode_t, u_int32_t, struct kauth_cred *,
3929012e0edSdholland     NFSPROC_T *, struct nfsvattr *, int *, u_int32_t *, void *);
393*a2a6649fSpgoyette int nfsrpc_open(vnode_t, int, struct kauth_cred *, NFSPROC_T *);
3949012e0edSdholland int nfsrpc_openrpc(struct nfsmount *, vnode_t, u_int8_t *, int, u_int8_t *, int,
3959012e0edSdholland     u_int32_t, struct nfsclopen *, u_int8_t *, int, struct nfscldeleg **, int,
396*a2a6649fSpgoyette     u_int32_t, struct kauth_cred *, NFSPROC_T *, int, int);
3979012e0edSdholland int nfsrpc_opendowngrade(vnode_t, u_int32_t, struct nfsclopen *,
398*a2a6649fSpgoyette     struct kauth_cred *, NFSPROC_T *);
3999012e0edSdholland int nfsrpc_close(vnode_t, int, NFSPROC_T *);
4009012e0edSdholland int nfsrpc_closerpc(struct nfsrv_descript *, struct nfsmount *,
401*a2a6649fSpgoyette     struct nfsclopen *, struct kauth_cred *, NFSPROC_T *, int);
4029012e0edSdholland int nfsrpc_openconfirm(vnode_t, u_int8_t *, int, struct nfsclopen *,
403*a2a6649fSpgoyette     struct kauth_cred *, NFSPROC_T *);
4049012e0edSdholland int nfsrpc_setclient(struct nfsmount *, struct nfsclclient *, int,
405*a2a6649fSpgoyette     struct kauth_cred *, NFSPROC_T *);
406*a2a6649fSpgoyette int nfsrpc_getattr(vnode_t, struct kauth_cred *, NFSPROC_T *,
4079012e0edSdholland     struct nfsvattr *, void *);
4089012e0edSdholland int nfsrpc_getattrnovp(struct nfsmount *, u_int8_t *, int, int,
409*a2a6649fSpgoyette     struct kauth_cred *, NFSPROC_T *, struct nfsvattr *, u_int64_t *, uint32_t *);
410*a2a6649fSpgoyette int nfsrpc_setattr(vnode_t, struct vattr *, NFSACL_T *, struct kauth_cred *,
4119012e0edSdholland     NFSPROC_T *, struct nfsvattr *, int *, void *);
412*a2a6649fSpgoyette int nfsrpc_lookup(vnode_t, char *, int, struct kauth_cred *, NFSPROC_T *,
4139012e0edSdholland     struct nfsvattr *, struct nfsvattr *, struct nfsfh **, int *, int *,
4149012e0edSdholland     void *);
415*a2a6649fSpgoyette int nfsrpc_readlink(vnode_t, struct uio *, struct kauth_cred *,
4169012e0edSdholland     NFSPROC_T *, struct nfsvattr *, int *, void *);
417*a2a6649fSpgoyette int nfsrpc_read(vnode_t, struct uio *, struct kauth_cred *, NFSPROC_T *,
4189012e0edSdholland     struct nfsvattr *, int *, void *);
4199012e0edSdholland int nfsrpc_write(vnode_t, struct uio *, int *, int *,
420*a2a6649fSpgoyette     struct kauth_cred *, NFSPROC_T *, struct nfsvattr *, int *, void *, int);
4219012e0edSdholland int nfsrpc_mknod(vnode_t, char *, int, struct vattr *, u_int32_t,
422*a2a6649fSpgoyette     enum vtype, struct kauth_cred *, NFSPROC_T *, struct nfsvattr *,
4239012e0edSdholland     struct nfsvattr *, struct nfsfh **, int *, int *, void *);
4249012e0edSdholland int nfsrpc_create(vnode_t, char *, int, struct vattr *, nfsquad_t,
425*a2a6649fSpgoyette     int, struct kauth_cred *, NFSPROC_T *, struct nfsvattr *, struct nfsvattr *,
4269012e0edSdholland     struct nfsfh **, int *, int *, void *);
427*a2a6649fSpgoyette int nfsrpc_remove(vnode_t, char *, int, vnode_t, struct kauth_cred *, NFSPROC_T *,
4289012e0edSdholland     struct nfsvattr *, int *, void *);
4299012e0edSdholland int nfsrpc_rename(vnode_t, vnode_t, char *, int, vnode_t, vnode_t, char *, int,
430*a2a6649fSpgoyette     struct kauth_cred *, NFSPROC_T *, struct nfsvattr *, struct nfsvattr *,
4319012e0edSdholland     int *, int *, void *, void *);
4329012e0edSdholland int nfsrpc_link(vnode_t, vnode_t, char *, int,
433*a2a6649fSpgoyette     struct kauth_cred *, NFSPROC_T *, struct nfsvattr *, struct nfsvattr *,
4349012e0edSdholland     int *, int *, void *);
4359012e0edSdholland int nfsrpc_symlink(vnode_t, char *, int, char *, struct vattr *,
436*a2a6649fSpgoyette     struct kauth_cred *, NFSPROC_T *, struct nfsvattr *, struct nfsvattr *,
4379012e0edSdholland     struct nfsfh **, int *, int *, void *);
4389012e0edSdholland int nfsrpc_mkdir(vnode_t, char *, int, struct vattr *,
439*a2a6649fSpgoyette     struct kauth_cred *, NFSPROC_T *, struct nfsvattr *, struct nfsvattr *,
4409012e0edSdholland     struct nfsfh **, int *, int *, void *);
441*a2a6649fSpgoyette int nfsrpc_rmdir(vnode_t, char *, int, struct kauth_cred *, NFSPROC_T *,
4429012e0edSdholland     struct nfsvattr *, int *, void *);
443*a2a6649fSpgoyette int nfsrpc_readdir(vnode_t, struct uio *, nfsuint64 *, struct kauth_cred *,
4449012e0edSdholland     NFSPROC_T *, struct nfsvattr *, int *, int *, void *);
4459012e0edSdholland int nfsrpc_readdirplus(vnode_t, struct uio *, nfsuint64 *,
446*a2a6649fSpgoyette     struct kauth_cred *, NFSPROC_T *, struct nfsvattr *, int *, int *, void *);
447*a2a6649fSpgoyette int nfsrpc_commit(vnode_t, u_quad_t, int, struct kauth_cred *,
4489012e0edSdholland     NFSPROC_T *, struct nfsvattr *, int *, void *);
4499012e0edSdholland int nfsrpc_advlock(vnode_t, off_t, int, struct flock *, int,
450*a2a6649fSpgoyette     struct kauth_cred *, NFSPROC_T *, void *, int);
4519012e0edSdholland int nfsrpc_lockt(struct nfsrv_descript *, vnode_t,
4529012e0edSdholland     struct nfsclclient *, u_int64_t, u_int64_t, struct flock *,
453*a2a6649fSpgoyette     struct kauth_cred *, NFSPROC_T *, void *, int);
4549012e0edSdholland int nfsrpc_lock(struct nfsrv_descript *, struct nfsmount *, vnode_t,
4559012e0edSdholland     u_int8_t *, int, struct nfscllockowner *, int, int, u_int64_t,
456*a2a6649fSpgoyette     u_int64_t, short, struct kauth_cred *, NFSPROC_T *, int);
4579012e0edSdholland int nfsrpc_statfs(vnode_t, struct nfsstatfs *, struct nfsfsinfo *,
458*a2a6649fSpgoyette     struct kauth_cred *, NFSPROC_T *, struct nfsvattr *, int *, void *);
459*a2a6649fSpgoyette int nfsrpc_fsinfo(vnode_t, struct nfsfsinfo *, struct kauth_cred *,
4609012e0edSdholland     NFSPROC_T *, struct nfsvattr *, int *, void *);
4619012e0edSdholland int nfsrpc_pathconf(vnode_t, struct nfsv3_pathconf *,
462*a2a6649fSpgoyette     struct kauth_cred *, NFSPROC_T *, struct nfsvattr *, int *, void *);
463*a2a6649fSpgoyette int nfsrpc_renew(struct nfsclclient *, struct nfsclds *, struct kauth_cred *,
4649012e0edSdholland     NFSPROC_T *);
4659012e0edSdholland int nfsrpc_rellockown(struct nfsmount *, struct nfscllockowner *, uint8_t *,
466*a2a6649fSpgoyette     int, struct kauth_cred *, NFSPROC_T *);
467*a2a6649fSpgoyette int nfsrpc_getdirpath(struct nfsmount *, u_char *, struct kauth_cred *,
4689012e0edSdholland     NFSPROC_T *);
469*a2a6649fSpgoyette int nfsrpc_delegreturn(struct nfscldeleg *, struct kauth_cred *,
4709012e0edSdholland     struct nfsmount *, NFSPROC_T *, int);
471*a2a6649fSpgoyette int nfsrpc_getacl(vnode_t, struct kauth_cred *, NFSPROC_T *, NFSACL_T *, void *);
472*a2a6649fSpgoyette int nfsrpc_setacl(vnode_t, struct kauth_cred *, NFSPROC_T *, NFSACL_T *, void *);
4739012e0edSdholland int nfsrpc_exchangeid(struct nfsmount *, struct nfsclclient *,
474*a2a6649fSpgoyette     struct nfssockreq *, uint32_t, struct nfsclds **, struct kauth_cred *,
4759012e0edSdholland     NFSPROC_T *);
4769012e0edSdholland int nfsrpc_createsession(struct nfsmount *, struct nfsclsession *,
477*a2a6649fSpgoyette     struct nfssockreq *, uint32_t, int, struct kauth_cred *, NFSPROC_T *);
4789012e0edSdholland int nfsrpc_destroysession(struct nfsmount *, struct nfsclclient *,
479*a2a6649fSpgoyette     struct kauth_cred *, NFSPROC_T *);
4809012e0edSdholland int nfsrpc_destroyclient(struct nfsmount *, struct nfsclclient *,
481*a2a6649fSpgoyette     struct kauth_cred *, NFSPROC_T *);
4829012e0edSdholland int nfsrpc_layoutget(struct nfsmount *, uint8_t *, int, int, uint64_t, uint64_t,
4839012e0edSdholland     uint64_t, int, nfsv4stateid_t *, int *, struct nfsclflayouthead *,
484*a2a6649fSpgoyette     struct kauth_cred *, NFSPROC_T *, void *);
4859012e0edSdholland int nfsrpc_getdeviceinfo(struct nfsmount *, uint8_t *, int, uint32_t *,
486*a2a6649fSpgoyette     struct nfscldevinfo **, struct kauth_cred *, NFSPROC_T *);
4879012e0edSdholland int nfsrpc_layoutcommit(struct nfsmount *, uint8_t *, int, int,
4889012e0edSdholland     uint64_t, uint64_t, uint64_t, nfsv4stateid_t *, int, int, uint8_t *,
489*a2a6649fSpgoyette     struct kauth_cred *, NFSPROC_T *, void *);
4909012e0edSdholland int nfsrpc_layoutreturn(struct nfsmount *, uint8_t *, int, int, int, uint32_t,
491*a2a6649fSpgoyette     int, uint64_t, uint64_t, nfsv4stateid_t *, int, uint32_t *, struct kauth_cred *,
4929012e0edSdholland     NFSPROC_T *, void *);
493*a2a6649fSpgoyette int nfsrpc_reclaimcomplete(struct nfsmount *, struct kauth_cred *, NFSPROC_T *);
4949012e0edSdholland int nfscl_doiods(vnode_t, struct uio *, int *, int *, uint32_t,
495*a2a6649fSpgoyette     struct kauth_cred *, NFSPROC_T *);
4969012e0edSdholland int nfscl_findlayoutforio(struct nfscllayout *, uint64_t, uint32_t,
4979012e0edSdholland     struct nfsclflayout **);
4989012e0edSdholland void nfscl_freenfsclds(struct nfsclds *);
4999012e0edSdholland 
5009012e0edSdholland /* nfs_clstate.c */
5019012e0edSdholland int nfscl_open(vnode_t, u_int8_t *, int, u_int32_t, int,
502*a2a6649fSpgoyette     struct kauth_cred *, NFSPROC_T *, struct nfsclowner **, struct nfsclopen **,
5039012e0edSdholland     int *, int *, int);
504*a2a6649fSpgoyette int nfscl_getstateid(vnode_t, u_int8_t *, int, u_int32_t, int, struct kauth_cred *,
5059012e0edSdholland     NFSPROC_T *, nfsv4stateid_t *, void **);
5069012e0edSdholland void nfscl_ownerrelease(struct nfsclowner *, int, int, int);
5079012e0edSdholland void nfscl_openrelease(struct nfsclopen *, int, int);
508*a2a6649fSpgoyette int nfscl_getcl(struct mount *, struct kauth_cred *, NFSPROC_T *, int,
5099012e0edSdholland     struct nfsclclient **);
5109012e0edSdholland struct nfsclclient *nfscl_findcl(struct nfsmount *);
5119012e0edSdholland void nfscl_clientrelease(struct nfsclclient *);
5129012e0edSdholland void nfscl_freelock(struct nfscllock *, int);
5139012e0edSdholland void nfscl_freelockowner(struct nfscllockowner *, int);
5149012e0edSdholland int nfscl_getbytelock(vnode_t, u_int64_t, u_int64_t, short,
515*a2a6649fSpgoyette     struct kauth_cred *, NFSPROC_T *, struct nfsclclient *, int, void *, int,
5169012e0edSdholland     u_int8_t *, u_int8_t *, struct nfscllockowner **, int *, int *);
5179012e0edSdholland int nfscl_relbytelock(vnode_t, u_int64_t, u_int64_t,
518*a2a6649fSpgoyette     struct kauth_cred *, NFSPROC_T *, int, struct nfsclclient *,
5199012e0edSdholland     void *, int, struct nfscllockowner **, int *);
5209012e0edSdholland int nfscl_checkwritelocked(vnode_t, struct flock *,
521*a2a6649fSpgoyette     struct kauth_cred *, NFSPROC_T *, void *, int);
5229012e0edSdholland void nfscl_lockrelease(struct nfscllockowner *, int, int);
5239012e0edSdholland void nfscl_fillclid(u_int64_t, char *, u_int8_t *, u_int16_t);
5249012e0edSdholland void nfscl_filllockowner(void *, u_int8_t *, int);
5259012e0edSdholland void nfscl_freeopen(struct nfsclopen *, int);
5269012e0edSdholland void nfscl_umount(struct nfsmount *, NFSPROC_T *);
5279012e0edSdholland void nfscl_renewthread(struct nfsclclient *, NFSPROC_T *);
5289012e0edSdholland void nfscl_initiate_recovery(struct nfsclclient *);
5299012e0edSdholland int nfscl_hasexpired(struct nfsclclient *, u_int32_t, NFSPROC_T *);
5309012e0edSdholland void nfscl_dumpstate(struct nfsmount *, int, int, int, int);
5319012e0edSdholland void nfscl_dupopen(vnode_t, int);
5329012e0edSdholland int nfscl_getclose(vnode_t, struct nfsclclient **);
5339012e0edSdholland int nfscl_doclose(vnode_t, struct nfsclclient **, NFSPROC_T *);
5349012e0edSdholland void nfsrpc_doclose(struct nfsmount *, struct nfsclopen *, NFSPROC_T *);
5359012e0edSdholland int nfscl_deleg(mount_t, struct nfsclclient *, u_int8_t *, int,
536*a2a6649fSpgoyette     struct kauth_cred *, NFSPROC_T *, struct nfscldeleg **);
5379012e0edSdholland void nfscl_lockinit(struct nfsv4lock *);
5389012e0edSdholland void nfscl_lockexcl(struct nfsv4lock *, void *);
5399012e0edSdholland void nfscl_lockunlock(struct nfsv4lock *);
5409012e0edSdholland void nfscl_lockderef(struct nfsv4lock *);
5419012e0edSdholland void nfscl_docb(struct nfsrv_descript *, NFSPROC_T *);
5429012e0edSdholland void nfscl_releasealllocks(struct nfsclclient *, vnode_t, NFSPROC_T *, void *,
5439012e0edSdholland     int);
5449012e0edSdholland int nfscl_lockt(vnode_t, struct nfsclclient *, u_int64_t,
5459012e0edSdholland     u_int64_t, struct flock *, NFSPROC_T *, void *, int);
5469012e0edSdholland int nfscl_mustflush(vnode_t);
5479012e0edSdholland int nfscl_nodeleg(vnode_t, int);
5489012e0edSdholland int nfscl_removedeleg(vnode_t, NFSPROC_T *, nfsv4stateid_t *);
5499012e0edSdholland int nfscl_getref(struct nfsmount *);
5509012e0edSdholland void nfscl_relref(struct nfsmount *);
5519012e0edSdholland int nfscl_renamedeleg(vnode_t, nfsv4stateid_t *, int *, vnode_t,
5529012e0edSdholland     nfsv4stateid_t *, int *, NFSPROC_T *);
5539012e0edSdholland void nfscl_reclaimnode(vnode_t);
5549012e0edSdholland void nfscl_newnode(vnode_t);
5559012e0edSdholland void nfscl_delegmodtime(vnode_t);
5569012e0edSdholland void nfscl_deleggetmodtime(vnode_t, struct timespec *);
557*a2a6649fSpgoyette int nfscl_tryclose(struct nfsclopen *, struct kauth_cred *,
5589012e0edSdholland     struct nfsmount *, NFSPROC_T *);
5599012e0edSdholland void nfscl_cleanup(NFSPROC_T *);
5609012e0edSdholland int nfscl_layout(struct nfsmount *, vnode_t, u_int8_t *, int, nfsv4stateid_t *,
561*a2a6649fSpgoyette     int, struct nfsclflayouthead *, struct nfscllayout **, struct kauth_cred *,
5629012e0edSdholland     NFSPROC_T *);
5639012e0edSdholland struct nfscllayout *nfscl_getlayout(struct nfsclclient *, uint8_t *, int,
5649012e0edSdholland     uint64_t, struct nfsclflayout **, int *);
5659012e0edSdholland void nfscl_rellayout(struct nfscllayout *, int);
5669012e0edSdholland struct nfscldevinfo *nfscl_getdevinfo(struct nfsclclient *, uint8_t *,
5679012e0edSdholland     struct nfscldevinfo *);
5689012e0edSdholland void nfscl_reldevinfo(struct nfscldevinfo *);
5699012e0edSdholland int nfscl_adddevinfo(struct nfsmount *, struct nfscldevinfo *,
5709012e0edSdholland     struct nfsclflayout *);
5719012e0edSdholland void nfscl_freelayout(struct nfscllayout *);
5729012e0edSdholland void nfscl_freeflayout(struct nfsclflayout *);
5739012e0edSdholland void nfscl_freedevinfo(struct nfscldevinfo *);
5749012e0edSdholland int nfscl_layoutcommit(vnode_t, NFSPROC_T *);
5759012e0edSdholland 
5769012e0edSdholland /* nfs_clport.c */
5779012e0edSdholland int nfscl_nget(mount_t, vnode_t, struct nfsfh *,
5789012e0edSdholland     struct componentname *, NFSPROC_T *, struct nfsnode **, void *, int);
5799012e0edSdholland NFSPROC_T *nfscl_getparent(NFSPROC_T *);
5809012e0edSdholland void nfscl_start_renewthread(struct nfsclclient *);
5819012e0edSdholland void nfscl_loadsbinfo(struct nfsmount *, struct nfsstatfs *, void *);
5829012e0edSdholland void nfscl_loadfsinfo (struct nfsmount *, struct nfsfsinfo *);
5839012e0edSdholland void nfscl_delegreturn(struct nfscldeleg *, int, struct nfsmount *,
584*a2a6649fSpgoyette     struct kauth_cred *, NFSPROC_T *);
5859012e0edSdholland void nfsrvd_cbinit(int);
5869012e0edSdholland int nfscl_checksattr(struct vattr *, struct nfsvattr *);
5879012e0edSdholland int nfscl_ngetreopen(mount_t, u_int8_t *, int, NFSPROC_T *,
5889012e0edSdholland     struct nfsnode **);
5899012e0edSdholland int nfscl_procdoesntexist(u_int8_t *);
5909012e0edSdholland int nfscl_maperr(NFSPROC_T *, int, uid_t, gid_t);
5919012e0edSdholland 
5929012e0edSdholland /* nfs_clsubs.c */
5939012e0edSdholland void nfscl_init(void);
5949012e0edSdholland 
5959012e0edSdholland /* nfs_clbio.c */
596*a2a6649fSpgoyette int ncl_flush(vnode_t, int, struct kauth_cred *, NFSPROC_T *, int, int);
5979012e0edSdholland 
5989012e0edSdholland /* nfs_clnode.c */
5999012e0edSdholland void ncl_invalcaches(vnode_t);
6009012e0edSdholland 
6019012e0edSdholland /* nfs_nfsdport.c */
602*a2a6649fSpgoyette int nfsvno_getattr(vnode_t, struct nfsvattr *, struct kauth_cred *,
6039012e0edSdholland     NFSPROC_T *, int);
604*a2a6649fSpgoyette int nfsvno_setattr(vnode_t, struct nfsvattr *, struct kauth_cred *,
6059012e0edSdholland     NFSPROC_T *, struct nfsexstuff *);
6069012e0edSdholland int nfsvno_getfh(vnode_t, fhandle_t *, NFSPROC_T *);
607*a2a6649fSpgoyette int nfsvno_accchk(vnode_t, accmode_t, struct kauth_cred *,
6089012e0edSdholland     struct nfsexstuff *, NFSPROC_T *, int, int, u_int32_t *);
6099012e0edSdholland int nfsvno_namei(struct nfsrv_descript *, struct nameidata *,
6109012e0edSdholland     vnode_t, int, struct nfsexstuff *, NFSPROC_T *, vnode_t *);
6119012e0edSdholland void nfsvno_setpathbuf(struct nameidata *, char **, u_long **);
6129012e0edSdholland void nfsvno_relpathbuf(struct nameidata *);
613*a2a6649fSpgoyette int nfsvno_readlink(vnode_t, struct kauth_cred *, NFSPROC_T *, mbuf_t *,
6149012e0edSdholland     mbuf_t *, int *);
615*a2a6649fSpgoyette int nfsvno_read(vnode_t, off_t, int, struct kauth_cred *, NFSPROC_T *,
6169012e0edSdholland     mbuf_t *, mbuf_t *);
6179012e0edSdholland int nfsvno_write(vnode_t, off_t, int, int, int, mbuf_t,
618*a2a6649fSpgoyette     char *, struct kauth_cred *, NFSPROC_T *);
6199012e0edSdholland int nfsvno_createsub(struct nfsrv_descript *, struct nameidata *,
6209012e0edSdholland     vnode_t *, struct nfsvattr *, int *, int32_t *, NFSDEV_T, NFSPROC_T *,
6219012e0edSdholland     struct nfsexstuff *);
622*a2a6649fSpgoyette int nfsvno_mknod(struct nameidata *, struct nfsvattr *, struct kauth_cred *,
6239012e0edSdholland     NFSPROC_T *);
6249012e0edSdholland int nfsvno_mkdir(struct nameidata *,
625*a2a6649fSpgoyette     struct nfsvattr *, uid_t, struct kauth_cred *, NFSPROC_T *,
6269012e0edSdholland     struct nfsexstuff *);
6279012e0edSdholland int nfsvno_symlink(struct nameidata *, struct nfsvattr *, char *, int, int,
628*a2a6649fSpgoyette     uid_t, struct kauth_cred *, NFSPROC_T *, struct nfsexstuff *);
6299012e0edSdholland int nfsvno_getsymlink(struct nfsrv_descript *, struct nfsvattr *,
6309012e0edSdholland     NFSPROC_T *, char **, int *);
631*a2a6649fSpgoyette int nfsvno_removesub(struct nameidata *, int, struct kauth_cred *, NFSPROC_T *,
6329012e0edSdholland     struct nfsexstuff *);
633*a2a6649fSpgoyette int nfsvno_rmdirsub(struct nameidata *, int, struct kauth_cred *, NFSPROC_T *,
6349012e0edSdholland     struct nfsexstuff *);
6359012e0edSdholland int nfsvno_rename(struct nameidata *, struct nameidata *, u_int32_t,
636*a2a6649fSpgoyette     u_int32_t, struct kauth_cred *, NFSPROC_T *);
637*a2a6649fSpgoyette int nfsvno_link(struct nameidata *, vnode_t, struct kauth_cred *,
6389012e0edSdholland     NFSPROC_T *, struct nfsexstuff *);
639*a2a6649fSpgoyette int nfsvno_fsync(vnode_t, u_int64_t, int, struct kauth_cred *, NFSPROC_T *);
6409012e0edSdholland int nfsvno_statfs(vnode_t, struct statfs *);
6419012e0edSdholland void nfsvno_getfs(struct nfsfsinfo *, int);
6429012e0edSdholland void nfsvno_open(struct nfsrv_descript *, struct nameidata *, nfsquad_t,
6439012e0edSdholland     nfsv4stateid_t *, struct nfsstate *, int *, struct nfsvattr *, int32_t *,
644*a2a6649fSpgoyette     int, NFSACL_T *, nfsattrbit_t *, struct kauth_cred *, NFSPROC_T *,
6459012e0edSdholland     struct nfsexstuff *, vnode_t *);
646*a2a6649fSpgoyette int nfsvno_updfilerev(vnode_t, struct nfsvattr *, struct kauth_cred *,
6479012e0edSdholland     NFSPROC_T *);
6489012e0edSdholland int nfsvno_fillattr(struct nfsrv_descript *, struct mount *, vnode_t,
6499012e0edSdholland     struct nfsvattr *, fhandle_t *, int, nfsattrbit_t *,
650*a2a6649fSpgoyette     struct kauth_cred *, NFSPROC_T *, int, int, int, int, uint64_t);
65164764edbSpgoyette int nfsrv_sattr(struct nfsrv_descript *, vnode_t, struct nfsvattr *, nfsattrbit_t *,
6529012e0edSdholland     NFSACL_T *, NFSPROC_T *);
65364764edbSpgoyette int nfsv4_sattr(struct nfsrv_descript *, vnode_t, struct nfsvattr *, nfsattrbit_t *,
6549012e0edSdholland     NFSACL_T *, NFSPROC_T *);
6559012e0edSdholland int nfsvno_checkexp(mount_t, NFSSOCKADDR_T, struct nfsexstuff *,
656*a2a6649fSpgoyette     struct kauth_cred **);
6579012e0edSdholland int nfsvno_fhtovp(mount_t, fhandle_t *, NFSSOCKADDR_T, int,
658*a2a6649fSpgoyette     vnode_t *, struct nfsexstuff *, struct kauth_cred **);
6599012e0edSdholland vnode_t nfsvno_getvp(fhandle_t *);
6609012e0edSdholland int nfsvno_advlock(vnode_t, int, u_int64_t, u_int64_t, NFSPROC_T *);
661*a2a6649fSpgoyette int nfsrv_v4rootexport(void *, struct kauth_cred *, NFSPROC_T *);
6629012e0edSdholland int nfsvno_testexp(struct nfsrv_descript *, struct nfsexstuff *);
6639012e0edSdholland uint32_t nfsrv_hashfh(fhandle_t *);
66464764edbSpgoyette uint32_t nfsrv_hashsessionid(uint8_t *);
6659012e0edSdholland void nfsrv_backupstable(void);
6669012e0edSdholland 
6679012e0edSdholland /* nfs_commonkrpc.c */
6689012e0edSdholland int newnfs_nmcancelreqs(struct nfsmount *);
669*a2a6649fSpgoyette void newnfs_set_sigmask(struct lwp *, sigset_t *);
670*a2a6649fSpgoyette void newnfs_restore_sigmask(struct lwp *, sigset_t *);
671*a2a6649fSpgoyette int newnfs_msleep(struct lwp *, void *, struct kmutex *, int, char *, int);
6729012e0edSdholland int newnfs_request(struct nfsrv_descript *, struct nfsmount *,
6739012e0edSdholland     struct nfsclient *, struct nfssockreq *, vnode_t, NFSPROC_T *,
674*a2a6649fSpgoyette     struct kauth_cred *, u_int32_t, u_int32_t, u_char *, int, u_int64_t *,
6759012e0edSdholland     struct nfsclsession *);
6769012e0edSdholland int newnfs_connect(struct nfsmount *, struct nfssockreq *,
677*a2a6649fSpgoyette     struct kauth_cred *, NFSPROC_T *, int);
6789012e0edSdholland void newnfs_disconnect(struct nfssockreq *);
6799012e0edSdholland int newnfs_sigintr(struct nfsmount *, NFSPROC_T *);
6809012e0edSdholland 
6819012e0edSdholland /* nfs_nfsdkrpc.c */
6829012e0edSdholland int nfsrvd_addsock(struct file *);
6839012e0edSdholland int nfsrvd_nfsd(NFSPROC_T *, struct nfsd_nfsd_args *);
6849012e0edSdholland void nfsrvd_init(int);
6859012e0edSdholland 
6869012e0edSdholland /* nfs_clkrpc.c */
6879012e0edSdholland int nfscbd_addsock(struct file *);
6889012e0edSdholland int nfscbd_nfsd(NFSPROC_T *, struct nfsd_nfscbd_args *);
6899012e0edSdholland 
690