From owner-freebsd-questions@FreeBSD.ORG Sun Nov 12 16:05:23 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 020E616A407 for ; Sun, 12 Nov 2006 16:05:23 +0000 (UTC) (envelope-from erikt@midgard.homeip.net) Received: from ch-smtp02.sth.basefarm.net (ch-smtp02.sth.basefarm.net [80.76.149.213]) by mx1.FreeBSD.org (Postfix) with ESMTP id C5F8E43DC1 for ; Sun, 12 Nov 2006 16:03:32 +0000 (GMT) (envelope-from erikt@midgard.homeip.net) Received: from c83-253-29-241.bredband.comhem.se ([83.253.29.241]:63842 helo=falcon.midgard.homeip.net) by ch-smtp02.sth.basefarm.net with smtp (Exim 4.63) (envelope-from ) id 1GjHnl-0008Hd-6v for freebsd-questions@freebsd.org; Sun, 12 Nov 2006 17:03:21 +0100 Received: (qmail 34083 invoked from network); 12 Nov 2006 17:03:20 +0100 Received: from owl.midgard.homeip.net (10.1.5.7) by falcon.midgard.homeip.net with SMTP; 12 Nov 2006 17:03:20 +0100 Received: (qmail 51394 invoked by uid 1001); 12 Nov 2006 17:03:20 +0100 Date: Sun, 12 Nov 2006 17:03:19 +0100 From: Erik Trulsson To: Vlad GURDIGA Message-ID: <20061112160319.GA51308@owl.midgard.homeip.net> Mail-Followup-To: Vlad GURDIGA , freebsd-questions@freebsd.org References: <44zmaw66cv.fsf@be-well.ilk.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.13 (2006-08-11) X-Scan-Result: No virus found in message 1GjHnl-0008Hd-6v. X-Scan-Signature: ch-smtp02.sth.basefarm.net 1GjHnl-0008Hd-6v 7f07d95a2507e605236de9881d7982ea Cc: freebsd-questions@freebsd.org Subject: Re: bpf kernel module X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2006 16:05:23 -0000 On Sun, Nov 12, 2006 at 05:29:23PM +0200, Vlad GURDIGA wrote: > On 12/11/06, Lowell Gilbert wrote: > >"Vlad GURDIGA" writes: > > > >> I'm trying to keep very close touch with 6.1_STABLE cvsupping sources > >> once a week or even more often. I'm thinking of removing as much as > >> possible devices from the kernel loading them from /boot/loader.conf > >> instead, so I could rebuild and install them without a whole > >> kernel/world rebuild and reboot when sources change. I'm not sure this > >> is a correct way, any piece of advice regarding this would be highly > >> appreciated. :) > >> > >> So, I've successfully done that with sound and network card drivers, > >> but did not succeed with removing bpf from the kernel. Booting a > >> kernel with no bpf support, and with > >> ng_bpf_load="YES" in my loader.conf, the pflogd fails to start with this > >error: > >> > >> Nov 11 20:22:33 uxterm pflogd[10251]: Failed to initialize: (no > >> devices found) /dev/bpf0: No such file or directory > >> Nov 11 20:22:33 uxterm pflogd[10251]: Exiting, init failure > >> > >> And, tcpdump also fails saying that "no suitable device found". Of > >> course there is no /dev/bpf0. > >> > >> Is there any way to have the bpf0 device without booting a kernel with > >> bpf device included? > > > >The kernel module *should* work. I suspect that there is an error > >message when it tries to load the module and fails. You could check > >for that error message, or try to load the module by hand and see if > >you get a clue to the problem. > > > > Here is how I did: commented out the "device bpf" line in the kernel, > built and installed the kernel, and added ng_bpf_load="YES" in > loader.conf. I guess this is the module for the bpf (is this correct? > I'm not 100% sure). So, booting with the new kernel, and the module > being loaded from the loader.conf, the pflogd fails to start with this > error: ng_bpf(4) and bpf(4) are *not* the same thing. ng_bpf is a netgraph interface to bpf. For some reason bpf(4) does not seem to be available as a module, so if you want to use it then it has to be included in your kernel config. > > Nov 11 20:22:33 uxterm pflogd[10251]: Failed to initialize: (no > devices found) /dev/bpf0: No such file or directory > Nov 11 20:22:33 uxterm pflogd[10251]: Exiting, init failure > > And, tcpdump also fails saying that "no suitable device found". Of > course there is no /dev/bpf0. > > Unfortunately, I do not have enough experience to figure out how to > load this device at runtime. Is there any solution to this situation? No, it does not seem to be possible to load bpf at runtime. -- Erik Trulsson ertr1013@student.uu.se