Date: Tue, 5 Dec 2000 16:12:37 -0500 (EST) From: Tim McMillen <timcm@umich.edu> To: Chris Gage <cgage@us.ibm.com> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Writing a kernel module Message-ID: <Pine.SOL.4.10.10012051555310.18671-100000@battlezone.gpcc.itd.umich.edu> In-Reply-To: <OF3896758C.070B46CA-ON852569AC.006FC320@raleigh.ibm.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 5 Dec 2000, Chris Gage wrote: > I've been looking, so far in vain, for some kind of guidelines about how I > would go about writing a kernel module for FreeBSD. What I need to do is > more or less what a firewall or a router does, ie intercept packets at the > lowest level inside IP and either return them to the stack if I don't want > them, or forward them to some other IP address if I do want them. If > anyone could point me to a place where this jewel of rather fundamental > information resides, I'd be very grateful. > Chris Gage -- IBM Corporation -- RTP, NC -- cgage@us.ibm.com -- (919) 254 > 5572 -- t/l 444 5572 Other people had asked this, but I had not seen replies so I thought there was nothing written about this. But I went to the google advanced search, restricted the domain to freebsd.org and searched for the exact phrase "kernel module" The first result is http://people.freebsd.org/~erich/ddwg/ddwg48.html Which is part of and gives a link to the FreeBSD device Driver Writers Guide which I didn't know existed. Other results from that search are probably good too. Of course you'll also want to get a hold of "The Design and Implementation of the 4.4BSD Operating System" by Kirk Mckusick if you don't already have it. And I just found this by looking at the tutorials page. The last three are fairly advanced and one links to: Dynamic Kernel Linker (KLD) Facility Programming Tutorial [Intro] http://www.daemonnews.org/200010/blueprints.html In the end the best way will be to look at the code from other KLD's and study the kernel code. Care to let us know what you are working on? Tim To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SOL.4.10.10012051555310.18671-100000>