From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 7 21:12:02 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DBA7A16A418 for ; Thu, 7 Feb 2008 21:12:02 +0000 (UTC) (envelope-from dudu@dudu.ro) Received: from fk-out-0910.google.com (fk-out-0910.google.com [209.85.128.184]) by mx1.freebsd.org (Postfix) with ESMTP id 7008C13C459 for ; Thu, 7 Feb 2008 21:12:02 +0000 (UTC) (envelope-from dudu@dudu.ro) Received: by fk-out-0910.google.com with SMTP id b27so3876062fka.11 for ; Thu, 07 Feb 2008 13:12:01 -0800 (PST) Received: by 10.82.158.12 with SMTP id g12mr21429959bue.18.1202418720276; Thu, 07 Feb 2008 13:12:00 -0800 (PST) Received: by 10.82.187.11 with HTTP; Thu, 7 Feb 2008 13:12:00 -0800 (PST) Message-ID: Date: Thu, 7 Feb 2008 23:12:00 +0200 From: "Vlad GALU" To: "Biks N" In-Reply-To: <50cd4e5f0802071222w1222d901o3ce8770b5f5725b4@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <50cd4e5f0802071222w1222d901o3ce8770b5f5725b4@mail.gmail.com> Cc: freebsd-hackers@freebsd.org Subject: Re: retrive data from mbuf chain 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: Thu, 07 Feb 2008 21:12:02 -0000 On 2/7/08, Biks N wrote: > Hi, > > I am new to FreeBSD kernel programming. > > Currently I am trying to work on mbuf data manupulation. > > >From my understanding: data (payload) is stored into one or more mufs > which are chained together through m_next pointer. > > Now, I need to retrive all data in mbuf chain ( mbufs linked by > m_next). I am working ip_output() in netinet/ip_output.c > > Does there exist inbuilt function/macro to retrive all the data in mbuf chain? I may be wrong on this one, but according to my understanding, a m_pullup() followed by a mtod() should do the trick. > > thanks in advance :) > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > -- Mahnahmahnah!