From owner-freebsd-questions Wed Dec 6 7: 9:20 2000 From owner-freebsd-questions@FreeBSD.ORG Wed Dec 6 07:09:19 2000 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from be-well.ilk.org (lowellg.ne.mediaone.net [24.147.184.128]) by hub.freebsd.org (Postfix) with ESMTP id 3082337B400 for ; Wed, 6 Dec 2000 07:09:19 -0800 (PST) Received: (from lowell@localhost) by be-well.ilk.org (8.11.1/8.11.1) id eB6F9CI32588; Wed, 6 Dec 2000 10:09:12 -0500 (EST) (envelope-from lowell) Sender: lowell@be-well.ilk.org To: freebsd-questions@freebsd.org Subject: Re: Writing a kernel module References: From: Lowell Gilbert Date: 06 Dec 2000 10:09:12 -0500 In-Reply-To: cgage@us.ibm.com's message of "5 Dec 2000 21:25:47 +0100" Message-ID: <44itox37tz.fsf@lowellg.ne.mediaone.net> Lines: 12 X-Mailer: Gnus v5.7/Emacs 20.7 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG cgage@us.ibm.com (Chris Gage) writes: > 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. The recommended way of doing what you're suggesting isn't a kernel module at all; it's a divert(4) socket in userland. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message