diff options
author | wollman <wollman@FreeBSD.org> | 1997-08-16 19:16:27 +0000 |
---|---|---|
committer | wollman <wollman@FreeBSD.org> | 1997-08-16 19:16:27 +0000 |
commit | 4542c1cf5d7077caf33d6d9468f5e647cd9d19e5 (patch) | |
tree | 69fd093ef1e8c080592999507b664fe6315c0e10 /sys/nfsclient | |
parent | f4edc7fc6748272644fb845fc8636a5c261247d6 (diff) | |
download | FreeBSD-src-4542c1cf5d7077caf33d6d9468f5e647cd9d19e5.zip FreeBSD-src-4542c1cf5d7077caf33d6d9468f5e647cd9d19e5.tar.gz |
Fix all areas of the system (or at least all those in LINT) to avoid storing
socket addresses in mbufs. (Socket buffers are the one exception.) A number
of kernel APIs needed to get fixed in order to make this happen. Also,
fix three protocol families which kept PCBs in mbufs to not malloc them
instead. Delete some old compatibility cruft while we're at it, and add
some new routines in the in_cksum family.
Diffstat (limited to 'sys/nfsclient')
-rw-r--r-- | sys/nfsclient/bootp_subr.c | 36 | ||||
-rw-r--r-- | sys/nfsclient/krpc.h | 4 | ||||
-rw-r--r-- | sys/nfsclient/krpc_subr.c | 34 | ||||
-rw-r--r-- | sys/nfsclient/nfs.h | 133 | ||||
-rw-r--r-- | sys/nfsclient/nfs_nfsiod.c | 57 | ||||
-rw-r--r-- | sys/nfsclient/nfs_socket.c | 62 | ||||
-rw-r--r-- | sys/nfsclient/nfs_subs.c | 14 | ||||
-rw-r--r-- | sys/nfsclient/nfs_vfsops.c | 31 | ||||
-rw-r--r-- | sys/nfsclient/nfsargs.h | 133 | ||||
-rw-r--r-- | sys/nfsclient/nfsmount.h | 4 | ||||
-rw-r--r-- | sys/nfsclient/nfsstats.h | 133 |
11 files changed, 352 insertions, 289 deletions
diff --git a/sys/nfsclient/bootp_subr.c b/sys/nfsclient/bootp_subr.c index 3d0f587..b1fd716 100644 --- a/sys/nfsclient/bootp_subr.c +++ b/sys/nfsclient/bootp_subr.c @@ -1,4 +1,4 @@ -/* $Id: bootp_subr.c,v 1.3 1997/05/14 01:31:54 tegge Exp $ */ +/* $Id: bootp_subr.c,v 1.4 1997/06/12 14:08:20 tegge Exp $ */ /* * Copyright (c) 1995 Gordon Ross, Adam Glass @@ -260,16 +260,13 @@ bootpc_call(call,reply,procp) struct proc *procp; { struct socket *so; - struct sockaddr_in *sin,sa; - struct mbuf *m, *nam; + struct sockaddr_in *sin, sa; + struct mbuf *m; struct uio auio; struct iovec aio; int error, rcvflg, timo, secs, len; u_int tport; - /* Free at end if not null. */ - nam = NULL; - /* * Create socket and set its recieve timeout. */ @@ -310,14 +307,13 @@ bootpc_call(call,reply,procp) /* * Bind the local endpoint to a bootp client port. */ - m = m_getclr(M_WAIT, MT_SONAME); - sin = mtod(m, struct sockaddr_in *); - sin->sin_len = m->m_len = sizeof(*sin); + sin = &sa; + bzero(sin, sizeof *sin); + sin->sin_len = sizeof(*sin); sin->sin_family = AF_INET; sin->sin_addr.s_addr = INADDR_ANY; sin->sin_port = htons(IPPORT_BOOTPC); - error = sobind(so, m, procp); - m_freem(m); + error = sobind(so, (struct sockaddr *)sin, procp); if (error) { printf("bind failed\n"); goto out; @@ -326,19 +322,13 @@ bootpc_call(call,reply,procp) /* * Setup socket address for the server. */ - nam = m_get(M_WAIT, MT_SONAME); - if (nam == NULL) { - error = ENOBUFS; - goto out; - } - sin = mtod(nam, struct sockaddr_in *); - sin-> sin_len = sizeof(*sin); - sin-> sin_family = AF_INET; + sin = &sa; + bzero(sin, sizeof *sin); + sin->sin_len = sizeof(*sin); + sin->sin_family = AF_INET; sin->sin_addr.s_addr = INADDR_BROADCAST; sin->sin_port = htons(IPPORT_BOOTPS); - nam->m_len = sizeof(*sin); - /* * Send it, repeatedly, until a reply is received, * but delay each re-send by an increasing amount. @@ -359,7 +349,8 @@ bootpc_call(call,reply,procp) auio.uio_resid = sizeof(*call); auio.uio_procp = procp; - error = sosend(so, nam, &auio, NULL, NULL, 0); + error = sosend(so, (struct sockaddr *)sin, &auio, NULL, + NULL, 0, procp); if (error) { printf("bootpc_call: sosend: %d\n", error); goto out; @@ -427,7 +418,6 @@ bootpc_call(call,reply,procp) gotreply: out: - if (nam) m_freem(nam); soclose(so); return error; } diff --git a/sys/nfsclient/krpc.h b/sys/nfsclient/krpc.h index 88687ae..d847683 100644 --- a/sys/nfsclient/krpc.h +++ b/sys/nfsclient/krpc.h @@ -1,11 +1,11 @@ /* $NetBSD: krpc.h,v 1.4 1995/12/19 23:07:11 cgd Exp $ */ -/* $Id: krpc.h,v 1.2 1997/05/11 18:05:39 tegge Exp $ */ +/* $Id: krpc.h,v 1.3 1997/06/12 14:03:16 tegge Exp $ */ #include <sys/cdefs.h> int krpc_call __P((struct sockaddr_in *sin, u_int prog, u_int vers, u_int func, - struct mbuf **data, struct mbuf **from, struct proc *procp)); + struct mbuf **data, struct sockaddr **from, struct proc *procp)); int krpc_portmap __P((struct sockaddr_in *sin, u_int prog, u_int vers, u_int16_t *portp,struct proc *procp)); diff --git a/sys/nfsclient/krpc_subr.c b/sys/nfsclient/krpc_subr.c index e3eadb6..2d8ca1d 100644 --- a/sys/nfsclient/krpc_subr.c +++ b/sys/nfsclient/krpc_subr.c @@ -1,5 +1,5 @@ /* $NetBSD: krpc_subr.c,v 1.12.4.1 1996/06/07 00:52:26 cgd Exp $ */ -/* $Id: krpc_subr.c,v 1.2 1997/05/11 18:05:39 tegge Exp $ */ +/* $Id: krpc_subr.c,v 1.3 1997/06/12 14:03:16 tegge Exp $ */ /* * Copyright (c) 1995 Gordon Ross, Adam Glass @@ -192,12 +192,13 @@ krpc_call(sa, prog, vers, func, data, from_p, procp) struct sockaddr_in *sa; u_int prog, vers, func; struct mbuf **data; /* input/output */ - struct mbuf **from_p; /* output */ + struct sockaddr **from_p; /* output */ struct proc *procp; { struct socket *so; - struct sockaddr_in *sin; - struct mbuf *m, *nam, *mhead, *from; + struct sockaddr_in *sin, ssin; + struct sockaddr *from; + struct mbuf *m, *nam, *mhead; struct rpc_call *call; struct rpc_reply *reply; struct uio auio; @@ -258,19 +259,18 @@ krpc_call(sa, prog, vers, func, data, from_p, procp) * because some NFS servers refuse requests from * non-reserved (non-privileged) ports. */ - m = m_getclr(M_WAIT, MT_SONAME); - sin = mtod(m, struct sockaddr_in *); - sin->sin_len = m->m_len = sizeof(*sin); + sin = &ssin; + bzero(sin, sizeof *sin); + sin->sin_len = sizeof(*sin); sin->sin_family = AF_INET; sin->sin_addr.s_addr = INADDR_ANY; tport = IPPORT_RESERVED; do { tport--; sin->sin_port = htons(tport); - error = sobind(so, m, procp); + error = sobind(so, (struct sockaddr *)sin, procp); } while (error == EADDRINUSE && tport > IPPORT_RESERVED / 2); - m_freem(m); if (error) { printf("bind failed\n"); goto out; @@ -279,14 +279,6 @@ krpc_call(sa, prog, vers, func, data, from_p, procp) /* * Setup socket address for the server. */ - nam = m_get(M_WAIT, MT_SONAME); - if (nam == NULL) { - error = ENOBUFS; - goto out; - } - sin = mtod(nam, struct sockaddr_in *); - bcopy((caddr_t)sa, (caddr_t)sin, - (nam->m_len = sa->sin_len)); /* * Prepend RPC message header. @@ -336,7 +328,8 @@ krpc_call(sa, prog, vers, func, data, from_p, procp) error = ENOBUFS; goto out; } - error = sosend(so, nam, NULL, m, NULL, 0); + error = sosend(so, (struct sockaddr *)sa, NULL, m, + NULL, 0, 0); if (error) { printf("krpc_call: sosend: %d\n", error); goto out; @@ -357,7 +350,7 @@ krpc_call(sa, prog, vers, func, data, from_p, procp) secs = timo; while (secs > 0) { if (from) { - m_freem(from); + FREE(from, M_SONAME); from = NULL; } if (m) { @@ -445,9 +438,8 @@ krpc_call(sa, prog, vers, func, data, from_p, procp) } out: - if (nam) m_freem(nam); if (mhead) m_freem(mhead); - if (from) m_freem(from); + if (from) free(from, M_SONAME); soclose(so); return error; } diff --git a/sys/nfsclient/nfs.h b/sys/nfsclient/nfs.h index 528a366..e1a4755 100644 --- a/sys/nfsclient/nfs.h +++ b/sys/nfsclient/nfs.h @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs.h 8.4 (Berkeley) 5/1/95 - * $Id: nfs.h,v 1.28 1997/06/03 17:22:45 dfr Exp $ + * $Id: nfs.h,v 1.29 1997/07/16 09:06:27 dfr Exp $ */ #ifndef _NFS_NFS_H_ @@ -382,7 +382,7 @@ extern TAILQ_HEAD(nfs_reqq, nfsreq) nfs_reqq; */ union nethostaddr { u_long had_inetaddr; - struct mbuf *had_nam; + struct sockaddr *had_nam; }; struct nfsuid { @@ -406,7 +406,7 @@ struct nfsuid { struct nfsrv_rec { STAILQ_ENTRY(nfsrv_rec) nr_link; - struct mbuf *nr_address; + struct sockaddr *nr_address; struct mbuf *nr_packet; }; @@ -415,7 +415,7 @@ struct nfssvc_sock { TAILQ_HEAD(, nfsuid) ns_uidlruhead; struct file *ns_fp; struct socket *ns_so; - struct mbuf *ns_nam; + struct sockaddr *ns_nam; struct mbuf *ns_raw; struct mbuf *ns_rawend; STAILQ_HEAD(, nfsrv_rec) ns_rec; @@ -480,8 +480,8 @@ struct nfsrv_descript { struct mbuf *nd_mrep; /* Request mbuf list */ struct mbuf *nd_md; /* Current dissect mbuf */ struct mbuf *nd_mreq; /* Reply mbuf list */ - struct mbuf *nd_nam; /* and socket addr */ - struct mbuf *nd_nam2; /* return socket addr */ + struct sockaddr *nd_nam; /* and socket addr */ + struct sockaddr *nd_nam2; /* return socket addr */ caddr_t nd_dpos; /* Current dissect pos */ u_int32_t nd_procnum; /* RPC # */ int nd_stable; /* storage type */ @@ -567,70 +567,91 @@ extern int nfs_debug; int nfs_init __P((struct vfsconf *vfsp)); int nfs_reply __P((struct nfsreq *)); int nfs_getreq __P((struct nfsrv_descript *,struct nfsd *,int)); -int nfs_send __P((struct socket *,struct mbuf *,struct mbuf *,struct nfsreq *)); -int nfs_rephead __P((int,struct nfsrv_descript *,struct nfssvc_sock *,int,int,u_quad_t *,struct mbuf **,struct mbuf **,caddr_t *)); -int nfs_sndlock __P((int *,struct nfsreq *)); +int nfs_send __P((struct socket *, struct sockaddr *, struct mbuf *, + struct nfsreq *)); +int nfs_rephead __P((int, struct nfsrv_descript *, struct nfssvc_sock *, + int, int, u_quad_t *, struct mbuf **, struct mbuf **, + caddr_t *)); +int nfs_sndlock __P((int *, struct nfsreq *)); void nfs_sndunlock __P((int *flagp)); -int nfs_disct __P((struct mbuf **,caddr_t *,int,int,caddr_t *)); -int nfs_vinvalbuf __P((struct vnode *,int,struct ucred *,struct proc *,int)); -int nfs_readrpc __P((struct vnode *,struct uio *,struct ucred *)); -int nfs_writerpc __P((struct vnode *,struct uio *,struct ucred *,int *,int *)); -int nfs_readdirrpc __P((register struct vnode *,struct uio *,struct ucred *)); -int nfs_asyncio __P((struct buf *,struct ucred *)); -int nfs_doio __P((struct buf *,struct ucred *,struct proc *)); -int nfs_readlinkrpc __P((struct vnode *,struct uio *,struct ucred *)); -int nfs_sigintr __P((struct nfsmount *,struct nfsreq *r,struct proc *)); -int nfs_readdirplusrpc __P((struct vnode *,register struct uio *,struct ucred *)); -int nfsm_disct __P((struct mbuf **,caddr_t *,int,int,caddr_t *)); -void nfsm_srvfattr __P((struct nfsrv_descript *,struct vattr *,struct nfs_fattr *)); -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 **)); -int netaddr_match __P((int,union nethostaddr *,struct mbuf *)); -int nfs_request __P((struct vnode *,struct mbuf *,int,struct proc *,struct ucred *,struct mbuf **,struct mbuf **,caddr_t *)); -int nfs_loadattrcache __P((struct vnode **,struct mbuf **,caddr_t *,struct vattr *)); -int nfs_namei __P((struct nameidata *,fhandle_t *,int,struct nfssvc_sock *,struct mbuf *,struct mbuf **,caddr_t *,struct vnode **,struct proc *,int,int)); -void nfsm_adj __P((struct mbuf *,int,int)); -int nfsm_mbuftouio __P((struct mbuf **,struct uio *,int,caddr_t *)); +int nfs_disct __P((struct mbuf **, caddr_t *, int, int, caddr_t *)); +int nfs_vinvalbuf __P((struct vnode *, int, struct ucred *, struct proc *, + int)); +int nfs_readrpc __P((struct vnode *, struct uio *, struct ucred *)); +int nfs_writerpc __P((struct vnode *, struct uio *, struct ucred *, int *, + int *)); +int nfs_readdirrpc __P((struct vnode *, struct uio *, struct ucred *)); +int nfs_asyncio __P((struct buf *, struct ucred *)); +int nfs_doio __P((struct buf *, struct ucred *, struct proc *)); +int nfs_readlinkrpc __P((struct vnode *, struct uio *, struct ucred *)); +int nfs_sigintr __P((struct nfsmount *, struct nfsreq *, struct proc *)); +int nfs_readdirplusrpc __P((struct vnode *, struct uio *, struct ucred *)); +int nfsm_disct __P((struct mbuf **, caddr_t *, int, int, caddr_t *)); +void nfsm_srvfattr __P((struct nfsrv_descript *, struct vattr *, + struct nfs_fattr *)); +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 **)); +int netaddr_match __P((int, union nethostaddr *, struct sockaddr *)); +int nfs_request __P((struct vnode *, struct mbuf *, int, struct proc *, + struct ucred *, struct mbuf **, struct mbuf **, + caddr_t *)); +int nfs_loadattrcache __P((struct vnode **, struct mbuf **, caddr_t *, + struct vattr *)); +int nfs_namei __P((struct nameidata *, fhandle_t *, int, + struct nfssvc_sock *, struct sockaddr *, struct mbuf **, + caddr_t *, struct vnode **, struct proc *, int, int)); +void nfsm_adj __P((struct mbuf *, int, int)); +int nfsm_mbuftouio __P((struct mbuf **, struct uio *, int, caddr_t *)); void nfsrv_initcache __P((void)); -int nfs_getauth __P((struct nfsmount *,struct nfsreq *,struct ucred *,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 *)); -int nfs_adv __P((struct mbuf **,caddr_t *,int,int)); +int nfs_getauth __P((struct nfsmount *, struct nfsreq *, struct ucred *, + 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 *)); +int nfs_adv __P((struct mbuf **, caddr_t *, int, int)); void nfs_nhinit __P((void)); void nfs_timer __P((void*)); -u_long nfs_hash __P((nfsfh_t *,int)); -int nfsrv_dorec __P((struct nfssvc_sock *,struct nfsd *,struct nfsrv_descript **)); -int nfsrv_getcache __P((struct nfsrv_descript *,struct nfssvc_sock *,struct mbuf **)); -void nfsrv_updatecache __P((struct nfsrv_descript *,int,struct mbuf *)); +u_long nfs_hash __P((nfsfh_t *, int)); +int nfsrv_dorec __P((struct nfssvc_sock *, struct nfsd *, + struct nfsrv_descript **)); +int nfsrv_getcache __P((struct nfsrv_descript *, struct nfssvc_sock *, + struct mbuf **)); +void nfsrv_updatecache __P((struct nfsrv_descript *, int, struct mbuf *)); void nfsrv_cleancache __P((void)); -int nfs_connect __P((struct nfsmount *,struct nfsreq *)); +int nfs_connect __P((struct nfsmount *, struct nfsreq *)); void nfs_disconnect __P((struct nfsmount *)); -int nfs_getattrcache __P((struct vnode *,struct vattr *)); -int nfsm_strtmbuf __P((struct mbuf **,char **,char *,long)); -int nfs_bioread __P((struct vnode *,struct uio *,int,struct ucred *, int getpages)); -int nfsm_uiotombuf __P((struct uio *,struct mbuf **,int,caddr_t *)); +int nfs_getattrcache __P((struct vnode *, struct vattr *)); +int nfsm_strtmbuf __P((struct mbuf **, char **, char *, long)); +int nfs_bioread __P((struct vnode *, struct uio *, int, struct ucred *, + int)); +int nfsm_uiotombuf __P((struct uio *, struct mbuf **, int, caddr_t *)); void nfsrv_init __P((int)); void nfs_clearcommit __P((struct mount *)); int nfsrv_errmap __P((struct nfsrv_descript *, int)); -void nfsrvw_sort __P((gid_t [],int)); -void nfsrv_setcred __P((struct ucred *,struct ucred *)); -int nfs_writebp __P((struct buf *,int)); -int nfsrv_object_create __P(( struct vnode * )); +void nfsrvw_sort __P((gid_t *, int)); +void nfsrv_setcred __P((struct ucred *, struct ucred *)); +int nfs_writebp __P((struct buf *, int)); +int nfsrv_object_create __P((struct vnode *)); void nfsrv_wakenfsd __P((struct nfssvc_sock *slp)); int nfsrv_writegather __P((struct nfsrv_descript **, struct nfssvc_sock *, struct proc *, struct mbuf **)); int nfs_fsinfo __P((struct nfsmount *, struct vnode *, struct ucred *, struct proc *p)); -int nfsrv3_access __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, +int nfsrv3_access __P((struct nfsrv_descript *nfsd, + struct nfssvc_sock *slp, struct proc *procp, struct mbuf **mrq)); int nfsrv_commit __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, struct proc *procp, struct mbuf **mrq)); int nfsrv_create __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, struct proc *procp, struct mbuf **mrq)); -int nfsrv_fhtovp __P((fhandle_t *,int,struct vnode **, - struct ucred *,struct nfssvc_sock *,struct mbuf *, - int *,int,int)); +int nfsrv_fhtovp __P((fhandle_t *, int, struct vnode **, struct ucred *, + struct nfssvc_sock *, struct sockaddr *, int *, + int, int)); int nfsrv_setpublicfs __P((struct mount *, struct netexport *, struct export_args *)); int nfs_ispublicfh __P((fhandle_t *)); @@ -655,7 +676,8 @@ int nfsrv_pathconf __P((struct nfsrv_descript *nfsd, struct mbuf **mrq)); int nfsrv_read __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, struct proc *procp, struct mbuf **mrq)); -int nfsrv_readdir __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, +int nfsrv_readdir __P((struct nfsrv_descript *nfsd, + struct nfssvc_sock *slp, struct proc *procp, struct mbuf **mrq)); int nfsrv_readdirplus __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, struct proc *procp, @@ -669,11 +691,14 @@ int nfsrv_rename __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, struct proc *procp, struct mbuf **mrq)); int nfsrv_rmdir __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, struct proc *procp, struct mbuf **mrq)); -int nfsrv_setattr __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, +int nfsrv_setattr __P((struct nfsrv_descript *nfsd, + struct nfssvc_sock *slp, struct proc *procp, struct mbuf **mrq)); -int nfsrv_statfs __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, +int nfsrv_statfs __P((struct nfsrv_descript *nfsd, + struct nfssvc_sock *slp, struct proc *procp, struct mbuf **mrq)); -int nfsrv_symlink __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, +int nfsrv_symlink __P((struct nfsrv_descript *nfsd, + struct nfssvc_sock *slp, struct proc *procp, struct mbuf **mrq)); int nfsrv_write __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, struct proc *procp, struct mbuf **mrq)); diff --git a/sys/nfsclient/nfs_nfsiod.c b/sys/nfsclient/nfs_nfsiod.c index 0c46e28..ad93ce6 100644 --- a/sys/nfsclient/nfs_nfsiod.c +++ b/sys/nfsclient/nfs_nfsiod.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_syscalls.c 8.5 (Berkeley) 3/30/95 - * $Id: nfs_syscalls.c,v 1.25 1997/06/25 21:07:26 tegge Exp $ + * $Id: nfs_syscalls.c,v 1.26 1997/07/16 09:06:29 dfr Exp $ */ #include <sys/param.h> @@ -106,7 +106,7 @@ static int notstarted = 1; static int modify_flag = 0; static void nfsd_rt __P((int sotype, struct nfsrv_descript *nd, int cacherep)); -static int nfssvc_addsock __P((struct file *, struct mbuf *, +static int nfssvc_addsock __P((struct file *, struct sockaddr *, struct proc *)); static int nfssvc_nfsd __P((struct nfsd_srvargs *,caddr_t,struct proc *)); @@ -184,7 +184,7 @@ nfssvc(p, uap, retval) #ifndef NFS_NOSERVER struct nameidata nd; struct file *fp; - struct mbuf *nam; + struct sockaddr *nam; struct nfsd_args nfsdarg; struct nfsd_srvargs nfsd_srvargs, *nsd = &nfsd_srvargs; struct nfsd_cargs ncd; @@ -243,10 +243,10 @@ nfssvc(p, uap, retval) * Get the client address for connected sockets. */ if (nfsdarg.name == NULL || nfsdarg.namelen == 0) - nam = (struct mbuf *)0; + nam = (struct sockaddr *)0; else { - error = sockargs(&nam, nfsdarg.name, nfsdarg.namelen, - MT_SONAME); + error = getsockaddr(&nam, nfsdarg.name, + nfsdarg.namelen); if (error) return (error); } @@ -295,7 +295,7 @@ nfssvc(p, uap, retval) TAILQ_REMOVE(&slp->ns_uidlruhead, nuidp, nu_lru); if (nuidp->nu_flag & NU_NAM) - m_freem(nuidp->nu_nam); + FREE(nuidp->nu_nam, M_SONAME); } nuidp->nu_flag = 0; nuidp->nu_cr = nsd->nsd_cr; @@ -312,8 +312,8 @@ nfssvc(p, uap, retval) if (nfsd->nfsd_nd->nd_nam2) { struct sockaddr_in *saddr; - saddr = mtod(nfsd->nfsd_nd->nd_nam2, - struct sockaddr_in *); + saddr = (struct sockaddr_in *) + nfsd->nfsd_nd->nd_nam2; switch (saddr->sin_family) { case AF_INET: nuidp->nu_flag |= NU_INETADDR; @@ -323,9 +323,9 @@ nfssvc(p, uap, retval) case AF_ISO: default: nuidp->nu_flag |= NU_NAM; - nuidp->nu_nam = m_copym( - nfsd->nfsd_nd->nd_nam2, 0, - M_COPYALL, M_WAIT); + nuidp->nu_nam = + dup_sockaddr(nfsd->nfsd_nd-> + nd_nam2, 1); break; }; } @@ -356,7 +356,7 @@ nfssvc(p, uap, retval) static int nfssvc_addsock(fp, mynam, p) struct file *fp; - struct mbuf *mynam; + struct sockaddr *mynam; struct proc *p; { register struct mbuf *m; @@ -374,14 +374,14 @@ nfssvc_addsock(fp, mynam, p) if (so->so_proto->pr_protocol == IPPROTO_UDP) { tslp = nfs_udpsock; if (tslp->ns_flag & SLP_VALID) { - m_freem(mynam); + FREE(mynam, M_SONAME); return (EPERM); } #ifdef ISO } else if (so->so_proto->pr_protocol == ISOPROTO_CLTP) { tslp = nfs_cltpsock; if (tslp->ns_flag & SLP_VALID) { - m_freem(mynam); + FREE(mynam, M_SONAME); return (EPERM); } #endif /* ISO */ @@ -392,7 +392,7 @@ nfssvc_addsock(fp, mynam, p) siz = NFS_MAXPACKET; error = soreserve(so, siz, siz); if (error) { - m_freem(mynam); + FREE(mynam, M_SONAME); return (error); } @@ -564,8 +564,9 @@ nfssvc_nfsd(nsd, argp, p) */ if (nfsd->nfsd_flag & NFSD_NEEDAUTH) { nfsd->nfsd_flag &= ~NFSD_NEEDAUTH; - nsd->nsd_haddr = mtod(nd->nd_nam, - struct sockaddr_in *)->sin_addr.s_addr; + nsd->nsd_haddr = + ((struct sockaddr_in *) + nd->nd_nam)->sin_addr.s_addr; nsd->nsd_authlen = nfsd->nfsd_authlen; nsd->nsd_verflen = nfsd->nfsd_verflen; if (!copyout(nfsd->nfsd_authstr,nsd->nsd_authstr, @@ -607,10 +608,10 @@ nfssvc_nfsd(nsd, argp, p) /* Check if source port is privileged */ u_short port; u_long addr; - struct mbuf *nam = nd->nd_nam; + struct sockaddr *nam = nd->nd_nam; struct sockaddr_in *sin; - sin = mtod(nam, struct sockaddr_in *); + sin = (struct sockaddr_in *)nam; port = ntohs(sin->sin_port); if (port >= IPPORT_RESERVED && nd->nd_procnum != NFSPROC_NULL) { @@ -649,7 +650,7 @@ nfssvc_nfsd(nsd, argp, p) nfsstats.srv_errs++; nfsrv_updatecache(nd, FALSE, mreq); if (nd->nd_nam2) - m_freem(nd->nd_nam2); + FREE(nd->nd_nam2, M_SONAME); break; } nfsstats.srvrpccnt[nd->nd_procnum]++; @@ -688,7 +689,7 @@ nfssvc_nfsd(nsd, argp, p) if (nfsrtton) nfsd_rt(sotype, nd, cacherep); if (nd->nd_nam2) - MFREE(nd->nd_nam2, m); + FREE(nd->nd_nam2, M_SONAME); if (nd->nd_mrep) m_freem(nd->nd_mrep); if (error == EPIPE) @@ -706,7 +707,7 @@ nfssvc_nfsd(nsd, argp, p) if (nfsrtton) nfsd_rt(sotype, nd, cacherep); m_freem(nd->nd_mrep); - m_freem(nd->nd_nam2); + FREE(nd->nd_nam2, M_SONAME); break; }; if (nd) { @@ -857,12 +858,12 @@ nfsrv_zapsock(slp) soshutdown(so, 2); closef(fp, (struct proc *)0); if (slp->ns_nam) - MFREE(slp->ns_nam, m); + FREE(slp->ns_nam, M_SONAME); m_freem(slp->ns_raw); while (rec = STAILQ_FIRST(&slp->ns_rec)) { STAILQ_REMOVE_HEAD(&slp->ns_rec, nr_link); if (rec->nr_address) - m_freem(rec->nr_address); + FREE(rec->nr_address, M_SONAME); m_freem(rec->nr_packet); free(rec, M_NFSRVDESC); } @@ -872,7 +873,7 @@ nfsrv_zapsock(slp) LIST_REMOVE(nuidp, nu_hash); TAILQ_REMOVE(&slp->ns_uidlruhead, nuidp, nu_lru); if (nuidp->nu_flag & NU_NAM) - m_freem(nuidp->nu_nam); + FREE(nuidp->nu_nam, M_SONAME); free((caddr_t)nuidp, M_NFSUID); } s = splsoftclock(); @@ -1182,8 +1183,8 @@ nfsd_rt(sotype, nd, cacherep) else if (nd->nd_flag & ND_NFSV3) rt->flag |= DRT_NFSV3; rt->proc = nd->nd_procnum; - if (mtod(nd->nd_nam, struct sockaddr *)->sa_family == AF_INET) - rt->ipadr = mtod(nd->nd_nam, struct sockaddr_in *)->sin_addr.s_addr; + if (nd->nd_nam->sa_family == AF_INET) + rt->ipadr = ((struct sockaddr_in *)nd->nd_nam)->sin_addr.s_addr; else rt->ipadr = INADDR_ANY; rt->resptime = ((time.tv_sec - nd->nd_starttime.tv_sec) * 1000000) + diff --git a/sys/nfsclient/nfs_socket.c b/sys/nfsclient/nfs_socket.c index 0ea7f69..4b41e67 100644 --- a/sys/nfsclient/nfs_socket.c +++ b/sys/nfsclient/nfs_socket.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_socket.c 8.5 (Berkeley) 3/30/95 - * $Id: nfs_socket.c,v 1.25 1997/05/13 17:25:44 dfr Exp $ + * $Id: nfs_socket.c,v 1.26 1997/06/03 17:22:46 dfr Exp $ */ /* @@ -138,7 +138,7 @@ static int nfs_msg __P((struct proc *,char *,char *)); static int nfs_rcvlock __P((struct nfsreq *)); static void nfs_rcvunlock __P((int *flagp)); static void nfs_realign __P((struct mbuf *m, int hsiz)); -static int nfs_receive __P((struct nfsreq *rep, struct mbuf **aname, +static int nfs_receive __P((struct nfsreq *rep, struct sockaddr **aname, struct mbuf **mp)); static int nfs_reconnect __P((struct nfsreq *rep)); #ifndef NFS_NOSERVER @@ -195,7 +195,7 @@ nfs_connect(nmp, rep) struct proc *p = &proc0; /* only used for socreate and sobind */ nmp->nm_so = (struct socket *)0; - saddr = mtod(nmp->nm_nam, struct sockaddr *); + saddr = nmp->nm_nam; error = socreate(saddr->sa_family, &nmp->nm_so, nmp->nm_sotype, nmp->nm_soproto, p); if (error) @@ -207,17 +207,18 @@ nfs_connect(nmp, rep) * Some servers require that the client port be a reserved port number. */ if (saddr->sa_family == AF_INET && (nmp->nm_flag & NFSMNT_RESVPORT)) { - MGET(m, M_WAIT, MT_SONAME); - sin = mtod(m, struct sockaddr_in *); - sin->sin_len = m->m_len = sizeof (struct sockaddr_in); + struct sockaddr_in ssin; + bzero(&ssin, sizeof ssin); + sin = &ssin; + sin->sin_len = sizeof (struct sockaddr_in); sin->sin_family = AF_INET; sin->sin_addr.s_addr = INADDR_ANY; tport = IPPORT_RESERVED - 1; sin->sin_port = htons(tport); - while ((error = sobind(so, m, p)) == EADDRINUSE && + while ((error = sobind(so, (struct sockaddr *)sin, p)) + == EADDRINUSE && --tport > IPPORT_RESERVED / 2) sin->sin_port = htons(tport); - m_freem(m); if (error) goto bad; } @@ -232,6 +233,7 @@ nfs_connect(nmp, rep) goto bad; } } else { + /* XXX should not use mbuf */ error = soconnect(so, nmp->nm_nam, p); if (error) goto bad; @@ -383,11 +385,11 @@ nfs_disconnect(nmp) int nfs_send(so, nam, top, rep) register struct socket *so; - struct mbuf *nam; + struct sockaddr *nam; register struct mbuf *top; struct nfsreq *rep; { - struct mbuf *sendnam; + struct sockaddr *sendnam; int error, soflags, flags; if (rep) { @@ -405,7 +407,7 @@ nfs_send(so, nam, top, rep) } else soflags = so->so_proto->pr_flags; if ((soflags & PR_CONNREQUIRED) || (so->so_state & SS_ISCONNECTED)) - sendnam = (struct mbuf *)0; + sendnam = (struct sockaddr *)0; else sendnam = nam; if (so->so_type == SOCK_SEQPACKET) @@ -414,10 +416,11 @@ nfs_send(so, nam, top, rep) flags = 0; error = so->so_proto->pr_usrreqs->pru_sosend(so, sendnam, 0, top, 0, - flags); + flags, curproc /*XXX*/); if (error) { if (rep) { - log(LOG_INFO, "nfs send error %d for server %s\n",error, + log(LOG_INFO, "nfs send error %d for server %s\n", + error, rep->r_nmp->nm_mountp->mnt_stat.f_mntfromname); /* * Deal with errors for the client side. @@ -451,7 +454,7 @@ nfs_send(so, nam, top, rep) static int nfs_receive(rep, aname, mp) register struct nfsreq *rep; - struct mbuf **aname; + struct sockaddr **aname; struct mbuf **mp; { register struct socket *so; @@ -460,7 +463,7 @@ nfs_receive(rep, aname, mp) register struct mbuf *m; struct mbuf *control; u_long len; - struct mbuf **getnam; + struct sockaddr **getnam; int error, sotype, rcvflg; struct proc *p = curproc; /* XXX */ @@ -468,7 +471,7 @@ nfs_receive(rep, aname, mp) * Set up arguments for soreceive() */ *mp = (struct mbuf *)0; - *aname = (struct mbuf *)0; + *aname = (struct sockaddr *)0; sotype = rep->r_nmp->nm_sotype; /* @@ -533,7 +536,7 @@ tryagain: do { rcvflg = MSG_WAITALL; error = so->so_proto->pr_usrreqs->pru_soreceive - (so, (struct mbuf **)0, &auio, + (so, (struct sockaddr **)0, &auio, (struct mbuf **)0, (struct mbuf **)0, &rcvflg); if (error == EWOULDBLOCK && rep) { @@ -568,7 +571,7 @@ tryagain: do { rcvflg = MSG_WAITALL; error = so->so_proto->pr_usrreqs->pru_soreceive - (so, (struct mbuf **)0, + (so, (struct sockaddr **)0, &auio, mp, (struct mbuf **)0, &rcvflg); } while (error == EWOULDBLOCK || error == EINTR || error == ERESTART); @@ -593,7 +596,7 @@ tryagain: do { rcvflg = 0; error = so->so_proto->pr_usrreqs->pru_soreceive - (so, (struct mbuf **)0, + (so, (struct sockaddr **)0, &auio, mp, &control, &rcvflg); if (control) m_freem(control); @@ -628,7 +631,7 @@ errout: if ((so = rep->r_nmp->nm_so) == NULL) return (EACCES); if (so->so_state & SS_ISCONNECTED) - getnam = (struct mbuf **)0; + getnam = (struct sockaddr **)0; else getnam = aname; auio.uio_resid = len = 1000000; @@ -671,7 +674,8 @@ nfs_reply(myrep) register struct nfsreq *rep; register struct nfsmount *nmp = myrep->r_nmp; register long t1; - struct mbuf *mrep, *nam, *md; + struct mbuf *mrep, *md; + struct sockaddr *nam; u_long rxid, *tl; caddr_t dpos, cp2; int error; @@ -715,7 +719,7 @@ nfs_reply(myrep) return (error); } if (nam) - m_freem(nam); + FREE(nam, M_SONAME); /* * Get the xid and check that it is an rpc reply @@ -1356,7 +1360,7 @@ nfs_timer(arg) (m = m_copym(rep->r_mreq, 0, M_COPYALL, M_DONTWAIT))){ if ((nmp->nm_flag & NFSMNT_NOCONN) == 0) error = (*so->so_proto->pr_usrreqs->pru_send) - (so, 0, m, (struct mbuf *)0, + (so, 0, m, (struct sockaddr *)0, (struct mbuf *)0, p); else error = (*so->so_proto->pr_usrreqs->pru_send) @@ -1642,7 +1646,8 @@ nfsrv_rcv(so, arg, waitflag) { register struct nfssvc_sock *slp = (struct nfssvc_sock *)arg; register struct mbuf *m; - struct mbuf *mp, *nam; + struct mbuf *mp; + struct sockaddr *nam; struct uio auio; int flags, error; @@ -1717,7 +1722,7 @@ nfsrv_rcv(so, arg, waitflag) M_NFSRVDESC, waitflag); if (!rec) { if (nam) - m_freem(nam); + FREE(nam, M_SONAME); m_freem(mp); continue; } @@ -1864,7 +1869,7 @@ nfsrv_getstream(slp, waitflag) m_freem(slp->ns_frag); } else { nfs_realign(slp->ns_frag, 10 * NFSX_UNSIGNED); - rec->nr_address = (struct mbuf*)0; + rec->nr_address = (struct sockaddr *)0; rec->nr_packet = slp->ns_frag; STAILQ_INSERT_TAIL(&slp->ns_rec, rec, nr_link); } @@ -1883,7 +1888,8 @@ nfsrv_dorec(slp, nfsd, ndp) struct nfsrv_descript **ndp; { struct nfsrv_rec *rec; - register struct mbuf *m, *nam; + register struct mbuf *m; + struct sockaddr *nam; register struct nfsrv_descript *nd; int error; @@ -1902,7 +1908,7 @@ nfsrv_dorec(slp, nfsd, ndp) nd->nd_dpos = mtod(m, caddr_t); error = nfs_getreq(nd, nfsd, TRUE); if (error) { - m_freem(nam); + FREE(nam, M_SONAME); free((caddr_t)nd, M_NFSRVDESC); return (error); } diff --git a/sys/nfsclient/nfs_subs.c b/sys/nfsclient/nfs_subs.c index 4c102c8..69baccb 100644 --- a/sys/nfsclient/nfs_subs.c +++ b/sys/nfsclient/nfs_subs.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_subs.c 8.3 (Berkeley) 1/4/94 - * $Id: nfs_subs.c,v 1.39 1997/07/16 09:06:29 dfr Exp $ + * $Id: nfs_subs.c,v 1.40 1997/07/22 15:35:57 dfr Exp $ */ /* @@ -1429,7 +1429,7 @@ nfs_namei(ndp, fhp, len, slp, nam, mdp, dposp, retdirp, p, kerbflag, pubflag) fhandle_t *fhp; int len; struct nfssvc_sock *slp; - struct mbuf *nam; + struct sockaddr *nam; struct mbuf **mdp; caddr_t *dposp; struct vnode **retdirp; @@ -1840,7 +1840,7 @@ nfsrv_fhtovp(fhp, lockflag, vpp, cred, slp, nam, rdonlyp, kerbflag, pubflag) struct vnode **vpp; struct ucred *cred; struct nfssvc_sock *slp; - struct mbuf *nam; + struct sockaddr *nam; int *rdonlyp; int kerbflag; int pubflag; @@ -1925,13 +1925,13 @@ int netaddr_match(family, haddr, nam) int family; union nethostaddr *haddr; - struct mbuf *nam; + struct sockaddr *nam; { register struct sockaddr_in *inetaddr; switch (family) { case AF_INET: - inetaddr = mtod(nam, struct sockaddr_in *); + inetaddr = (struct sockaddr_in *)nam; if (inetaddr->sin_family == AF_INET && inetaddr->sin_addr.s_addr == haddr->had_inetaddr) return (1); @@ -1941,8 +1941,8 @@ netaddr_match(family, haddr, nam) { register struct sockaddr_iso *isoaddr1, *isoaddr2; - isoaddr1 = mtod(nam, struct sockaddr_iso *); - isoaddr2 = mtod(haddr->had_nam, struct sockaddr_iso *); + isoaddr1 = (struct sockaddr_iso *)nam; + isoaddr2 = (struct sockaddr_iso *)haddr->had_nam; if (isoaddr1->siso_family == AF_ISO && isoaddr1->siso_nlen > 0 && isoaddr1->siso_nlen == isoaddr2->siso_nlen && diff --git a/sys/nfsclient/nfs_vfsops.c b/sys/nfsclient/nfs_vfsops.c index f867948..12f168c 100644 --- a/sys/nfsclient/nfs_vfsops.c +++ b/sys/nfsclient/nfs_vfsops.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_vfsops.c 8.12 (Berkeley) 5/20/95 - * $Id: nfs_vfsops.c,v 1.43 1997/06/03 17:22:47 dfr Exp $ + * $Id: nfs_vfsops.c,v 1.44 1997/06/27 19:10:46 wpaul Exp $ */ #include <sys/param.h> @@ -86,7 +86,7 @@ SYSCTL_INT(_vfs_nfs, OID_AUTO, debug, CTLFLAG_RW, &nfs_debug, 0, ""); static int nfs_iosize __P((struct nfsmount *nmp)); static int mountnfs __P((struct nfs_args *,struct mount *, - struct mbuf *,char *,char *,struct vnode **)); + struct sockaddr *,char *,char *,struct vnode **)); static int nfs_mount __P(( struct mount *mp, char *path, caddr_t data, struct nameidata *ndp, struct proc *p)); static int nfs_start __P(( struct mount *mp, int flags, @@ -102,7 +102,7 @@ static int nfs_sync __P(( struct mount *mp, int waitfor, struct ucred *cred, struct proc *p)); static int nfs_vptofh __P(( struct vnode *vp, struct fid *fhp)); static int nfs_fhtovp __P((struct mount *mp, struct fid *fhp, - struct mbuf *nam, struct vnode **vpp, + struct sockaddr *nam, struct vnode **vpp, int *exflagsp, struct ucred **credanonp)); static int nfs_vget __P((struct mount *, ino_t, struct vnode **)); @@ -557,25 +557,24 @@ nfs_mountdiskless(path, which, mountflag, sin, args, p, vpp, mpp) struct mount **mpp; { struct mount *mp; - struct mbuf *m; + struct sockaddr *nam; int error; mp = *mpp; - if (!mp && ( error = vfs_rootmountalloc("nfs", path, &mp))) { + if (!mp && (error = vfs_rootmountalloc("nfs", path, &mp))) { printf("nfs_mountroot: NFS not configured"); return (error); } mp->mnt_flag = mountflag; - MGET(m, MT_SONAME, M_WAITOK); - bcopy((caddr_t)sin, mtod(m, caddr_t), sin->sin_len); - m->m_len = sin->sin_len; - if (error = mountnfs(args, mp, m, which, path, vpp)) { + nam = dup_sockaddr((struct sockaddr *)sin, 1); + if (error = mountnfs(args, mp, nam, which, path, vpp)) { printf("nfs_mountroot: mount %s on %s: %d", path, which, error); mp->mnt_vfc->vfc_refcount--; vfs_unbusy(mp, p); free(mp, M_MOUNT); + FREE(nam, M_SONAME); return (error); } (void) copystr(which, mp->mnt_stat.f_mntonname, MNAMELEN - 1, 0); @@ -603,7 +602,7 @@ nfs_mount(mp, path, data, ndp, p) { int error; struct nfs_args args; - struct mbuf *nam; + struct sockaddr *nam; struct vnode *vp; char pth[MNAMELEN], hst[MNAMELEN]; u_int len; @@ -644,7 +643,7 @@ nfs_mount(mp, path, data, ndp, p) return (error); bzero(&hst[len], MNAMELEN - len); /* sockargs() call must be after above copyin() calls */ - error = sockargs(&nam, (caddr_t)args.addr, args.addrlen, MT_SONAME); + error = getsockaddr(&nam, (caddr_t)args.addr, args.addrlen); if (error) return (error); args.fh = nfh; @@ -659,7 +658,7 @@ static int mountnfs(argp, mp, nam, pth, hst, vpp) register struct nfs_args *argp; register struct mount *mp; - struct mbuf *nam; + struct sockaddr *nam; char *pth, *hst; struct vnode **vpp; { @@ -671,7 +670,7 @@ mountnfs(argp, mp, nam, pth, hst, vpp) if (mp->mnt_flag & MNT_UPDATE) { nmp = VFSTONFS(mp); /* update paths, file handles, etc, here XXX */ - m_freem(nam); + FREE(nam, M_SONAME); return (0); } else { MALLOC(nmp, struct nfsmount *, sizeof (struct nfsmount), @@ -829,7 +828,7 @@ mountnfs(argp, mp, nam, pth, hst, vpp) bad: nfs_disconnect(nmp); free((caddr_t)nmp, M_NFSMNT); - m_freem(nam); + FREE(nam, M_SONAME); return (error); } @@ -900,7 +899,7 @@ nfs_unmount(mp, mntflags, p) vrele(vp); vgone(vp); nfs_disconnect(nmp); - m_freem(nmp->nm_nam); + FREE(nmp->nm_nam, M_SONAME); if ((nmp->nm_flag & (NFSMNT_NQNFS | NFSMNT_KERB)) == 0) free((caddr_t)nmp, M_NFSMNT); @@ -996,7 +995,7 @@ static int nfs_fhtovp(mp, fhp, nam, vpp, exflagsp, credanonp) register struct mount *mp; struct fid *fhp; - struct mbuf *nam; + struct sockaddr *nam; struct vnode **vpp; int *exflagsp; struct ucred **credanonp; diff --git a/sys/nfsclient/nfsargs.h b/sys/nfsclient/nfsargs.h index 528a366..e1a4755 100644 --- a/sys/nfsclient/nfsargs.h +++ b/sys/nfsclient/nfsargs.h @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs.h 8.4 (Berkeley) 5/1/95 - * $Id: nfs.h,v 1.28 1997/06/03 17:22:45 dfr Exp $ + * $Id: nfs.h,v 1.29 1997/07/16 09:06:27 dfr Exp $ */ #ifndef _NFS_NFS_H_ @@ -382,7 +382,7 @@ extern TAILQ_HEAD(nfs_reqq, nfsreq) nfs_reqq; */ union nethostaddr { u_long had_inetaddr; - struct mbuf *had_nam; + struct sockaddr *had_nam; }; struct nfsuid { @@ -406,7 +406,7 @@ struct nfsuid { struct nfsrv_rec { STAILQ_ENTRY(nfsrv_rec) nr_link; - struct mbuf *nr_address; + struct sockaddr *nr_address; struct mbuf *nr_packet; }; @@ -415,7 +415,7 @@ struct nfssvc_sock { TAILQ_HEAD(, nfsuid) ns_uidlruhead; struct file *ns_fp; struct socket *ns_so; - struct mbuf *ns_nam; + struct sockaddr *ns_nam; struct mbuf *ns_raw; struct mbuf *ns_rawend; STAILQ_HEAD(, nfsrv_rec) ns_rec; @@ -480,8 +480,8 @@ struct nfsrv_descript { struct mbuf *nd_mrep; /* Request mbuf list */ struct mbuf *nd_md; /* Current dissect mbuf */ struct mbuf *nd_mreq; /* Reply mbuf list */ - struct mbuf *nd_nam; /* and socket addr */ - struct mbuf *nd_nam2; /* return socket addr */ + struct sockaddr *nd_nam; /* and socket addr */ + struct sockaddr *nd_nam2; /* return socket addr */ caddr_t nd_dpos; /* Current dissect pos */ u_int32_t nd_procnum; /* RPC # */ int nd_stable; /* storage type */ @@ -567,70 +567,91 @@ extern int nfs_debug; int nfs_init __P((struct vfsconf *vfsp)); int nfs_reply __P((struct nfsreq *)); int nfs_getreq __P((struct nfsrv_descript *,struct nfsd *,int)); -int nfs_send __P((struct socket *,struct mbuf *,struct mbuf *,struct nfsreq *)); -int nfs_rephead __P((int,struct nfsrv_descript *,struct nfssvc_sock *,int,int,u_quad_t *,struct mbuf **,struct mbuf **,caddr_t *)); -int nfs_sndlock __P((int *,struct nfsreq *)); +int nfs_send __P((struct socket *, struct sockaddr *, struct mbuf *, + struct nfsreq *)); +int nfs_rephead __P((int, struct nfsrv_descript *, struct nfssvc_sock *, + int, int, u_quad_t *, struct mbuf **, struct mbuf **, + caddr_t *)); +int nfs_sndlock __P((int *, struct nfsreq *)); void nfs_sndunlock __P((int *flagp)); -int nfs_disct __P((struct mbuf **,caddr_t *,int,int,caddr_t *)); -int nfs_vinvalbuf __P((struct vnode *,int,struct ucred *,struct proc *,int)); -int nfs_readrpc __P((struct vnode *,struct uio *,struct ucred *)); -int nfs_writerpc __P((struct vnode *,struct uio *,struct ucred *,int *,int *)); -int nfs_readdirrpc __P((register struct vnode *,struct uio *,struct ucred *)); -int nfs_asyncio __P((struct buf *,struct ucred *)); -int nfs_doio __P((struct buf *,struct ucred *,struct proc *)); -int nfs_readlinkrpc __P((struct vnode *,struct uio *,struct ucred *)); -int nfs_sigintr __P((struct nfsmount *,struct nfsreq *r,struct proc *)); -int nfs_readdirplusrpc __P((struct vnode *,register struct uio *,struct ucred *)); -int nfsm_disct __P((struct mbuf **,caddr_t *,int,int,caddr_t *)); -void nfsm_srvfattr __P((struct nfsrv_descript *,struct vattr *,struct nfs_fattr *)); -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 **)); -int netaddr_match __P((int,union nethostaddr *,struct mbuf *)); -int nfs_request __P((struct vnode *,struct mbuf *,int,struct proc *,struct ucred *,struct mbuf **,struct mbuf **,caddr_t *)); -int nfs_loadattrcache __P((struct vnode **,struct mbuf **,caddr_t *,struct vattr *)); -int nfs_namei __P((struct nameidata *,fhandle_t *,int,struct nfssvc_sock *,struct mbuf *,struct mbuf **,caddr_t *,struct vnode **,struct proc *,int,int)); -void nfsm_adj __P((struct mbuf *,int,int)); -int nfsm_mbuftouio __P((struct mbuf **,struct uio *,int,caddr_t *)); +int nfs_disct __P((struct mbuf **, caddr_t *, int, int, caddr_t *)); +int nfs_vinvalbuf __P((struct vnode *, int, struct ucred *, struct proc *, + int)); +int nfs_readrpc __P((struct vnode *, struct uio *, struct ucred *)); +int nfs_writerpc __P((struct vnode *, struct uio *, struct ucred *, int *, + int *)); +int nfs_readdirrpc __P((struct vnode *, struct uio *, struct ucred *)); +int nfs_asyncio __P((struct buf *, struct ucred *)); +int nfs_doio __P((struct buf *, struct ucred *, struct proc *)); +int nfs_readlinkrpc __P((struct vnode *, struct uio *, struct ucred *)); +int nfs_sigintr __P((struct nfsmount *, struct nfsreq *, struct proc *)); +int nfs_readdirplusrpc __P((struct vnode *, struct uio *, struct ucred *)); +int nfsm_disct __P((struct mbuf **, caddr_t *, int, int, caddr_t *)); +void nfsm_srvfattr __P((struct nfsrv_descript *, struct vattr *, + struct nfs_fattr *)); +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 **)); +int netaddr_match __P((int, union nethostaddr *, struct sockaddr *)); +int nfs_request __P((struct vnode *, struct mbuf *, int, struct proc *, + struct ucred *, struct mbuf **, struct mbuf **, + caddr_t *)); +int nfs_loadattrcache __P((struct vnode **, struct mbuf **, caddr_t *, + struct vattr *)); +int nfs_namei __P((struct nameidata *, fhandle_t *, int, + struct nfssvc_sock *, struct sockaddr *, struct mbuf **, + caddr_t *, struct vnode **, struct proc *, int, int)); +void nfsm_adj __P((struct mbuf *, int, int)); +int nfsm_mbuftouio __P((struct mbuf **, struct uio *, int, caddr_t *)); void nfsrv_initcache __P((void)); -int nfs_getauth __P((struct nfsmount *,struct nfsreq *,struct ucred *,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 *)); -int nfs_adv __P((struct mbuf **,caddr_t *,int,int)); +int nfs_getauth __P((struct nfsmount *, struct nfsreq *, struct ucred *, + 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 *)); +int nfs_adv __P((struct mbuf **, caddr_t *, int, int)); void nfs_nhinit __P((void)); void nfs_timer __P((void*)); -u_long nfs_hash __P((nfsfh_t *,int)); -int nfsrv_dorec __P((struct nfssvc_sock *,struct nfsd *,struct nfsrv_descript **)); -int nfsrv_getcache __P((struct nfsrv_descript *,struct nfssvc_sock *,struct mbuf **)); -void nfsrv_updatecache __P((struct nfsrv_descript *,int,struct mbuf *)); +u_long nfs_hash __P((nfsfh_t *, int)); +int nfsrv_dorec __P((struct nfssvc_sock *, struct nfsd *, + struct nfsrv_descript **)); +int nfsrv_getcache __P((struct nfsrv_descript *, struct nfssvc_sock *, + struct mbuf **)); +void nfsrv_updatecache __P((struct nfsrv_descript *, int, struct mbuf *)); void nfsrv_cleancache __P((void)); -int nfs_connect __P((struct nfsmount *,struct nfsreq *)); +int nfs_connect __P((struct nfsmount *, struct nfsreq *)); void nfs_disconnect __P((struct nfsmount *)); -int nfs_getattrcache __P((struct vnode *,struct vattr *)); -int nfsm_strtmbuf __P((struct mbuf **,char **,char *,long)); -int nfs_bioread __P((struct vnode *,struct uio *,int,struct ucred *, int getpages)); -int nfsm_uiotombuf __P((struct uio *,struct mbuf **,int,caddr_t *)); +int nfs_getattrcache __P((struct vnode *, struct vattr *)); +int nfsm_strtmbuf __P((struct mbuf **, char **, char *, long)); +int nfs_bioread __P((struct vnode *, struct uio *, int, struct ucred *, + int)); +int nfsm_uiotombuf __P((struct uio *, struct mbuf **, int, caddr_t *)); void nfsrv_init __P((int)); void nfs_clearcommit __P((struct mount *)); int nfsrv_errmap __P((struct nfsrv_descript *, int)); -void nfsrvw_sort __P((gid_t [],int)); -void nfsrv_setcred __P((struct ucred *,struct ucred *)); -int nfs_writebp __P((struct buf *,int)); -int nfsrv_object_create __P(( struct vnode * )); +void nfsrvw_sort __P((gid_t *, int)); +void nfsrv_setcred __P((struct ucred *, struct ucred *)); +int nfs_writebp __P((struct buf *, int)); +int nfsrv_object_create __P((struct vnode *)); void nfsrv_wakenfsd __P((struct nfssvc_sock *slp)); int nfsrv_writegather __P((struct nfsrv_descript **, struct nfssvc_sock *, struct proc *, struct mbuf **)); int nfs_fsinfo __P((struct nfsmount *, struct vnode *, struct ucred *, struct proc *p)); -int nfsrv3_access __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, +int nfsrv3_access __P((struct nfsrv_descript *nfsd, + struct nfssvc_sock *slp, struct proc *procp, struct mbuf **mrq)); int nfsrv_commit __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, struct proc *procp, struct mbuf **mrq)); int nfsrv_create __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, struct proc *procp, struct mbuf **mrq)); -int nfsrv_fhtovp __P((fhandle_t *,int,struct vnode **, - struct ucred *,struct nfssvc_sock *,struct mbuf *, - int *,int,int)); +int nfsrv_fhtovp __P((fhandle_t *, int, struct vnode **, struct ucred *, + struct nfssvc_sock *, struct sockaddr *, int *, + int, int)); int nfsrv_setpublicfs __P((struct mount *, struct netexport *, struct export_args *)); int nfs_ispublicfh __P((fhandle_t *)); @@ -655,7 +676,8 @@ int nfsrv_pathconf __P((struct nfsrv_descript *nfsd, struct mbuf **mrq)); int nfsrv_read __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, struct proc *procp, struct mbuf **mrq)); -int nfsrv_readdir __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, +int nfsrv_readdir __P((struct nfsrv_descript *nfsd, + struct nfssvc_sock *slp, struct proc *procp, struct mbuf **mrq)); int nfsrv_readdirplus __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, struct proc *procp, @@ -669,11 +691,14 @@ int nfsrv_rename __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, struct proc *procp, struct mbuf **mrq)); int nfsrv_rmdir __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, struct proc *procp, struct mbuf **mrq)); -int nfsrv_setattr __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, +int nfsrv_setattr __P((struct nfsrv_descript *nfsd, + struct nfssvc_sock *slp, struct proc *procp, struct mbuf **mrq)); -int nfsrv_statfs __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, +int nfsrv_statfs __P((struct nfsrv_descript *nfsd, + struct nfssvc_sock *slp, struct proc *procp, struct mbuf **mrq)); -int nfsrv_symlink __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, +int nfsrv_symlink __P((struct nfsrv_descript *nfsd, + struct nfssvc_sock *slp, struct proc *procp, struct mbuf **mrq)); int nfsrv_write __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, struct proc *procp, struct mbuf **mrq)); diff --git a/sys/nfsclient/nfsmount.h b/sys/nfsclient/nfsmount.h index d119a20..63de0ad 100644 --- a/sys/nfsclient/nfsmount.h +++ b/sys/nfsclient/nfsmount.h @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfsmount.h 8.3 (Berkeley) 3/30/95 - * $Id: nfsmount.h,v 1.11 1997/02/22 09:42:48 peter Exp $ + * $Id: nfsmount.h,v 1.12 1997/05/10 16:12:03 dfr Exp $ */ @@ -56,7 +56,7 @@ struct nfsmount { int nm_sotype; /* Type of socket */ int nm_soproto; /* and protocol */ int nm_soflags; /* pr_flags for socket protocol */ - struct mbuf *nm_nam; /* Addr of server */ + struct sockaddr *nm_nam; /* Addr of server */ int nm_timeo; /* Init timer for NFSMNT_DUMBTIMR */ int nm_retry; /* Max retries */ int nm_srtt[4]; /* Timers for rpcs */ diff --git a/sys/nfsclient/nfsstats.h b/sys/nfsclient/nfsstats.h index 528a366..e1a4755 100644 --- a/sys/nfsclient/nfsstats.h +++ b/sys/nfsclient/nfsstats.h @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs.h 8.4 (Berkeley) 5/1/95 - * $Id: nfs.h,v 1.28 1997/06/03 17:22:45 dfr Exp $ + * $Id: nfs.h,v 1.29 1997/07/16 09:06:27 dfr Exp $ */ #ifndef _NFS_NFS_H_ @@ -382,7 +382,7 @@ extern TAILQ_HEAD(nfs_reqq, nfsreq) nfs_reqq; */ union nethostaddr { u_long had_inetaddr; - struct mbuf *had_nam; + struct sockaddr *had_nam; }; struct nfsuid { @@ -406,7 +406,7 @@ struct nfsuid { struct nfsrv_rec { STAILQ_ENTRY(nfsrv_rec) nr_link; - struct mbuf *nr_address; + struct sockaddr *nr_address; struct mbuf *nr_packet; }; @@ -415,7 +415,7 @@ struct nfssvc_sock { TAILQ_HEAD(, nfsuid) ns_uidlruhead; struct file *ns_fp; struct socket *ns_so; - struct mbuf *ns_nam; + struct sockaddr *ns_nam; struct mbuf *ns_raw; struct mbuf *ns_rawend; STAILQ_HEAD(, nfsrv_rec) ns_rec; @@ -480,8 +480,8 @@ struct nfsrv_descript { struct mbuf *nd_mrep; /* Request mbuf list */ struct mbuf *nd_md; /* Current dissect mbuf */ struct mbuf *nd_mreq; /* Reply mbuf list */ - struct mbuf *nd_nam; /* and socket addr */ - struct mbuf *nd_nam2; /* return socket addr */ + struct sockaddr *nd_nam; /* and socket addr */ + struct sockaddr *nd_nam2; /* return socket addr */ caddr_t nd_dpos; /* Current dissect pos */ u_int32_t nd_procnum; /* RPC # */ int nd_stable; /* storage type */ @@ -567,70 +567,91 @@ extern int nfs_debug; int nfs_init __P((struct vfsconf *vfsp)); int nfs_reply __P((struct nfsreq *)); int nfs_getreq __P((struct nfsrv_descript *,struct nfsd *,int)); -int nfs_send __P((struct socket *,struct mbuf *,struct mbuf *,struct nfsreq *)); -int nfs_rephead __P((int,struct nfsrv_descript *,struct nfssvc_sock *,int,int,u_quad_t *,struct mbuf **,struct mbuf **,caddr_t *)); -int nfs_sndlock __P((int *,struct nfsreq *)); +int nfs_send __P((struct socket *, struct sockaddr *, struct mbuf *, + struct nfsreq *)); +int nfs_rephead __P((int, struct nfsrv_descript *, struct nfssvc_sock *, + int, int, u_quad_t *, struct mbuf **, struct mbuf **, + caddr_t *)); +int nfs_sndlock __P((int *, struct nfsreq *)); void nfs_sndunlock __P((int *flagp)); -int nfs_disct __P((struct mbuf **,caddr_t *,int,int,caddr_t *)); -int nfs_vinvalbuf __P((struct vnode *,int,struct ucred *,struct proc *,int)); -int nfs_readrpc __P((struct vnode *,struct uio *,struct ucred *)); -int nfs_writerpc __P((struct vnode *,struct uio *,struct ucred *,int *,int *)); -int nfs_readdirrpc __P((register struct vnode *,struct uio *,struct ucred *)); -int nfs_asyncio __P((struct buf *,struct ucred *)); -int nfs_doio __P((struct buf *,struct ucred *,struct proc *)); -int nfs_readlinkrpc __P((struct vnode *,struct uio *,struct ucred *)); -int nfs_sigintr __P((struct nfsmount *,struct nfsreq *r,struct proc *)); -int nfs_readdirplusrpc __P((struct vnode *,register struct uio *,struct ucred *)); -int nfsm_disct __P((struct mbuf **,caddr_t *,int,int,caddr_t *)); -void nfsm_srvfattr __P((struct nfsrv_descript *,struct vattr *,struct nfs_fattr *)); -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 **)); -int netaddr_match __P((int,union nethostaddr *,struct mbuf *)); -int nfs_request __P((struct vnode *,struct mbuf *,int,struct proc *,struct ucred *,struct mbuf **,struct mbuf **,caddr_t *)); -int nfs_loadattrcache __P((struct vnode **,struct mbuf **,caddr_t *,struct vattr *)); -int nfs_namei __P((struct nameidata *,fhandle_t *,int,struct nfssvc_sock *,struct mbuf *,struct mbuf **,caddr_t *,struct vnode **,struct proc *,int,int)); -void nfsm_adj __P((struct mbuf *,int,int)); -int nfsm_mbuftouio __P((struct mbuf **,struct uio *,int,caddr_t *)); +int nfs_disct __P((struct mbuf **, caddr_t *, int, int, caddr_t *)); +int nfs_vinvalbuf __P((struct vnode *, int, struct ucred *, struct proc *, + int)); +int nfs_readrpc __P((struct vnode *, struct uio *, struct ucred *)); +int nfs_writerpc __P((struct vnode *, struct uio *, struct ucred *, int *, + int *)); +int nfs_readdirrpc __P((struct vnode *, struct uio *, struct ucred *)); +int nfs_asyncio __P((struct buf *, struct ucred *)); +int nfs_doio __P((struct buf *, struct ucred *, struct proc *)); +int nfs_readlinkrpc __P((struct vnode *, struct uio *, struct ucred *)); +int nfs_sigintr __P((struct nfsmount *, struct nfsreq *, struct proc *)); +int nfs_readdirplusrpc __P((struct vnode *, struct uio *, struct ucred *)); +int nfsm_disct __P((struct mbuf **, caddr_t *, int, int, caddr_t *)); +void nfsm_srvfattr __P((struct nfsrv_descript *, struct vattr *, + struct nfs_fattr *)); +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 **)); +int netaddr_match __P((int, union nethostaddr *, struct sockaddr *)); +int nfs_request __P((struct vnode *, struct mbuf *, int, struct proc *, + struct ucred *, struct mbuf **, struct mbuf **, + caddr_t *)); +int nfs_loadattrcache __P((struct vnode **, struct mbuf **, caddr_t *, + struct vattr *)); +int nfs_namei __P((struct nameidata *, fhandle_t *, int, + struct nfssvc_sock *, struct sockaddr *, struct mbuf **, + caddr_t *, struct vnode **, struct proc *, int, int)); +void nfsm_adj __P((struct mbuf *, int, int)); +int nfsm_mbuftouio __P((struct mbuf **, struct uio *, int, caddr_t *)); void nfsrv_initcache __P((void)); -int nfs_getauth __P((struct nfsmount *,struct nfsreq *,struct ucred *,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 *)); -int nfs_adv __P((struct mbuf **,caddr_t *,int,int)); +int nfs_getauth __P((struct nfsmount *, struct nfsreq *, struct ucred *, + 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 *)); +int nfs_adv __P((struct mbuf **, caddr_t *, int, int)); void nfs_nhinit __P((void)); void nfs_timer __P((void*)); -u_long nfs_hash __P((nfsfh_t *,int)); -int nfsrv_dorec __P((struct nfssvc_sock *,struct nfsd *,struct nfsrv_descript **)); -int nfsrv_getcache __P((struct nfsrv_descript *,struct nfssvc_sock *,struct mbuf **)); -void nfsrv_updatecache __P((struct nfsrv_descript *,int,struct mbuf *)); +u_long nfs_hash __P((nfsfh_t *, int)); +int nfsrv_dorec __P((struct nfssvc_sock *, struct nfsd *, + struct nfsrv_descript **)); +int nfsrv_getcache __P((struct nfsrv_descript *, struct nfssvc_sock *, + struct mbuf **)); +void nfsrv_updatecache __P((struct nfsrv_descript *, int, struct mbuf *)); void nfsrv_cleancache __P((void)); -int nfs_connect __P((struct nfsmount *,struct nfsreq *)); +int nfs_connect __P((struct nfsmount *, struct nfsreq *)); void nfs_disconnect __P((struct nfsmount *)); -int nfs_getattrcache __P((struct vnode *,struct vattr *)); -int nfsm_strtmbuf __P((struct mbuf **,char **,char *,long)); -int nfs_bioread __P((struct vnode *,struct uio *,int,struct ucred *, int getpages)); -int nfsm_uiotombuf __P((struct uio *,struct mbuf **,int,caddr_t *)); +int nfs_getattrcache __P((struct vnode *, struct vattr *)); +int nfsm_strtmbuf __P((struct mbuf **, char **, char *, long)); +int nfs_bioread __P((struct vnode *, struct uio *, int, struct ucred *, + int)); +int nfsm_uiotombuf __P((struct uio *, struct mbuf **, int, caddr_t *)); void nfsrv_init __P((int)); void nfs_clearcommit __P((struct mount *)); int nfsrv_errmap __P((struct nfsrv_descript *, int)); -void nfsrvw_sort __P((gid_t [],int)); -void nfsrv_setcred __P((struct ucred *,struct ucred *)); -int nfs_writebp __P((struct buf *,int)); -int nfsrv_object_create __P(( struct vnode * )); +void nfsrvw_sort __P((gid_t *, int)); +void nfsrv_setcred __P((struct ucred *, struct ucred *)); +int nfs_writebp __P((struct buf *, int)); +int nfsrv_object_create __P((struct vnode *)); void nfsrv_wakenfsd __P((struct nfssvc_sock *slp)); int nfsrv_writegather __P((struct nfsrv_descript **, struct nfssvc_sock *, struct proc *, struct mbuf **)); int nfs_fsinfo __P((struct nfsmount *, struct vnode *, struct ucred *, struct proc *p)); -int nfsrv3_access __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, +int nfsrv3_access __P((struct nfsrv_descript *nfsd, + struct nfssvc_sock *slp, struct proc *procp, struct mbuf **mrq)); int nfsrv_commit __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, struct proc *procp, struct mbuf **mrq)); int nfsrv_create __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, struct proc *procp, struct mbuf **mrq)); -int nfsrv_fhtovp __P((fhandle_t *,int,struct vnode **, - struct ucred *,struct nfssvc_sock *,struct mbuf *, - int *,int,int)); +int nfsrv_fhtovp __P((fhandle_t *, int, struct vnode **, struct ucred *, + struct nfssvc_sock *, struct sockaddr *, int *, + int, int)); int nfsrv_setpublicfs __P((struct mount *, struct netexport *, struct export_args *)); int nfs_ispublicfh __P((fhandle_t *)); @@ -655,7 +676,8 @@ int nfsrv_pathconf __P((struct nfsrv_descript *nfsd, struct mbuf **mrq)); int nfsrv_read __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, struct proc *procp, struct mbuf **mrq)); -int nfsrv_readdir __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, +int nfsrv_readdir __P((struct nfsrv_descript *nfsd, + struct nfssvc_sock *slp, struct proc *procp, struct mbuf **mrq)); int nfsrv_readdirplus __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, struct proc *procp, @@ -669,11 +691,14 @@ int nfsrv_rename __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, struct proc *procp, struct mbuf **mrq)); int nfsrv_rmdir __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, struct proc *procp, struct mbuf **mrq)); -int nfsrv_setattr __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, +int nfsrv_setattr __P((struct nfsrv_descript *nfsd, + struct nfssvc_sock *slp, struct proc *procp, struct mbuf **mrq)); -int nfsrv_statfs __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, +int nfsrv_statfs __P((struct nfsrv_descript *nfsd, + struct nfssvc_sock *slp, struct proc *procp, struct mbuf **mrq)); -int nfsrv_symlink __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, +int nfsrv_symlink __P((struct nfsrv_descript *nfsd, + struct nfssvc_sock *slp, struct proc *procp, struct mbuf **mrq)); int nfsrv_write __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, struct proc *procp, struct mbuf **mrq)); |