From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 24 07:31:20 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 E7E3716A41F; Mon, 24 Oct 2005 07:31:20 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from rosebud.otenet.gr (rosebud.otenet.gr [195.170.0.94]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2CB8043D45; Mon, 24 Oct 2005 07:31:19 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from flame.pc (aris.bedc.ondsl.gr [62.103.39.226]) by rosebud.otenet.gr (8.13.4/8.13.4/Debian-1) with SMTP id j9O7VHZg012074; Mon, 24 Oct 2005 10:31:18 +0300 Received: from flame.pc (flame [127.0.0.1]) by flame.pc (8.13.4/8.13.4) with ESMTP id j9O7TfaT001965; Mon, 24 Oct 2005 10:29:41 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by flame.pc (8.13.4/8.13.4/Submit) id j9O7TfTN001964; Mon, 24 Oct 2005 10:29:41 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Date: Mon, 24 Oct 2005 10:29:41 +0300 From: Giorgos Keramidas To: kamal kc Message-ID: <20051024072941.GA1944@flame.pc> References: <20051023120442.GB29924@flame.pc> <20051024052700.63215.qmail@web35705.mail.mud.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20051024052700.63215.qmail@web35705.mail.mud.yahoo.com> X-Mailman-Approved-At: Mon, 24 Oct 2005 13:48:03 +0000 Cc: freebsd , freebsd Subject: Re: in_cksum() for ip packets with multiple mbufs X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Oct 2005 07:31:21 -0000 On 2005-10-23 22:27, kamal kc wrote: > one thing i would like to ask? > > does it make any difference if i free the mbuf 'm' passed to > if_output() and pass my own mbuf to if_output. > > is the original mbuf referenced by any other pointers or global > variables ?? If you are hooking your own functions right before if_output, then it shouldn't be a problem. > > - If you are not *REALLY* copying the data of the mbuf, then the > > name of copy_the_memorybuffer() is very confusing. > > i didn't showed in the above code snippet but actually i am copying > the data contained in the mbufs in a character array. AH! That makes more sense then :) > thanks to you that the problem was solved (i don't > know if it is completely ok). i found that > - i had made mistake in computing checksum. > earlier checksum was computed over the whole dat Nice. Glad to know it's fixed now.