From owner-freebsd-net@FreeBSD.ORG Thu Oct 14 23:23:52 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3C25116A4CE; Thu, 14 Oct 2004 23:23:52 +0000 (GMT) Received: from mail.vicor-nb.com (bigwoop.vicor-nb.com [208.206.78.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id D174F43D3F; Thu, 14 Oct 2004 23:23:49 +0000 (GMT) (envelope-from julian@elischer.org) Received: from elischer.org (julian.vicor-nb.com [208.206.78.97]) by mail.vicor-nb.com (Postfix) with ESMTP id C86B77A403; Thu, 14 Oct 2004 16:23:42 -0700 (PDT) Message-ID: <416F0A7E.70207@elischer.org> Date: Thu, 14 Oct 2004 16:23:42 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.3.1) Gecko/20030516 X-Accept-Language: en, hu MIME-Version: 1.0 To: Andre Oppermann References: <20041014174225.GB49508@cell.sick.ru> <416EBF0A.CB1C0366@networx.ch> <20041014202305.GA50360@cell.sick.ru> <416EE620.186AD27A@freebsd.org> <416F02CA.5020700@elischer.org> <416F0497.806DB456@networx.ch> In-Reply-To: <416F0497.806DB456@networx.ch> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: Gleb Smirnoff cc: net@freebsd.org Subject: Re: small tun(4) improvement X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Oct 2004 23:23:52 -0000 Andre Oppermann wrote: >Julian Elischer wrote: > > >>Andre Oppermann wrote: >> >> >>>P.S. I'm working on making protocols within protocols domains loadable at >>>least for IPv4. >>> >>> >>> >>I did some work on this once.. things have got a lot more complicated >>however with locking.. >> >> > >Actually there are not that many locking problems with the register and >unregister functions themselfes. It get a little bit more trickier with >the stuff using these hooks though. > > > >>>I'm using this to make DIVERT a loadable module. >>> >>> >>> >>cool.. the trick is to work out how to make it (un)attach to ipfw.. >> >> > >DIVERT sockets in themselfes do not depend on ipfw. You can send out >packets just fine through a diver socket even when ipfw is missing. >But you can't get any packets from the kernel unless ipfw puts them >up to divert. Nothing that prevents other uses or users of divert >in the end (ng_divert perhaps...). > yes I know, that's how we wrote divert.. (to be independent) netgraph came later.. I guess we would have done divert differently if we had done netgraph first.. probably would have given ipfw a "hook" command that sent packets out a netfgaph hook to whatever was attached.. hmm that could still be really usefull... a netgraph NAT module anyone? > > >