From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 2 12:23:39 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2CF9037B420 for ; Mon, 2 Jun 2003 12:23:37 -0700 (PDT) Received: from mgw-x4.nokia.com (mgw-x4.nokia.com [131.228.20.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1959543F3F for ; Mon, 2 Jun 2003 12:23:36 -0700 (PDT) (envelope-from Vijay.Singh@nokia.com) Received: from esvir04nok.ntc.nokia.com (esvir04nokt.ntc.nokia.com [172.21.143.36])h52JNYD28687 for ; Mon, 2 Jun 2003 22:23:34 +0300 (EET DST) Received: from esebh001.NOE.Nokia.com (unverified) by esvir04nok.ntc.nokia.com for ; Mon, 2 Jun 2003 22:23:34 +0300 Received: from daebh002.NOE.Nokia.com ([172.18.242.232]) by esebh001.NOE.Nokia.com with Microsoft SMTPSVC(5.0.2195.6139); Mon, 2 Jun 2003 22:23:34 +0300 Received: from mvebe001.NOE.Nokia.com ([172.18.140.37]) by daebh002.NOE.Nokia.com with Microsoft SMTPSVC(5.0.2195.6139); Mon, 2 Jun 2003 14:23:06 -0500 X-MimeOLE: Produced By Microsoft Exchange V6.0.6375.0 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable Date: Mon, 2 Jun 2003 12:23:05 -0700 Message-ID: <4D7B558499107545BB45044C63822DDE02C08E7B@mvebe001.americas.nokia.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: sendfile in FreeBSD 2.2 Thread-Index: AcMf0ZL6niNn9C7ASBuI3BPoQd2GTAInPI6AADNxWDA= From: To: X-OriginalArrivalTime: 02 Jun 2003 19:23:06.0814 (UTC) FILETIME=[6523FDE0:01C3293C] Subject: RE: sendfile in FreeBSD 2.2 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jun 2003 19:23:39 -0000 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: > Subject: sendfile in FreeBSD 2.2 > To: > 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