From owner-freebsd-net@FreeBSD.ORG Wed May 4 19:10:42 2005 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 54DD216A4CE for ; Wed, 4 May 2005 19:10:42 +0000 (GMT) Received: from mail.vicor-nb.com (bigwoop.vicor-nb.com [208.206.78.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2D0CC43D39 for ; Wed, 4 May 2005 19:10:42 +0000 (GMT) (envelope-from julian@elischer.org) Received: from [208.206.78.97] (julian.vicor-nb.com [208.206.78.97]) by mail.vicor-nb.com (Postfix) with ESMTP id A93DA7A41E; Wed, 4 May 2005 12:09:56 -0700 (PDT) Message-ID: <42791E04.2070601@elischer.org> Date: Wed, 04 May 2005 12:09:56 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.7) Gecko/20050423 X-Accept-Language: en, hu MIME-Version: 1.0 To: Ragnar Lonn References: <4270EC8B.2030706@packetfront.com> <4272B4B2.4070407@elischer.org> <4278BA03.2040405@packetfront.com> In-Reply-To: <4278BA03.2040405@packetfront.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-net@freebsd.org Subject: Re: Virtual network stacks in FreeBSD? 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: Wed, 04 May 2005 19:10:42 -0000 Ragnar Lonn wrote: > Julian Elischer wrote: > >> >> >> Ragnar Lonn wrote: >> >>> Hello all, >>> >>> Does anyone know if virtual network stack support (as implemented at >>> http://www.tel.fer.hr/zec/vimage/) is on the roadmap for future >>> FreeBSD releases? >> >> >> >> >> that depends on who you are talking to :-) >> the problems are not with the concept of virtual network stacks >> but with how you make them virtual and still support loadable modules >> and protocols. >> It is theoretically possible but it requires that there be an >> infrastructure to allow >> loadble modules to link into and out of exisiting virtual worlds. >> >> What Marco did is very good but it is limited to those modules that >> are compiled in in >> that manner. >> I would like to do it but the scope just keeps growing when you look >> into what it >> would require. >> Especially in 5.x/6.x where the emphasis has been in making more and >> more of >> the system loadable. > > > > Ok, here is a dumb question! > > Would it be possible to have multiple network stack support available > as a kernel > compile option that, if enabled, disabled other functionality that > conflicted with it? > > I would guess that few people need to have multiple network stacks on > their > systems and that those who do might be able to accept the loss of other > functionality to get this feature. > > /Ragnar It would be pretty hard, though you MIGHT be able to do funny linker tricks. the way that teh virtual stacks is done is that all the global variables etc. that the netwirk stacks use are moved into one big structure. then places that access those variables are changed to read them from the structure instance that is currently active. interfaces and process structures have a pointer to one of these structures (indirectly), so that is how th e correct one to use is looked up. It works well but it's not vaery extensible because you would have to keep changing the structure when you added or deleted modules.. (