2005-01-27 14:33:26 +03:00
|
|
|
/* $NetBSD: nfs_var.h,v 1.49 2005/01/27 11:33:26 yamt Exp $ */
|
1996-02-10 00:48:19 +03:00
|
|
|
|
1998-09-05 18:20:01 +04:00
|
|
|
/*-
|
|
|
|
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* This code is derived from software contributed to The NetBSD Foundation
|
|
|
|
* by Christos Zoulas.
|
1996-02-10 00:48:19 +03:00
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
|
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer.
|
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in the
|
|
|
|
* documentation and/or other materials provided with the distribution.
|
|
|
|
* 3. All advertising materials mentioning features or use of this software
|
|
|
|
* must display the following acknowledgement:
|
1998-09-05 18:20:01 +04:00
|
|
|
* This product includes software developed by the NetBSD
|
|
|
|
* Foundation, Inc. and its contributors.
|
|
|
|
* 4. Neither the name of The NetBSD Foundation nor the names of its
|
|
|
|
* contributors may be used to endorse or promote products derived
|
|
|
|
* from this software without specific prior written permission.
|
1996-02-10 00:48:19 +03:00
|
|
|
*
|
1998-09-05 18:20:01 +04:00
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
|
|
|
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
|
|
|
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
|
|
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
|
|
|
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
|
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
|
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
|
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
|
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
|
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
|
* POSSIBILITY OF SUCH DAMAGE.
|
1996-02-10 00:48:19 +03:00
|
|
|
*/
|
|
|
|
|
1996-02-18 14:53:36 +03:00
|
|
|
/*
|
|
|
|
* XXX needs <nfs/rpcv2.h> and <nfs/nfs.h> because of typedefs
|
|
|
|
*/
|
|
|
|
|
2003-02-02 05:34:53 +03:00
|
|
|
#ifdef _KERNEL
|
2003-02-01 09:23:35 +03:00
|
|
|
#include <sys/mallocvar.h>
|
2003-05-22 18:16:23 +04:00
|
|
|
#include <sys/pool.h>
|
2003-02-01 09:23:35 +03:00
|
|
|
|
|
|
|
MALLOC_DECLARE(M_NFSREQ);
|
|
|
|
MALLOC_DECLARE(M_NFSMNT);
|
|
|
|
MALLOC_DECLARE(M_NFSUID);
|
|
|
|
MALLOC_DECLARE(M_NFSD);
|
|
|
|
MALLOC_DECLARE(M_NFSDIROFF);
|
|
|
|
MALLOC_DECLARE(M_NFSBIGFH);
|
|
|
|
MALLOC_DECLARE(M_NQLEASE);
|
2003-05-22 18:16:23 +04:00
|
|
|
extern struct pool nfs_srvdesc_pool;
|
2003-02-01 09:23:35 +03:00
|
|
|
|
1996-02-10 00:48:19 +03:00
|
|
|
struct vnode;
|
|
|
|
struct uio;
|
|
|
|
struct ucred;
|
|
|
|
struct proc;
|
|
|
|
struct buf;
|
|
|
|
struct nfs_diskless;
|
|
|
|
struct sockaddr_in;
|
|
|
|
struct nfs_dlmount;
|
|
|
|
struct vnode;
|
|
|
|
struct nfsd;
|
|
|
|
struct mbuf;
|
|
|
|
struct file;
|
|
|
|
struct nqlease;
|
|
|
|
struct nqhost;
|
|
|
|
struct nfssvc_sock;
|
|
|
|
struct nfsmount;
|
|
|
|
struct socket;
|
|
|
|
struct nfsreq;
|
|
|
|
struct vattr;
|
|
|
|
struct nameidata;
|
|
|
|
struct nfsnode;
|
|
|
|
struct sillyrename;
|
|
|
|
struct componentname;
|
1996-02-13 20:06:52 +03:00
|
|
|
struct nfsd_srvargs;
|
1996-02-18 14:53:36 +03:00
|
|
|
struct nfsrv_descript;
|
|
|
|
struct nfs_fattr;
|
1997-10-10 05:53:17 +04:00
|
|
|
struct nfsdircache;
|
1998-03-29 09:13:00 +04:00
|
|
|
union nethostaddr;
|
1996-02-10 00:48:19 +03:00
|
|
|
|
|
|
|
/* nfs_bio.c */
|
1997-10-10 05:53:17 +04:00
|
|
|
int nfs_bioread __P((struct vnode *, struct uio *, int, struct ucred *, int));
|
2003-06-30 02:28:00 +04:00
|
|
|
struct buf *nfs_getcacheblk __P((struct vnode *, daddr_t, int, struct proc *));
|
|
|
|
int nfs_vinvalbuf __P((struct vnode *, int, struct ucred *, struct proc *,
|
1996-02-10 00:48:19 +03:00
|
|
|
int));
|
2004-12-14 12:13:13 +03:00
|
|
|
int nfs_flushstalebuf __P((struct vnode *, struct ucred *, struct proc *, int));
|
|
|
|
#define NFS_FLUSHSTALEBUF_MYWRITE 1 /* assume writes are ours */
|
2000-11-27 11:39:39 +03:00
|
|
|
int nfs_asyncio __P((struct buf *));
|
2003-06-30 02:28:00 +04:00
|
|
|
int nfs_doio __P((struct buf *, struct proc *));
|
1996-02-10 00:48:19 +03:00
|
|
|
|
|
|
|
/* nfs_boot.c */
|
1997-08-29 20:06:41 +04:00
|
|
|
/* see nfsdiskless.h */
|
1996-02-10 00:48:19 +03:00
|
|
|
|
2002-10-23 13:10:23 +04:00
|
|
|
/* nfs_kq.c */
|
|
|
|
void nfs_kqinit __P((void));
|
|
|
|
|
1996-02-10 00:48:19 +03:00
|
|
|
/* nfs_node.c */
|
|
|
|
void nfs_nhinit __P((void));
|
2001-09-15 20:12:54 +04:00
|
|
|
void nfs_nhreinit __P((void));
|
2000-03-16 21:08:17 +03:00
|
|
|
void nfs_nhdone __P((void));
|
2004-04-05 14:44:09 +04:00
|
|
|
int nfs_nget1 __P((struct mount *, nfsfh_t *, int, struct nfsnode **, int));
|
|
|
|
#define nfs_nget(mp, fhp, fhsize, npp) \
|
|
|
|
nfs_nget1((mp), (fhp), (fhsize), (npp), 0)
|
1996-02-10 00:48:19 +03:00
|
|
|
|
|
|
|
/* nfs_vnops.c */
|
2003-06-30 02:28:00 +04:00
|
|
|
int nfs_null __P((struct vnode *, struct ucred *, struct proc *));
|
1996-02-18 14:53:36 +03:00
|
|
|
int nfs_setattrrpc __P((struct vnode *, struct vattr *, struct ucred *,
|
2003-06-30 02:28:00 +04:00
|
|
|
struct proc *));
|
1996-02-10 00:48:19 +03:00
|
|
|
int nfs_readlinkrpc __P((struct vnode *, struct uio *, struct ucred *));
|
2000-11-27 11:39:39 +03:00
|
|
|
int nfs_readrpc __P((struct vnode *, struct uio *));
|
2003-05-21 17:27:19 +04:00
|
|
|
int nfs_writerpc __P((struct vnode *, struct uio *, int *, boolean_t,
|
|
|
|
boolean_t *));
|
1996-02-18 14:53:36 +03:00
|
|
|
int nfs_mknodrpc __P((struct vnode *, struct vnode **, struct componentname *,
|
|
|
|
struct vattr *));
|
1996-02-10 00:48:19 +03:00
|
|
|
int nfs_removeit __P((struct sillyrename *));
|
1996-10-26 03:13:58 +04:00
|
|
|
int nfs_removerpc __P((struct vnode *, const char *, int, struct ucred *,
|
2003-06-30 02:28:00 +04:00
|
|
|
struct proc *));
|
1996-02-10 00:48:19 +03:00
|
|
|
int nfs_renameit __P((struct vnode *, struct componentname *,
|
|
|
|
struct sillyrename *));
|
1996-10-26 03:13:58 +04:00
|
|
|
int nfs_renamerpc __P((struct vnode *, const char *, int, struct vnode *,
|
2003-06-30 02:28:00 +04:00
|
|
|
const char *, int, struct ucred *, struct proc *));
|
1996-02-10 00:48:19 +03:00
|
|
|
int nfs_readdirrpc __P((struct vnode *, struct uio *, struct ucred *));
|
1996-02-18 14:53:36 +03:00
|
|
|
int nfs_readdirplusrpc __P((struct vnode *, struct uio *, struct ucred *));
|
1996-02-10 00:48:19 +03:00
|
|
|
int nfs_sillyrename __P((struct vnode *, struct vnode *,
|
|
|
|
struct componentname *));
|
1996-10-26 03:13:58 +04:00
|
|
|
int nfs_lookitup __P((struct vnode *, const char *, int, struct ucred *,
|
2003-06-30 02:28:00 +04:00
|
|
|
struct proc *, struct nfsnode **));
|
|
|
|
int nfs_commit __P((struct vnode *, off_t, uint32_t, struct proc *));
|
|
|
|
int nfs_flush __P((struct vnode *, struct ucred *, int, struct proc *, int));
|
1996-02-10 00:48:19 +03:00
|
|
|
|
|
|
|
/* nfs_nqlease.c */
|
1996-02-18 14:53:36 +03:00
|
|
|
void nqnfs_lease_updatetime __P((int));
|
|
|
|
void nqnfs_clientlease __P((struct nfsmount *, struct nfsnode *, int, int,
|
|
|
|
time_t, u_quad_t));
|
|
|
|
void nqsrv_locklease __P((struct nqlease *));
|
|
|
|
void nqsrv_unlocklease __P((struct nqlease *));
|
|
|
|
int nqsrv_getlease __P((struct vnode *, u_int32_t *, int, struct nfssvc_sock *,
|
2003-06-30 02:28:00 +04:00
|
|
|
struct proc *, struct mbuf *, int *, u_quad_t *,
|
1996-02-18 14:53:36 +03:00
|
|
|
struct ucred *));
|
1996-02-10 00:48:19 +03:00
|
|
|
void nqsrv_addhost __P((struct nqhost *, struct nfssvc_sock *, struct mbuf *));
|
1996-02-18 14:53:36 +03:00
|
|
|
void nqsrv_instimeq __P((struct nqlease *, u_int32_t));
|
1996-02-10 00:48:19 +03:00
|
|
|
int nqsrv_cmpnam __P((struct nfssvc_sock *, struct mbuf *, struct nqhost *));
|
|
|
|
void nqsrv_send_eviction __P((struct vnode *, struct nqlease *,
|
|
|
|
struct nfssvc_sock *, struct mbuf *,
|
2004-05-23 02:52:13 +04:00
|
|
|
struct ucred *, struct proc *));
|
1996-02-10 00:48:19 +03:00
|
|
|
void nqsrv_waitfor_expiry __P((struct nqlease *));
|
|
|
|
void nqnfs_serverd __P((void));
|
1996-02-18 14:53:36 +03:00
|
|
|
int nqnfsrv_getlease __P((struct nfsrv_descript *, struct nfssvc_sock *,
|
2003-06-30 02:28:00 +04:00
|
|
|
struct proc *, struct mbuf **));
|
1996-02-18 14:53:36 +03:00
|
|
|
int nqnfsrv_vacated __P((struct nfsrv_descript *, struct nfssvc_sock *,
|
2003-06-30 02:28:00 +04:00
|
|
|
struct proc *, struct mbuf **));
|
|
|
|
int nqnfs_getlease __P((struct vnode *, int, struct ucred *, struct proc *));
|
2004-05-23 02:52:13 +04:00
|
|
|
int nqnfs_vacated __P((struct vnode *, struct ucred *, struct proc *));
|
1996-02-10 00:48:19 +03:00
|
|
|
int nqnfs_callback __P((struct nfsmount *, struct mbuf *, struct mbuf *,
|
2003-06-30 02:28:00 +04:00
|
|
|
caddr_t));
|
1996-02-10 00:48:19 +03:00
|
|
|
|
|
|
|
/* nfs_serv.c */
|
1996-02-18 14:53:36 +03:00
|
|
|
int nfsrv3_access __P((struct nfsrv_descript *, struct nfssvc_sock *,
|
2003-06-30 02:28:00 +04:00
|
|
|
struct proc *, struct mbuf **));
|
1996-02-18 14:53:36 +03:00
|
|
|
int nfsrv_getattr __P((struct nfsrv_descript *, struct nfssvc_sock *,
|
2003-06-30 02:28:00 +04:00
|
|
|
struct proc *, struct mbuf **));
|
1996-02-18 14:53:36 +03:00
|
|
|
int nfsrv_setattr __P((struct nfsrv_descript *, struct nfssvc_sock *,
|
2003-06-30 02:28:00 +04:00
|
|
|
struct proc *, struct mbuf **));
|
1996-02-18 14:53:36 +03:00
|
|
|
int nfsrv_lookup __P((struct nfsrv_descript *, struct nfssvc_sock *,
|
2003-06-30 02:28:00 +04:00
|
|
|
struct proc *, struct mbuf **));
|
1996-02-18 14:53:36 +03:00
|
|
|
int nfsrv_readlink __P((struct nfsrv_descript *, struct nfssvc_sock *,
|
2003-06-30 02:28:00 +04:00
|
|
|
struct proc *, struct mbuf **));
|
1996-02-18 14:53:36 +03:00
|
|
|
int nfsrv_read __P((struct nfsrv_descript *, struct nfssvc_sock *,
|
2003-06-30 02:28:00 +04:00
|
|
|
struct proc *, struct mbuf **));
|
1996-02-18 14:53:36 +03:00
|
|
|
int nfsrv_write __P((struct nfsrv_descript *, struct nfssvc_sock *,
|
2003-06-30 02:28:00 +04:00
|
|
|
struct proc *, struct mbuf **));
|
1996-02-18 14:53:36 +03:00
|
|
|
int nfsrv_writegather __P((struct nfsrv_descript **, struct nfssvc_sock *,
|
2003-06-30 02:28:00 +04:00
|
|
|
struct proc *, struct mbuf **));
|
1996-02-18 14:53:36 +03:00
|
|
|
void nfsrvw_coalesce __P((struct nfsrv_descript *, struct nfsrv_descript *));
|
|
|
|
int nfsrv_create __P((struct nfsrv_descript *, struct nfssvc_sock *,
|
2003-06-30 02:28:00 +04:00
|
|
|
struct proc *, struct mbuf **));
|
1996-02-18 14:53:36 +03:00
|
|
|
int nfsrv_mknod __P((struct nfsrv_descript *, struct nfssvc_sock *,
|
2003-06-30 02:28:00 +04:00
|
|
|
struct proc *, struct mbuf **));
|
1996-02-18 14:53:36 +03:00
|
|
|
int nfsrv_remove __P((struct nfsrv_descript *, struct nfssvc_sock *,
|
2003-06-30 02:28:00 +04:00
|
|
|
struct proc *, struct mbuf **));
|
1996-02-18 14:53:36 +03:00
|
|
|
int nfsrv_rename __P((struct nfsrv_descript *, struct nfssvc_sock *,
|
2003-06-30 02:28:00 +04:00
|
|
|
struct proc *, struct mbuf **));
|
1996-02-18 14:53:36 +03:00
|
|
|
int nfsrv_link __P((struct nfsrv_descript *, struct nfssvc_sock *,
|
2003-06-30 02:28:00 +04:00
|
|
|
struct proc *, struct mbuf **));
|
1996-02-18 14:53:36 +03:00
|
|
|
int nfsrv_symlink __P((struct nfsrv_descript *, struct nfssvc_sock *,
|
2003-06-30 02:28:00 +04:00
|
|
|
struct proc *, struct mbuf **));
|
1996-02-18 14:53:36 +03:00
|
|
|
int nfsrv_mkdir __P((struct nfsrv_descript *, struct nfssvc_sock *,
|
2003-06-30 02:28:00 +04:00
|
|
|
struct proc *, struct mbuf **));
|
1996-02-18 14:53:36 +03:00
|
|
|
int nfsrv_rmdir __P((struct nfsrv_descript *, struct nfssvc_sock *,
|
2003-06-30 02:28:00 +04:00
|
|
|
struct proc *, struct mbuf **));
|
1996-02-18 14:53:36 +03:00
|
|
|
int nfsrv_readdir __P((struct nfsrv_descript *, struct nfssvc_sock *,
|
2003-06-30 02:28:00 +04:00
|
|
|
struct proc *, struct mbuf **));
|
1996-02-18 14:53:36 +03:00
|
|
|
int nfsrv_readdirplus __P((struct nfsrv_descript *, struct nfssvc_sock *,
|
2003-06-30 02:28:00 +04:00
|
|
|
struct proc *, struct mbuf **));
|
1996-02-18 14:53:36 +03:00
|
|
|
int nfsrv_commit __P((struct nfsrv_descript *, struct nfssvc_sock *,
|
2003-06-30 02:28:00 +04:00
|
|
|
struct proc *, struct mbuf **));
|
1996-02-18 14:53:36 +03:00
|
|
|
int nfsrv_statfs __P((struct nfsrv_descript *, struct nfssvc_sock *,
|
2003-06-30 02:28:00 +04:00
|
|
|
struct proc *, struct mbuf **));
|
1996-02-18 14:53:36 +03:00
|
|
|
int nfsrv_fsinfo __P((struct nfsrv_descript *, struct nfssvc_sock *,
|
2003-06-30 02:28:00 +04:00
|
|
|
struct proc *, struct mbuf **));
|
1996-02-18 14:53:36 +03:00
|
|
|
int nfsrv_pathconf __P((struct nfsrv_descript *, struct nfssvc_sock *,
|
2003-06-30 02:28:00 +04:00
|
|
|
struct proc *, struct mbuf **));
|
1996-02-18 14:53:36 +03:00
|
|
|
int nfsrv_null __P((struct nfsrv_descript *, struct nfssvc_sock *,
|
2003-06-30 02:28:00 +04:00
|
|
|
struct proc *, struct mbuf **));
|
1996-02-18 14:53:36 +03:00
|
|
|
int nfsrv_noop __P((struct nfsrv_descript *, struct nfssvc_sock *,
|
2003-06-30 02:28:00 +04:00
|
|
|
struct proc *, struct mbuf **));
|
|
|
|
int nfsrv_access __P((struct vnode *, int, struct ucred *, int, struct proc *,
|
1996-12-11 03:01:56 +03:00
|
|
|
int));
|
1996-02-10 00:48:19 +03:00
|
|
|
|
|
|
|
/* nfs_socket.c */
|
2004-05-23 02:52:13 +04:00
|
|
|
int nfs_connect __P((struct nfsmount *, struct nfsreq *, struct proc *));
|
|
|
|
int nfs_reconnect __P((struct nfsreq *, struct proc *));
|
1996-02-10 00:48:19 +03:00
|
|
|
void nfs_disconnect __P((struct nfsmount *));
|
1998-01-31 01:44:13 +03:00
|
|
|
void nfs_safedisconnect __P((struct nfsmount *));
|
1996-02-10 00:48:19 +03:00
|
|
|
int nfs_send __P((struct socket *, struct mbuf *, struct mbuf *,
|
2004-05-23 02:52:13 +04:00
|
|
|
struct nfsreq *, struct proc *));
|
|
|
|
int nfs_receive __P((struct nfsreq *, struct mbuf **, struct mbuf **,
|
|
|
|
struct proc *));
|
|
|
|
int nfs_reply __P((struct nfsreq *, struct proc *));
|
2003-06-30 02:28:00 +04:00
|
|
|
int nfs_request __P((struct nfsnode *, struct mbuf *, int, struct proc *,
|
1996-02-10 00:48:19 +03:00
|
|
|
struct ucred *, struct mbuf **, struct mbuf **,
|
2004-05-10 14:40:42 +04:00
|
|
|
caddr_t *, int *));
|
1996-02-18 14:53:36 +03:00
|
|
|
int nfs_rephead __P((int, struct nfsrv_descript *, struct nfssvc_sock *,
|
|
|
|
int, int, u_quad_t *, struct mbuf **, struct mbuf **, caddr_t *));
|
1996-02-10 00:48:19 +03:00
|
|
|
void nfs_timer __P((void *));
|
2003-06-30 02:28:00 +04:00
|
|
|
int nfs_sigintr __P((struct nfsmount *, struct nfsreq *, struct proc *));
|
1996-02-10 00:48:19 +03:00
|
|
|
int nfs_sndlock __P((int *, struct nfsreq *));
|
2003-06-30 02:28:00 +04:00
|
|
|
void nfs_exit __P((struct proc *, void *));
|
1996-02-10 00:48:19 +03:00
|
|
|
void nfs_sndunlock __P((int *));
|
|
|
|
int nfs_rcvlock __P((struct nfsreq *));
|
2003-05-22 18:11:50 +04:00
|
|
|
void nfs_rcvunlock __P((struct nfsmount *));
|
1996-02-18 14:53:36 +03:00
|
|
|
int nfs_getreq __P((struct nfsrv_descript *, struct nfsd *, int));
|
2003-06-30 02:28:00 +04:00
|
|
|
int nfs_msg __P((struct proc *, char *, char *));
|
1996-02-10 00:48:19 +03:00
|
|
|
void nfsrv_rcv __P((struct socket *, caddr_t, int));
|
|
|
|
int nfsrv_getstream __P((struct nfssvc_sock *, int));
|
1996-02-18 14:53:36 +03:00
|
|
|
int nfsrv_dorec __P((struct nfssvc_sock *, struct nfsd *,
|
|
|
|
struct nfsrv_descript **));
|
1996-02-10 00:48:19 +03:00
|
|
|
void nfsrv_wakenfsd __P((struct nfssvc_sock *));
|
|
|
|
|
|
|
|
/* nfs_srvcache.c */
|
1996-02-18 14:53:36 +03:00
|
|
|
void nfsrv_initcache __P((void ));
|
|
|
|
int nfsrv_getcache __P((struct nfsrv_descript *, struct nfssvc_sock *,
|
|
|
|
struct mbuf **));
|
|
|
|
void nfsrv_updatecache __P((struct nfsrv_descript *, int, struct mbuf *));
|
1996-02-10 00:48:19 +03:00
|
|
|
void nfsrv_cleancache __P((void));
|
|
|
|
|
|
|
|
/* nfs_subs.c */
|
2003-04-25 01:21:04 +04:00
|
|
|
struct mbuf *nfsm_reqh __P((struct nfsnode *, u_long, int, caddr_t *));
|
1996-02-18 14:53:36 +03:00
|
|
|
struct mbuf *nfsm_rpchead __P((struct ucred *, int, int, int, int, char *, int,
|
|
|
|
char *, struct mbuf *, int, struct mbuf **,
|
1996-02-10 00:48:19 +03:00
|
|
|
u_int32_t *));
|
|
|
|
int nfsm_mbuftouio __P((struct mbuf **, struct uio *, int, caddr_t *));
|
|
|
|
int nfsm_uiotombuf __P((struct uio *, struct mbuf **, int, caddr_t *));
|
|
|
|
int nfsm_disct __P((struct mbuf **, caddr_t *, int, int, caddr_t *));
|
|
|
|
int nfs_adv __P((struct mbuf **, caddr_t *, int, int));
|
1996-10-26 03:13:58 +04:00
|
|
|
int nfsm_strtmbuf __P((struct mbuf **, char **, const char *, long));
|
1997-10-10 05:53:17 +04:00
|
|
|
u_long nfs_dirhash __P((off_t));
|
1997-10-19 05:46:15 +04:00
|
|
|
void nfs_initdircache __P((struct vnode *));
|
2003-05-22 18:14:02 +04:00
|
|
|
void nfs_initdirxlatecookie __P((struct vnode *));
|
1997-10-19 05:46:15 +04:00
|
|
|
struct nfsdircache *nfs_searchdircache __P((struct vnode *, off_t, int, int *));
|
2002-03-12 01:55:05 +03:00
|
|
|
struct nfsdircache *nfs_enterdircache __P((struct vnode *, off_t, off_t, int, daddr_t));
|
2004-09-15 13:50:56 +04:00
|
|
|
void nfs_putdircache __P((struct nfsnode *, struct nfsdircache *));
|
1997-10-19 05:46:15 +04:00
|
|
|
void nfs_invaldircache __P((struct vnode *, int));
|
2005-01-27 14:33:26 +03:00
|
|
|
#define NFS_INVALDIRCACHE_FORCE 1
|
|
|
|
#define NFS_INVALDIRCACHE_KEEPEOF 2
|
1996-02-18 14:53:36 +03:00
|
|
|
void nfs_init __P((void));
|
1997-07-15 00:46:20 +04:00
|
|
|
int nfsm_loadattrcache __P((struct vnode **, struct mbuf **, caddr_t *,
|
2002-10-21 16:52:32 +04:00
|
|
|
struct vattr *, int flags));
|
1997-07-15 00:46:20 +04:00
|
|
|
int nfs_loadattrcache __P((struct vnode **, struct nfs_fattr *,
|
2002-10-21 16:52:32 +04:00
|
|
|
struct vattr *, int flags));
|
1996-02-10 00:48:19 +03:00
|
|
|
int nfs_getattrcache __P((struct vnode *, struct vattr *));
|
2002-10-21 16:52:32 +04:00
|
|
|
void nfs_delayedtruncate __P((struct vnode *));
|
2005-01-19 19:22:19 +03:00
|
|
|
int nfs_check_wccdata __P((struct nfsnode *, const struct timespec *,
|
|
|
|
struct timespec *, boolean_t));
|
2003-03-28 18:13:35 +03:00
|
|
|
int nfs_namei __P((struct nameidata *, fhandle_t *, uint32_t,
|
|
|
|
struct nfssvc_sock *, struct mbuf *, struct mbuf **,
|
2003-06-30 02:28:00 +04:00
|
|
|
caddr_t *, struct vnode **, struct proc *, int, int));
|
2003-06-09 17:10:31 +04:00
|
|
|
void nfs_zeropad __P((struct mbuf *, int, int));
|
1996-02-18 14:53:36 +03:00
|
|
|
void nfsm_srvwcc __P((struct nfsrv_descript *, int, struct vattr *, int,
|
|
|
|
struct vattr *, struct mbuf **, char **));
|
|
|
|
void nfsm_srvpostopattr __P((struct nfsrv_descript *, int, struct vattr *,
|
|
|
|
struct mbuf **, char **));
|
|
|
|
void nfsm_srvfattr __P((struct nfsrv_descript *, struct vattr *,
|
|
|
|
struct nfs_fattr *));
|
1996-02-10 00:48:19 +03:00
|
|
|
int nfsrv_fhtovp __P((fhandle_t *, int, struct vnode **, struct ucred *,
|
2003-06-29 22:43:21 +04:00
|
|
|
struct nfssvc_sock *, struct mbuf *, int *, int, int));
|
1997-06-25 03:39:34 +04:00
|
|
|
int nfsrv_setpublicfs __P((struct mount *, struct netexport *,
|
|
|
|
struct export_args *));
|
|
|
|
int nfs_ispublicfh __P((fhandle_t *));
|
1996-02-10 00:48:19 +03:00
|
|
|
int netaddr_match __P((int, union nethostaddr *, struct mbuf *));
|
2000-09-20 02:14:59 +04:00
|
|
|
|
2002-10-21 16:52:32 +04:00
|
|
|
/* flags for nfs_loadattrcache and friends */
|
|
|
|
#define NAC_NOTRUNC 1 /* don't truncate file size */
|
|
|
|
|
1996-02-18 14:53:36 +03:00
|
|
|
void nfs_clearcommit __P((struct mount *));
|
2000-09-20 02:14:59 +04:00
|
|
|
void nfs_merge_commit_ranges __P((struct vnode *));
|
2000-11-27 11:39:39 +03:00
|
|
|
int nfs_in_committed_range __P((struct vnode *, off_t, off_t));
|
|
|
|
int nfs_in_tobecommitted_range __P((struct vnode *, off_t, off_t));
|
|
|
|
void nfs_add_committed_range __P((struct vnode *, off_t, off_t));
|
|
|
|
void nfs_del_committed_range __P((struct vnode *, off_t, off_t));
|
|
|
|
void nfs_add_tobecommitted_range __P((struct vnode *, off_t, off_t));
|
|
|
|
void nfs_del_tobecommitted_range __P((struct vnode *, off_t, off_t));
|
2000-09-20 02:14:59 +04:00
|
|
|
|
1996-02-18 14:53:36 +03:00
|
|
|
int nfsrv_errmap __P((struct nfsrv_descript *, int));
|
|
|
|
void nfsrvw_sort __P((gid_t *, int));
|
|
|
|
void nfsrv_setcred __P((struct ucred *, struct ucred *));
|
2003-06-30 02:28:00 +04:00
|
|
|
void nfs_cookieheuristic __P((struct vnode *, int *, struct proc *,
|
1997-10-10 05:53:17 +04:00
|
|
|
struct ucred *));
|
1996-02-10 00:48:19 +03:00
|
|
|
|
2003-07-23 17:52:23 +04:00
|
|
|
u_int32_t nfs_getxid __P((void));
|
|
|
|
void nfs_renewxid __P((struct nfsreq *));
|
|
|
|
|
1996-02-10 00:48:19 +03:00
|
|
|
/* nfs_syscalls.c */
|
2003-01-18 11:51:40 +03:00
|
|
|
int sys_getfh __P((struct lwp *, void *, register_t *));
|
|
|
|
int sys_nfssvc __P((struct lwp *, void *, register_t *));
|
1996-02-10 00:48:19 +03:00
|
|
|
int nfssvc_addsock __P((struct file *, struct mbuf *));
|
2003-01-18 11:51:40 +03:00
|
|
|
int nfssvc_nfsd __P((struct nfsd_srvargs *, caddr_t, struct lwp *));
|
1996-02-10 00:48:19 +03:00
|
|
|
void nfsrv_zapsock __P((struct nfssvc_sock *));
|
|
|
|
void nfsrv_slpderef __P((struct nfssvc_sock *));
|
|
|
|
void nfsrv_init __P((int));
|
2003-01-18 11:51:40 +03:00
|
|
|
int nfssvc_iod __P((struct lwp *));
|
2003-05-07 20:18:53 +04:00
|
|
|
void nfs_iodinit __P((void));
|
2000-04-16 01:14:48 +04:00
|
|
|
void start_nfsio __P((void *));
|
|
|
|
void nfs_getset_niothreads __P((int));
|
1996-02-10 00:48:19 +03:00
|
|
|
int nfs_getauth __P((struct nfsmount *, struct nfsreq *, struct ucred *,
|
1996-02-18 14:53:36 +03:00
|
|
|
char **, int *, char *, int *, NFSKERBKEY_T));
|
|
|
|
int nfs_getnickauth __P((struct nfsmount *, struct ucred *, char **, int *,
|
|
|
|
char *, int));
|
|
|
|
int nfs_savenickauth __P((struct nfsmount *, struct ucred *, int, NFSKERBKEY_T,
|
|
|
|
struct mbuf **, char **, struct mbuf *));
|
2003-05-05 17:21:00 +04:00
|
|
|
#endif /* _KERNEL */
|