Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 04 May 2005 12:09:56 -0700
From:      Julian Elischer <julian@elischer.org>
To:        Ragnar Lonn <raglon@packetfront.com>
Cc:        freebsd-net@freebsd.org
Subject:   Re: Virtual network stacks in FreeBSD?
Message-ID:  <42791E04.2070601@elischer.org>
In-Reply-To: <4278BA03.2040405@packetfront.com>
References:  <BAY106-DAV6CA8A2A4C57E23F7C843CB9230@phx.gbl> <4270EC8B.2030706@packetfront.com> <4272B4B2.4070407@elischer.org> <4278BA03.2040405@packetfront.com>

next in thread | previous in thread | raw e-mail | index | archive | help


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.. (





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?42791E04.2070601>