#ifndef _NFS_NFS_H_
#define _NFS_NFS_H_
#ifdef _KERNEL
#include "opt_nfs.h"
#endif
#include <sys/vnode.h>
#include <sys/mutex.h>
#include <sys/thread.h>
#define NFS_MAXIOVEC 34
#define NFS_TICKINTVL 200
#define NFS_HZ (hz / nfs_ticks)
#define NFS_TIMEO (1 * NFS_HZ)
#define NFS_MINTIMEO (1 * NFS_HZ)
#define NFS_MAXTIMEO (60 * NFS_HZ)
#define NFS_MINIDEMTIMEO (5 * NFS_HZ)
#define NFS_MAXREXMIT 100
#define NFS_MAXWINDOW 1024
#define NFS_RETRANS 10
#define NFS_MAXGRPS 16
#ifndef NFS_MINATTRTIMO
#define NFS_MINATTRTIMO 3
#endif
#ifndef NFS_DEFATTRTIMO
#define NFS_DEFATTRTIMO 10
#endif
#ifndef NFS_MAXATTRTIMO
#define NFS_MAXATTRTIMO 60
#endif
#ifndef NFS_MINDIRATTRTIMO
#define NFS_MINDIRATTRTIMO 30
#endif
#ifndef NFS_MAXDIRATTRTIMO
#define NFS_MAXDIRATTRTIMO 60
#endif
#ifndef NFS_DEADTHRESH
#define NFS_DEADTHRESH NFS_NEVERDEAD
#endif
#define NFS_NEVERDEAD 9
#define NFS_WSIZE 8192
#define NFS_RSIZE 8192
#define NFS_READDIRSIZE 8192
#define NFS_DEFRAHEAD 6
#define NFS_MAXRAHEAD 32
#define NFS_MAXASYNCBIO 64
#define NFS_MAXUIDHASH 64
#define NFS_MAXGATHERDELAY 100
#ifndef NFS_GATHERDELAY
#define NFS_GATHERDELAY 20
#endif
#define NFS_DIRBLKSIZ 4096
#ifdef _KERNEL
#define DIRBLKSIZ 512
#endif
#define NFS_ASYSCALE 256
#define NFS_MINASYNC_SCALED (4 * NFS_ASYSCALE)
#define NFS_MAXASYNC_SCALED (NFS_MAXASYNCBIO * NFS_ASYSCALE)
#define NMOD(a) ((a) % nfs_asyncdaemons)
#define NFS_CMPFH(n, f, s) \
((n)->n_fhsize == (s) && !bcmp((caddr_t)(n)->n_fhp, (caddr_t)(f), (s)))
#define NFS_ISV3(v) (VFSTONFS((v)->v_mount)->nm_flag & NFSMNT_NFSV3)
#define NFS_SRVMAXDATA(n) \
(((n)->nd_flag & ND_NFSV3) ? (((n)->nd_nam2) ? \
NFS_MAXDGRAMDATA : NFS_MAXDATA) : NFS_V2MAXDATA)
#ifndef IO_METASYNC
#define IO_METASYNC 0
#endif
#define NFS_ARGSVERSION 3
struct nfs_args {
int version;
struct sockaddr *addr;
int addrlen;
int sotype;
int proto;
u_char *fh;
int fhsize;
int flags;
int wsize;
int rsize;
int readdirsize;
int timeo;
int retrans;
int maxgrouplist;
int readahead;
int unused01;
int deadthresh;
char *hostname;
int acregmin;
int acregmax;
int acdirmin;
int acdirmax;
};
#define NFSMNT_SOFT 0x00000001
#define NFSMNT_WSIZE 0x00000002
#define NFSMNT_RSIZE 0x00000004
#define NFSMNT_TIMEO 0x00000008
#define NFSMNT_RETRANS 0x00000010
#define NFSMNT_MAXGRPS 0x00000020
#define NFSMNT_INT 0x00000040
#define NFSMNT_NOCONN 0x00000080
#define NFSMNT_FORCE 0x00000100
#define NFSMNT_NFSV3 0x00000200
#define NFSMNT_KERB 0x00000400
#define NFSMNT_DUMBTIMR 0x00000800
#define NFSMNT_CACHE 0x00001000
#define NFSMNT_READAHEAD 0x00002000
#define NFSMNT_DEADTHRESH 0x00004000
#define NFSMNT_RESVPORT 0x00008000
#define NFSMNT_RDIRPLUS 0x00010000
#define NFSMNT_READDIRSIZE 0x00020000
#define NFSMNT_ACREGMIN 0x00040000
#define NFSMNT_ACREGMAX 0x00080000
#define NFSMNT_ACDIRMIN 0x00100000
#define NFSMNT_ACDIRMAX 0x00200000
#define NFSMNT_RETRYCNT 0x00400000
#define NFSSTA_HASWRITEVERF 0x00040000
#define NFSSTA_GOTPATHCONF 0x00080000
#define NFSSTA_GOTFSINFO 0x00100000
#define NFSSTA_MNTD 0x00200000
#define NFSSTA_DISMINPROG 0x00400000
#define NFSSTA_DISMNT 0x00800000
#define NFSSTA_SENDSPACE 0x01000000
#define NFSSTA_UNUSED25 0x02000000
#define NFSSTA_UNUSED26 0x04000000
#define NFSSTA_UNUSED27 0x08000000
#define NFSSTA_WAITAUTH 0x10000000
#define NFSSTA_HASAUTH 0x20000000
#define NFSSTA_WANTAUTH 0x40000000
#define NFSSTA_AUTHERR 0x80000000
struct nfsd_args {
int sock;
caddr_t name;
int namelen;
};
struct nfsd_srvargs {
struct nfsd *nsd_nfsd;
uid_t nsd_uid;
u_int32_t nsd_haddr;
struct ucred nsd_cr;
u_int nsd_authlen;
u_char *nsd_authstr;
u_int nsd_verflen;
u_char *nsd_verfstr;
struct timeval nsd_timestamp;
u_int32_t nsd_ttl;
NFSKERBKEY_T nsd_key;
};
struct nfsd_cargs {
char *ncd_dirp;
uid_t ncd_authuid;
int ncd_authtype;
u_int ncd_authlen;
u_char *ncd_authstr;
u_int ncd_verflen;
u_char *ncd_verfstr;
NFSKERBKEY_T ncd_key;
};
#ifdef NFS_NPROCS
struct nfsstats {
int attrcache_hits;
int attrcache_misses;
int lookupcache_hits;
int lookupcache_misses;
int direofcache_hits;
int direofcache_misses;
int biocache_reads;
int read_bios;
int read_physios;
int biocache_writes;
int write_bios;
int write_physios;
int biocache_readlinks;
int readlink_bios;
int biocache_readdirs;
int readdir_bios;
int rpccnt[NFS_NPROCS];
int rpcretries;
int srvrpccnt[NFS_NPROCS];
int srvrpc_errs;
int srv_errs;
int rpcrequests;
int rpctimeouts;
int rpcunexpected;
int rpcinvalid;
int srvcache_inproghits;
int srvcache_idemdonehits;
int srvcache_nonidemdonehits;
int srvcache_misses;
int srvnqnfs_leases;
int srvnqnfs_maxleases;
int srvnqnfs_getleases;
int srvvop_writes;
int accesscache_hits;
int accesscache_misses;
};
#endif
#define NFSSVC_BIOD 0x002
#define NFSSVC_NFSD 0x004
#define NFSSVC_ADDSOCK 0x008
#define NFSSVC_AUTHIN 0x010
#define NFSSVC_GOTAUTH 0x040
#define NFSSVC_AUTHINFAIL 0x080
#define NFSSVC_MNTD 0x100
#define NFS_NFSSTATS 1
#define NFS_NFSPRIVPORT 2
#define FS_NFS_NAMES { \
{ 0, 0 }, \
{ "nfsstats", CTLTYPE_STRUCT }, \
{ "nfsprivport", CTLTYPE_INT }, \
}
#ifdef _KERNEL
#ifdef MALLOC_DECLARE
MALLOC_DECLARE(M_NFS);
MALLOC_DECLARE(M_NFSREQ);
MALLOC_DECLARE(M_NFSDIROFF);
MALLOC_DECLARE(M_NFSRVDESC);
MALLOC_DECLARE(M_NFSUID);
MALLOC_DECLARE(M_NFSD);
MALLOC_DECLARE(M_NFSBIGFH);
#endif
extern struct callout nfs_timer_handle;
extern int nfs_async;
extern int nfs_maxasyncbio;
extern int nfs_soreserve;
struct uio;
struct buf;
struct bio;
struct vattr;
struct nlookupdata;
#define NFSINT_SIGMASK(set) \
(SIGISMEMBER(set, SIGINT) || SIGISMEMBER(set, SIGTERM) || \
SIGISMEMBER(set, SIGHUP) || SIGISMEMBER(set, SIGKILL) || \
SIGISMEMBER(set, SIGQUIT))
#define NFSIGNORE_SOERROR(s, e) \
((e) != EINTR && (e) != ERESTART && (e) != EWOULDBLOCK && \
((s) & PR_CONNREQUIRED) == 0)
struct nfsm_info;
struct nfsreq {
TAILQ_ENTRY(nfsreq) r_chain;
struct nfsm_info *r_info;
mtx_link_t r_link;
struct mbuf *r_mreq;
struct mbuf *r_mrep;
struct mbuf *r_md;
caddr_t r_dpos;
struct nfsmount *r_nmp;
struct vnode *r_vp;
u_int32_t r_xid;
int r_flags;
int r_retry;
int r_rexmit;
int r_timer;
u_int32_t r_procnum;
int r_rtt;
struct thread *r_td;
struct mbuf *r_mrest;
struct mbuf *r_mheadend;
struct mbuf **r_mrp;
struct mbuf **r_mdp;
caddr_t *r_dposp;
int r_mrest_len;
int r_failed_auth;
NFSKERBKEY_T r_key;
struct ucred *r_cred;
};
#define R_TIMING 0x0001
#define R_SENT 0x0002
#define R_SOFTTERM 0x0004
#define R_INTR 0x0008
#define R_SOCKERR 0x0010
#define R_TPRINTFMSG 0x0020
#define R_NEEDSXMIT 0x0040
#define R_ASYNC 0x0080
#define R_ONREQQ 0x0100
#define R_LOCKED 0x0200
#define R_WANTED 0x0400
#ifndef NFS_UIDHASHSIZ
#define NFS_UIDHASHSIZ 29
#endif
#define NUIDHASH(sock, uid) \
(&(sock)->ns_uidhashtbl[(uid) % NFS_UIDHASHSIZ])
#ifndef NFS_WDELAYHASHSIZ
#define NFS_WDELAYHASHSIZ 16
#endif
#define NWDELAYHASH(sock, f) \
(&(sock)->ns_wdelayhashtbl[(*((u_int32_t *)(f))) % NFS_WDELAYHASHSIZ])
#ifndef NFS_MUIDHASHSIZ
#define NFS_MUIDHASHSIZ 63
#endif
#define NMUIDHASH(nmp, uid) \
(&(nmp)->nm_uidhashtbl[(uid) % NFS_MUIDHASHSIZ])
union nethostaddr {
u_int32_t had_inetaddr;
struct sockaddr *had_nam;
};
struct nfsuid {
TAILQ_ENTRY(nfsuid) nu_lru;
LIST_ENTRY(nfsuid) nu_hash;
int nu_flag;
union nethostaddr nu_haddr;
struct ucred nu_cr;
time_t nu_expire;
struct timeval nu_timestamp;
u_int32_t nu_nickname;
NFSKERBKEY_T nu_key;
};
#define nu_inetaddr nu_haddr.had_inetaddr
#define nu_nam nu_haddr.had_nam
#define NU_INETADDR 0x1
#define NU_NAM 0x2
struct nfsrv_rec {
STAILQ_ENTRY(nfsrv_rec) nr_link;
struct sockaddr *nr_address;
struct mbuf *nr_packet;
};
struct nfssvc_sock {
TAILQ_ENTRY(nfssvc_sock) ns_chain;
TAILQ_HEAD(, nfsuid) ns_uidlruhead;
struct file *ns_fp;
struct socket *ns_so;
struct sockaddr *ns_nam;
struct mbuf *ns_raw;
struct mbuf *ns_rawend;
STAILQ_HEAD(, nfsrv_rec) ns_rec;
struct mbuf *ns_frag;
int ns_numrec;
u_int32_t ns_flag;
u_int32_t ns_needq_upcall;
struct mtx ns_solock;
int ns_cc;
int ns_reclen;
int ns_numuids;
u_int32_t ns_sref;
LIST_HEAD(, nfsrv_descript) ns_tq;
LIST_HEAD(, nfsuid) ns_uidhashtbl[NFS_UIDHASHSIZ];
LIST_HEAD(nfsrvw_delayhash, nfsrv_descript) ns_wdelayhashtbl[NFS_WDELAYHASHSIZ];
struct lwkt_token ns_token;
};
#define SLP_VALID 0x0001
#define SLP_DOREC 0x0002
#define SLP_NEEDQ 0x0004
#define SLP_DISCONN 0x0008
#define SLP_GETSTREAM 0x0010
#define SLP_LASTFRAG 0x0020
#define SLP_ALLFLAGS 0xff
#define SLP_ACTION_MASK (SLP_NEEDQ | SLP_DOREC | SLP_DISCONN)
extern TAILQ_HEAD(nfssvc_sockhead, nfssvc_sock) nfssvc_sockhead;
extern int nfssvc_sockhead_flag;
extern TAILQ_HEAD(nfsmount_head, nfsmount) nfs_mountq;
#define SLP_INIT 0x01
#define SLP_WANTINIT 0x02
struct nfsd {
TAILQ_ENTRY(nfsd) nfsd_chain;
int nfsd_flag;
struct nfssvc_sock *nfsd_slp;
int nfsd_authlen;
u_char nfsd_authstr[RPCAUTH_MAXSIZ];
int nfsd_verflen;
u_char nfsd_verfstr[RPCVERF_MAXSIZ];
struct thread *nfsd_td;
struct nfsrv_descript *nfsd_nd;
};
#define NFSD_WAITING 0x01
#define NFSD_REQINPROG 0x02
#define NFSD_NEEDAUTH 0x04
#define NFSD_AUTHFAIL 0x08
#define NFS_LATTR_NOSHRINK 0x01
#define NFS_LATTR_NOMTIMECHECK 0x02
#define NFSRV_RECLIMIT(slp) ((slp)->ns_numrec >= nfsd_waiting + 4)
struct nfsrv_descript {
u_quad_t nd_time;
off_t nd_off;
off_t nd_eoff;
LIST_ENTRY(nfsrv_descript) nd_hash;
LIST_ENTRY(nfsrv_descript) nd_tq;
LIST_HEAD(,nfsrv_descript) nd_coalesce;
struct mbuf *nd_mrep;
struct mbuf *nd_md;
struct mbuf *nd_mreq;
struct sockaddr *nd_nam;
struct sockaddr *nd_nam2;
caddr_t nd_dpos;
u_int32_t nd_procnum;
int nd_stable;
int nd_flag;
int nd_len;
int nd_repstat;
u_int32_t nd_retxid;
struct timeval nd_starttime;
fhandle_t nd_fh;
struct ucred nd_cr;
};
#define ND_READ 0x01
#define ND_WRITE 0x02
#define ND_CHECK 0x04
#define ND_NFSV3 0x08
#define ND_UNUSED010 0x10
#define ND_KERBNICK 0x20
#define ND_KERBFULL 0x40
#define ND_KERBAUTH (ND_KERBNICK | ND_KERBFULL)
extern TAILQ_HEAD(nfsd_head, nfsd) nfsd_head;
extern int nfsd_head_flag;
extern int nfsd_waiting;
#define NFSD_CHECKSLP 0x01
#define NFSW_CONTIG(o, n) \
((o)->nd_eoff >= (n)->nd_off && \
!bcmp((caddr_t)&(o)->nd_fh, (caddr_t)&(n)->nd_fh, NFSX_V3FH))
#define NFSW_SAMECRED(o, n) \
(((o)->nd_flag & ND_KERBAUTH) == ((n)->nd_flag & ND_KERBAUTH) && \
!bcmp((caddr_t)&(o)->nd_cr, (caddr_t)&(n)->nd_cr, \
sizeof (struct ucred)))
#define WEBNFS_ESC_CHAR '%'
#define WEBNFS_SPECCHAR_START 0x80
#define WEBNFS_NATIVE_CHAR 0x80
#define HEXTOC(c) \
((c) >= 'a' ? ((c) - ('a' - 10)) : \
((c) >= 'A' ? ((c) - ('A' - 10)) : ((c) - '0')))
#define HEXSTRTOI(p) \
((HEXTOC(p[0]) << 4) + HEXTOC(p[1]))
#ifdef NFS_DEBUG
extern int nfs_debug;
#define NFS_DEBUG_ASYNCIO 1
#define NFS_DEBUG_WG 2
#define NFS_DEBUG_RC 4
#define NFS_DPF(cat, args) \
do { \
if (nfs_debug & NFS_DEBUG_##cat) kprintf args; \
} while (0)
#else
#define NFS_DPF(cat, args)
#endif
extern u_int32_t nfs_xdrneg1;
extern u_int32_t rpc_reply, rpc_msgdenied, rpc_mismatch, rpc_vers;
extern u_int32_t rpc_auth_unix, rpc_msgaccepted, rpc_call, rpc_autherr;
extern u_int32_t rpc_auth_kerb;
extern u_int32_t nfs_prog, nfs_true, nfs_false;
extern struct nfsstats nfsstats;
extern nfstype nfsv2_type[9];
extern nfstype nfsv3_type[9];
extern int nfsv2_procid[NFS_NPROCS];
extern enum vtype nv3tov_type[8];
extern int nfsv3_procid[NFS_NPROCS];
extern int nfs_ticks;
extern struct nfsrtt nfsrtt;
extern int nfsrtton;
extern int nfsrvw_procrastinate;
extern int nfsrvw_procrastinate_v3;
extern int32_t (*nfsrv3_procs[NFS_NPROCS]) (struct nfsrv_descript *nd,
struct nfssvc_sock *slp,
struct thread *td,
struct mbuf **mreqp);
extern struct nfsv3_diskless nfsv3_diskless;
extern struct lwkt_token nfs_token;
u_quad_t nfs_curusec (void);
int nfs_init (struct vfsconf *vfsp);
int nfs_uninit (struct vfsconf *vfsp);
struct ucred *nfs_crhold(struct ucred *cred);
int nfs_crsame(struct ucred *cr1, struct ucred *cr2);
int nfs_reply (struct nfsmount *nmp, struct nfsreq *);
int nfs_getreq (struct nfsrv_descript *,struct nfsd *,int);
int nfs_send (struct socket *, struct sockaddr *, struct mbuf *,
struct nfsreq *);
int nfs_rephead (int, struct nfsrv_descript *, struct nfssvc_sock *,
int, struct mbuf **, struct mbuf **, caddr_t *);
int nfs_sndlock (struct nfsmount *, struct nfsreq *);
void nfs_sndunlock (struct nfsmount *);
int nfs_slplock (struct nfssvc_sock *, int);
void nfs_slpunlock (struct nfssvc_sock *);
int nfs_disct (struct mbuf **, caddr_t *, int, int, caddr_t *);
int nfs_vinvalbuf (struct vnode *, int, int);
int nfs_readrpc_uio (struct vnode *, struct uio *);
void nfs_readrpc_bio (struct vnode *, struct bio *);
int nfs_writerpc_uio (struct vnode *, struct uio *, int *, int *);
void nfs_writerpc_bio (struct vnode *, struct bio *);
int nfs_commitrpc_uio (struct vnode *vp, u_quad_t offset, int cnt,
struct thread *td);
void nfs_commitrpc_bio (struct vnode *vp, struct bio *);
int nfs_readdirrpc_uio (struct vnode *, struct uio *);
void nfs_startio(struct vnode *vp, struct bio *, struct thread *);
int nfs_doio(struct vnode *vp, struct bio *, struct thread *);
void nfs_asyncio(struct vnode *vp, struct bio *bio);
int nfs_asyncok(struct nfsmount *nmp);
int nfs_readlinkrpc_uio (struct vnode *, struct uio *);
int nfs_sigintr (struct nfsmount *, struct nfsreq *, struct thread *);
int nfs_readdirplusrpc_uio (struct vnode *, struct uio *);
int netaddr_match (int, union nethostaddr *, struct sockaddr *);
int nfs_loadattrcache (struct vnode *, struct mbuf **, caddr_t *,
struct vattr *, int);
int nfs_namei (struct nlookupdata *, struct ucred *, int,
struct vnode **, struct vnode **, fhandle_t *, int,
struct nfssvc_sock *, struct sockaddr *, struct mbuf **,
caddr_t *, struct vnode **, struct thread *, int, int);
void nfsrv_initcache (void);
void nfsrv_destroycache (void);
int nfs_getauth (struct nfsmount *, struct nfsreq *, struct ucred *,
char **, int *, char *, int *, NFSKERBKEY_T);
int nfs_getnickauth (struct nfsmount *, struct ucred *, char **,
int *, char *, int);
int nfs_savenickauth (struct nfsmount *, struct ucred *, int,
NFSKERBKEY_T, struct mbuf **, char **,
struct mbuf *);
int nfs_adv (struct mbuf **, caddr_t *, int, int);
void nfs_nhinit (void);
void nfs_nhdestroy (void);
int nfs_nmcancelreqs (struct nfsmount *);
void nfs_timer_callout (void*);
int nfsrv_dorec (struct nfssvc_sock *, struct nfsd *,
struct nfsrv_descript **);
int nfsrv_getcache (struct nfsrv_descript *, struct nfssvc_sock *,
struct mbuf **);
void nfsrv_updatecache (struct nfsrv_descript *, int, struct mbuf *);
void nfsrv_cleancache (void);
int nfs_connect (struct nfsmount *, struct nfsreq *);
void nfs_disconnect (struct nfsmount *);
void nfs_safedisconnect (struct nfsmount *);
int nfs_getattrcache (struct vnode *, struct vattr *);
int nfs_bioread (struct vnode *, struct uio *, int);
void nfsrv_init (int);
void nfs_clearcommit (struct mount *);
int nfsrv_errmap (struct nfsrv_descript *, int);
void nfsrvw_sort (gid_t *, int);
void nfsrv_setcred (struct ucred *, struct ucred *);
int nfsrv_object_create (struct vnode *);
void nfsrv_wakenfsd (struct nfssvc_sock *slp, int nparallel);
int nfsrv_writegather (struct nfsrv_descript **, struct nfssvc_sock *,
struct thread *, struct mbuf **);
int nfs_fsinfo (struct nfsmount *, struct vnode *, struct thread *p);
int nfsrv3_access (struct nfsrv_descript *nfsd,
struct nfssvc_sock *slp,
struct thread *td, struct mbuf **mrq);
int nfsrv_commit (struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
struct thread *td, struct mbuf **mrq);
int nfsrv_create (struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
struct thread *td, struct mbuf **mrq);
int nfsrv_fhtovp (fhandle_t *, int, struct mount **, struct vnode **,
struct ucred *, struct nfssvc_sock *,
struct sockaddr *, int *, int, int);
int nfsrv_setpublicfs (struct mount *, struct netexport *,
struct export_args *);
int nfs_ispublicfh (fhandle_t *);
int nfsrv_fsinfo (struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
struct thread *td, struct mbuf **mrq);
int nfsrv_getattr (struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
struct thread *td, struct mbuf **mrq);
int nfsrv_link (struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
struct thread *td, struct mbuf **mrq);
int nfsrv_lookup (struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
struct thread *td, struct mbuf **mrq);
int nfsrv_mkdir (struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
struct thread *td, struct mbuf **mrq);
int nfsrv_mknod (struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
struct thread *td, struct mbuf **mrq);
int nfsrv_noop (struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
struct thread *td, struct mbuf **mrq);
int nfsrv_null (struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
struct thread *td, struct mbuf **mrq);
int nfsrv_pathconf (struct nfsrv_descript *nfsd,
struct nfssvc_sock *slp, struct thread *td,
struct mbuf **mrq);
int nfsrv_read (struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
struct thread *td, struct mbuf **mrq);
int nfsrv_readdir (struct nfsrv_descript *nfsd,
struct nfssvc_sock *slp,
struct thread *td, struct mbuf **mrq);
int nfsrv_readdirplus (struct nfsrv_descript *nfsd,
struct nfssvc_sock *slp, struct thread *td,
struct mbuf **mrq);
int nfsrv_readlink (struct nfsrv_descript *nfsd,
struct nfssvc_sock *slp, struct thread *td,
struct mbuf **mrq);
int nfsrv_remove (struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
struct thread *td, struct mbuf **mrq);
int nfsrv_rename (struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
struct thread *td, struct mbuf **mrq);
int nfsrv_rmdir (struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
struct thread *td, struct mbuf **mrq);
int nfsrv_setattr (struct nfsrv_descript *nfsd,
struct nfssvc_sock *slp,
struct thread *td, struct mbuf **mrq);
int nfsrv_statfs (struct nfsrv_descript *nfsd,
struct nfssvc_sock *slp,
struct thread *td, struct mbuf **mrq);
int nfsrv_symlink (struct nfsrv_descript *nfsd,
struct nfssvc_sock *slp,
struct thread *td, struct mbuf **mrq);
int nfsrv_write (struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
struct thread *td, struct mbuf **mrq);
void nfsrv_rcv (struct socket *so, void *arg, int waitflag);
void nfsrv_rcv_upcall (struct socket *so, void *arg, int waitflag);
void nfsrv_slpderef (struct nfssvc_sock *slp);
void nfsrv_slpref (struct nfssvc_sock *slp);
int nfs_meta_setsize (struct vnode *vp, struct thread *td,
off_t nbase, int nvextflags);
int nfs_clientd(struct nfsmount *nmp, struct ucred *cred,
struct nfsd_cargs *ncd, int flag, caddr_t argp,
struct thread *td);
void nfssvc_iod_reader(void *arg);
void nfssvc_iod_writer(void *arg);
void nfssvc_iod_stop1(struct nfsmount *nmp);
void nfssvc_iod_stop2(struct nfsmount *nmp);
void nfssvc_iod_writer_wakeup(struct nfsmount *nmp);
void nfssvc_iod_reader_wakeup(struct nfsmount *nmp);
#endif
#endif