From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 7 21:30:19 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 4BD3416A418 for ; Thu, 7 Feb 2008 21:30:19 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outG.internet-mail-service.net (outG.internet-mail-service.net [216.240.47.230]) by mx1.freebsd.org (Postfix) with ESMTP id 33D6013C4E7 for ; Thu, 7 Feb 2008 21:30:18 +0000 (UTC) (envelope-from julian@elischer.org) Received: from mx0.idiom.com (HELO idiom.com) (216.240.32.160) by out.internet-mail-service.net (qpsmtpd/0.40) with ESMTP; Thu, 07 Feb 2008 13:30:18 -0800 Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id B003B1270F7; Thu, 7 Feb 2008 13:30:17 -0800 (PST) Message-ID: <47AB786D.8070403@elischer.org> Date: Thu, 07 Feb 2008 13:30:21 -0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.9 (Macintosh/20071031) MIME-Version: 1.0 To: Vlad GALU References: <50cd4e5f0802071222w1222d901o3ce8770b5f5725b4@mail.gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Biks N 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:30:19 -0000 Vlad GALU wrote: > 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. depends what he wants to do.. check /sys/sys/mbuf.h and /sys/kern/uipc_mbuf.c for all sorts of methods for handling mbufs. > >> 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" >> > >