Date: Wed, 1 Dec 1999 16:21:36 -0800 (PST) From: Archie Cobbs <archie@whistle.com> To: ken@kdm.org (Kenneth D. Merry) Cc: julian@whistle.com (Julian Elischer), archie@whistle.com (Archie Cobbs), gibbs@FreeBSD.org (Justin T. Gibbs), cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern uipc_mbuf.c src/sys/sys mbuf.h Message-ID: <199912020021.QAA45321@bubba.whistle.com> In-Reply-To: <199912020006.RAA45585@panzer.kdm.org> from "Kenneth D. Merry" at "Dec 1, 1999 05:06:35 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
Kenneth D. Merry writes: > > > Basically all it does is create a completely new mbuf chain containing > > > the same data as the original. Definitely at least 1 copy :-) > > > > > > You rarely need this, but 'ipfw tee' is one of those cases. > > I take it you need both copies to be writeable in that case? What are you > writing to the copy? Imagine the following scenario: you copy a packet for debug purposes at some point in the kernel traffic flow. Then the original packet, later on, has its header stripped off and another one put on (say, going from Ethernet to ATM). This can happen all in the same mbuf data area. Then, the recipient of the debug copy reads the packet. She will see the ATM header instead of the Ethernet header... which is presumably not what she was expecting. This happens with 'ipfw tee' because div_input() must modify the packet in order to put some of the IP header fields back in network order (because ip_input() reverses them first). -Archie ___________________________________________________________________________ Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199912020021.QAA45321>