From owner-freebsd-hackers Wed Dec 10 18:25:20 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id SAA19275 for hackers-outgoing; Wed, 10 Dec 1997 18:25:20 -0800 (PST) (envelope-from owner-freebsd-hackers) Received: from implode.root.com (implode.root.com [198.145.90.17]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id SAA19261 for ; Wed, 10 Dec 1997 18:24:57 -0800 (PST) (envelope-from root@implode.root.com) Received: from implode.root.com (localhost [127.0.0.1]) by implode.root.com (8.8.5/8.8.5) with ESMTP id SAA14235; Wed, 10 Dec 1997 18:28:09 -0800 (PST) Message-Id: <199712110228.SAA14235@implode.root.com> To: John-Mark Gurney cc: FreeBSD Hackers Subject: Re: merge bpfattach into if_attach... In-reply-to: Your message of "Wed, 10 Dec 1997 16:46:19 PST." <19971210164619.03585@hydrogen.nike.efn.org> From: David Greenman Reply-To: dg@root.com Date: Wed, 10 Dec 1997 18:28:09 -0800 Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >I was just working on the strip star mode driver from NetBSD (it works!) >and noticed this really stupid piece of code that I KNOW is in every >interface driver: >#if NBPFILTER > 0 > bpfattach(&sc->sc_if, DLT_SLIP, SLIP_HDRLEN); >#endif > >and just before that code is a call to if_attach... is there any >problem by merging these two together? and then in if_attach if >NBPFILTER is > 0, call the proper bpfattach routine? it seems really >stupid to touch ever driver, when a small modification can improve the >code... > >and yes, I know that it will break the interface that made it so easy >to get NetBSD's star mode driver up and running... :) If we did that, then we would require that all network drivers have BPF support. While this might be true at the moment, it hasn't always been true in the past nor can we assume it will be in the future. -DG David Greenman Core-team/Principal Architect, The FreeBSD Project