From owner-freebsd-hackers Wed Dec 10 16:46:39 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id QAA10869 for hackers-outgoing; Wed, 10 Dec 1997 16:46:39 -0800 (PST) (envelope-from owner-freebsd-hackers) Received: from hydrogen.nike.efn.org (resnet.uoregon.edu [128.223.170.28]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id QAA10823 for ; Wed, 10 Dec 1997 16:46:22 -0800 (PST) (envelope-from gurney_j@efn.org) Received: (from jmg@localhost) by hydrogen.nike.efn.org (8.8.7/8.8.7) id QAA17658; Wed, 10 Dec 1997 16:46:20 -0800 (PST) Message-ID: <19971210164619.03585@hydrogen.nike.efn.org> Date: Wed, 10 Dec 1997 16:46:19 -0800 From: John-Mark Gurney To: FreeBSD Hackers Subject: merge bpfattach into if_attach... Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.69 Reply-To: John-Mark Gurney Organization: Cu Networking X-Operating-System: FreeBSD 2.2.1-RELEASE i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ 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... :) -- John-Mark Gurney Modem/FAX: +1 541 683 6954 Cu Networking Live in Peace, destroy Micro$oft, support free software, run FreeBSD