From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 19 16:30:23 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 BDC7C16A4BF for ; Tue, 19 Aug 2003 16:30:23 -0700 (PDT) Received: from hermes.aueb.gr (hermes.aueb.gr [195.251.255.142]) by mx1.FreeBSD.org (Postfix) with ESMTP id 72FA143FD7 for ; Tue, 19 Aug 2003 16:30:22 -0700 (PDT) (envelope-from dds@aueb.gr) Received: from aueb.gr (faculty01.right.dialup.aueb.gr [195.251.255.245]) by hermes.aueb.gr (8.12.9/8.12.9) with ESMTP id h7JNTNoj012452; Wed, 20 Aug 2003 02:29:24 +0300 Message-ID: <3F42B2B0.FDC3DC9@aueb.gr> Date: Wed, 20 Aug 2003 02:28:48 +0300 From: Diomidis Spinellis Organization: Athens University of Ecomomics and Business X-Mailer: Mozilla 4.78 [en] (Windows NT 5.0; U) X-Accept-Language: en,el,de MIME-Version: 1.0 To: jtoung@arc.nasa.gov References: <200308191602.40166.jtoung@arc.nasa.gov> Content-Type: text/plain; charset=iso-8859-7 Content-Transfer-Encoding: 7bit cc: freebsd-hackers@freebsd.org 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: Tue, 19 Aug 2003 23:30:24 -0000 Jerry Toung wrote: > I am in the process of implementing a routing protocol under 5.0. [...] > 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 was about to ask why we need another networking protocol, but then noticed the sender's domain :-) ] I suggest you first build userland applications that emulate the kernel's networking behavior that affects your protocol. Build and test your protocol in userland on top of that environment, and once you are happy with it, plug it into the kernel. You will thus gain: - a very fast turnaround compile/test time - the ability to use better debugging and profiling tools - the flexibility compile and run your code in the environment you prefer You might even want to keep your code buildable under the emulated environment and the real kernel using suitable stubs or conditional compilation. I have used such techniques a number of times; you typically recoup your initial investment very quickly. Diomidis - dds@FreeBSD.org - http://www.spinellis.gr