sendfile in FreeBSD 2.2

Vijay.Singh at nokia.com Vijay.Singh at nokia.com
Mon Jun 2 12:23:39 PDT 2003


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 at cs.princeton.edu]
Sent: Wednesday, May 21, 2003 12:42 PM
To: Singh Vijay (NET/MtView)
Cc: freebsd-hackers at 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 at nokia.com>
> Subject: sendfile in FreeBSD 2.2
> To: <freebsd-hackers at 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



More information about the freebsd-hackers mailing list