From owner-freebsd-hackers@FreeBSD.ORG Wed May 21 12:45:27 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 C437B37B401 for ; Wed, 21 May 2003 12:45:27 -0700 (PDT) Received: from Princeton.EDU (postoffice01.Princeton.EDU [128.112.129.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id DADE343FB1 for ; Wed, 21 May 2003 12:45:26 -0700 (PDT) (envelope-from yruan@cs.princeton.edu) Received: from smtpserver2.Princeton.EDU (smtpserver2.Princeton.EDU [128.112.129.148]) by Princeton.EDU (8.12.9/8.12.9) with ESMTP id h4LJjPiQ025825; Wed, 21 May 2003 15:45:25 -0400 (EDT) Received: from cs.princeton.edu (targe.CS.Princeton.EDU [128.112.139.194]) (authenticated bits=0)h4LJjOGe017772 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT); Wed, 21 May 2003 15:45:24 -0400 (EDT) Message-ID: <3ECBD681.699F5A4C@cs.princeton.edu> Date: Wed, 21 May 2003 15:41:53 -0400 From: Yaoping Ruan X-Mailer: Mozilla 4.76 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: Vijay.Singh@nokia.com References: <20030521190346.BDB3737B407@hub.freebsd.org> Content-Type: text/plain; charset=gb2312 Content-Transfer-Encoding: 7bit cc: freebsd-hackers@freebsd.org 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: Wed, 21 May 2003 19:45:28 -0000 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 = VDESC(vop_getvobject); a.a_vp = vp; a.a_objpp = objpp; rc = 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