Date: Mon, 2 Jun 2003 12:23:05 -0700 From: <Vijay.Singh@nokia.com> To: <freebsd-hackers@freebsd.org> Subject: RE: sendfile in FreeBSD 2.2 Message-ID: <4D7B558499107545BB45044C63822DDE02C08E7B@mvebe001.americas.nokia.com>
next in thread | raw e-mail | index | archive | help
Hi, I am following up my own post. I have been able to do most of the = porting, but I have one question. What do I replace the OFF_TO_IDX() = macro with? I could start with code that always passes the offset as 0 = (sending the complete file). Any help would be appreciated. br vijay -----Original Message----- From: ext Yaoping Ruan [mailto:yruan@cs.princeton.edu] Sent: Wednesday, May 21, 2003 12:42 PM To: Singh Vijay (NET/MtView) Cc: freebsd-hackers@freebsd.org Subject: Re: sendfile in FreeBSD 2.2 Hi, VOP_GETVOBJECT() macro is created by kern/vnode_if.pl and vnode_if.src. = By running them you should be able to get vnode_if.c and vnode_if.h = file. In vnode_if.h, you will get the macro defined as follow: (From = FreeBsd 4.6) static __inline int VOP_GETVOBJECT __P(( struct vnode *vp, struct vm_object **objpp)); static __inline int VOP_GETVOBJECT(vp, objpp) struct vnode *vp; struct vm_object **objpp; { struct vop_getvobject_args a; int rc; a.a_desc =3D VDESC(vop_getvobject); a.a_vp =3D vp; a.a_objpp =3D objpp; rc =3D VCALL(vp, VOFFSET(vop_getvobject), &a); return (rc); } Hope this helps. - Yaoping > Message: 19 > Date: Wed, 21 May 2003 09:32:26 -0700 > From: <Vijay.Singh@nokia.com> > Subject: sendfile in FreeBSD 2.2 > To: <freebsd-hackers@freebsd.org> > Message-ID: > > Hello. Would it be possible to port the sendfile system call to a = FreeBSD 2.2 based system? Has anyone done this? I am trying to port the = code from a later FreeBSD release and I have been unable to find out = what the VOP_GETVOBJECT() macro does and how/what should it be replaced = with for my case. Any help is appreciated. > > Thanks > vijay
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4D7B558499107545BB45044C63822DDE02C08E7B>