From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 20 05:05:43 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B3E3316A4BF for ; Wed, 20 Aug 2003 05:05:43 -0700 (PDT) Received: from vsmtp1.tin.it (vsmtp1.tin.it [212.216.176.221]) by mx1.FreeBSD.org (Postfix) with ESMTP id A12E243FAF for ; Wed, 20 Aug 2003 05:05:42 -0700 (PDT) (envelope-from flag@tin.it) Received: from newluxor.skynet.org (80.182.24.90) by vsmtp1.tin.it (7.0.019) id 3F17CBF9009280DE; Wed, 20 Aug 2003 14:05:37 +0200 Received: by newluxor.skynet.org (Postfix, from userid 1002) id 819B512C; Wed, 20 Aug 2003 14:07:19 +0200 (CEST) Date: Wed, 20 Aug 2003 14:07:19 +0200 From: Paolo Pisati To: Jerry Toung Message-ID: <20030820120719.GA1255@newluxor.skynet.org> References: <200308191602.40166.jtoung@arc.nasa.gov> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200308191602.40166.jtoung@arc.nasa.gov> User-Agent: Mutt/1.4.1i X-Useless-Header: Look ma, it's a # sign! X-Operating-System: FreeBSD newluxor.skynet.org 4.8-STABLE FreeBSD 4.8-STABLE cc: FreeBSD_Hackers Subject: Re: new routing protocol X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2003 12:05:44 -0000 On Tue, Aug 19, 2003 at 04:02:40PM -0700, Jerry Toung wrote: > > My problem is dealing with debuging and portability. With this raw approach I > guess I will have to run builkernel and installkernel all the time. How can I > avoid that? I thought about kernel modules, but I don't know what kind to use > (SYSCALL_MODULE or DEV_MODULE,etc..) and how about netgraph.? does that make > sense? i'm implementing a packet classification algorithm in FreeBSD using the Netgraph nodes, and i would reccomend you to do the same: writing a netgraph node is really simple (after you crash your os serveral times... =), and you can plug/unplug your code at any time without the need to reboot. The only thing you have to bear in mind is that all your code is running in kernel land (like the patch you wanted to write...) so, an endless loop, a bad pointer or a misuse of the stack space will bring your computer down (sooner or later). It would be nice to have a manual of the "for dummies" collection called "writing code in kernel land" aka "be careful! we don't have seat belt here!" =) hope this help... -- Paolo GUFI: http://www.gufi.org