From owner-freebsd-hackers Mon Jul 2 9:16:51 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from sneakerz.org (sneakerz.org [216.33.66.254]) by hub.freebsd.org (Postfix) with ESMTP id 8FD6837B405 for ; Mon, 2 Jul 2001 09:16:49 -0700 (PDT) (envelope-from bright@sneakerz.org) Received: by sneakerz.org (Postfix, from userid 1092) id 3EF635D010; Mon, 2 Jul 2001 11:16:49 -0500 (CDT) Date: Mon, 2 Jul 2001 11:16:49 -0500 From: Alfred Perlstein To: "Eugene L. Vorokov" Cc: freebsd-hackers@freebsd.org Subject: Re: catching ip packets from module Message-ID: <20010702111649.N84523@sneakerz.org> References: <200107021532.f62FWEw87507@bugz.infotecs.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: <200107021532.f62FWEw87507@bugz.infotecs.ru>; from vel@bugz.infotecs.ru on Mon, Jul 02, 2001 at 07:32:13PM +0400 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * Eugene L. Vorokov [010702 10:19] wrote: > Hello, > > can please someone enlighten me how can a module catch ip packets before > they actually enter the stack, the way ipfw or ipf does ? I tried to look > at the sources, but ipfw seems to do it some very specific way which > is based on some in-kernel hacks to make it possible (ofcourse correct me > if I'm wrong), and ipf does so many things at startup so I can't figure > out which function does what :( I just want to add my handler so that > all packets would be passed to it before entering the kernel ... > > Thanks for the information. Look at src/sys/net/if_ethersubr.c, there's hooks for netgraph that you can ab^H^Huse. :) -- -Alfred Perlstein [alfred@freebsd.org] Ok, who wrote this damn function called '??'? And why do my programs keep crashing in it? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message