From owner-freebsd-net@FreeBSD.ORG Fri Oct 3 06:28:12 2003 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 A3A0D16A4B3 for ; Fri, 3 Oct 2003 06:28:12 -0700 (PDT) Received: from vbook.fbsd.ru (asplinux.ru [195.133.213.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id 14AEF43F75 for ; Fri, 3 Oct 2003 06:28:11 -0700 (PDT) (envelope-from vova@vbook.fbsd.ru) Received: from vova by vbook.fbsd.ru with local (Exim 4.24; FreeBSD 5.1) id 1A5Pz5-000Bvu-Ge; Fri, 03 Oct 2003 17:28:39 +0400 From: "Vladimir B. Grebenschikov" To: Julian Elischer In-Reply-To: References: Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable Organization: SWsoft Inc. Message-Id: <1065187709.952.38.camel@localhost> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Fri, 03 Oct 2003 17:28:37 +0400 Sender: Vladimir Grebenschikov cc: net@freebsd.org Subject: Re: ng_ip_input use case 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: Fri, 03 Oct 2003 13:28:12 -0000 =F7 =D0=D4, 03.10.2003, =D7 03:09, Julian Elischer =D0=C9=DB=C5=D4: > > > I have no idea what it is used for.. similar effect can be made by > > > using the ng_iface node, but I think that they didn't want a separate > > > interface for each packet source.. > > > > > > I suggest we ask brooks..(cc'd). I could imagine it somehow connecte= d > > > with the 300 processor FreeBSD based cluster that he is working on at > > > hos job (especially as it has their copyright). > >=20 > > It was for a network emulator we were trying to build to allow us to > > run real, unmodified programs in an environment where each program > > was assumed to be an independent agent and the communication topology > > between agents changed in realtime. Each agent was to bind to the IP > > address of an IP-over-IP tunnel (gif on the FreeBSD end). We would the= n > > take the packets, mangle them slightly and send them off to the emulato= r > > (I think part of the goal was to let us use more or less off the shelf > > emulation gear in the middle without needing a workstation for each > > agent). When we got them back, we'd remanged them and stuff them back > > into the IP stack with ng_ip_input so it could decide which gif tunnel > > to send it back down. The emulation part of the project died when our > > funding for it dried up so we've not actually using this module for > > anything. >=20 > was there a reason to not use the ng_iface node? > (packets enterred on the INET hook if an iface node will be injected > into the ip stack) (from memory) ng_iface does much more then ability to inject packets into IP-stack, as minimum it creates interface, on hosts with dynamic routing software you should start care about this (unused !) interface, If you have number of ng_iface-s used for some real task and some interfaces used only as ip_input gateway you can completely mix them all in mind. I do not think that it is good idea to create one more interface only to inject packets into IP-stack. PS:=20 Anyway, I can suggest one another way to do this task: use ng_ksocket with socket type divert and ipfw divert rule. But this way have disadvantage: packet can easy enter to infinite loop. So use with care. > > -- Brooks --=20 Vladimir B. Grebenschikov SWsoft Inc.