Date: Fri, 03 Oct 2003 17:28:37 +0400 From: "Vladimir B. Grebenschikov" <vova@fbsd.ru> To: Julian Elischer <julian@elischer.org> Cc: net@freebsd.org Subject: Re: ng_ip_input use case Message-ID: <1065187709.952.38.camel@localhost> In-Reply-To: <Pine.BSF.4.21.0310021608390.9220-100000@InterJet.elischer.org> References: <Pine.BSF.4.21.0310021608390.9220-100000@InterJet.elischer.org>
next in thread | previous in thread | raw e-mail | index | archive | help
=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 <vova@fbsd.ru> SWsoft Inc.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1065187709.952.38.camel>