From owner-freebsd-net Wed Apr 26 11:46:26 2000 Delivered-To: freebsd-net@freebsd.org Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by hub.freebsd.org (Postfix) with ESMTP id CF7BF37B9E2 for ; Wed, 26 Apr 2000 11:46:22 -0700 (PDT) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.9.3/8.9.3) id OAA44415; Wed, 26 Apr 2000 14:46:18 -0400 (EDT) (envelope-from wollman) Date: Wed, 26 Apr 2000 14:46:18 -0400 (EDT) From: Garrett Wollman Message-Id: <200004261846.OAA44415@khavrinen.lcs.mit.edu> To: dg@root.com Cc: freebsd-net@FreeBSD.ORG Subject: Re: Proposal for ethernet, bridging, netgraph In-Reply-To: <200004260911.CAA14088@implode.root.com> References: <200004260211.WAA61401@whizzo.transsys.com> <200004260911.CAA14088@implode.root.com> Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org < said: > Pretty disgusting code. The mbuf isn't even initialized fully, leaving it > in a state with a bunch of garbage pointers and other cruft. It's amazing > that it even works. This must be something new that someone added - I don't > recall seeing this before. It's been there next to forever. > This could/should be done using a struct bpf_pkthdr (or something) that > has an mbuf pointer, a protocol header pointer, and header length. It could > also be done by just adding a few more arguments to bpf_mtap(). Abusing > an mbuf for this is wrong no matter how you slice it. Far better to simply always put the link header into the front of the mbuf and be done with it (even if it does require some extra copying). -GAWollman -- Garrett A. Wollman | O Siem / We are all family / O Siem / We're all the same wollman@lcs.mit.edu | O Siem / The fires of freedom Opinions not those of| Dance in the burning flame MIT, LCS, CRS, or NSA| - Susan Aglukark and Chad Irschick To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message