[Devel] Re: [RFD] L2 Network namespace infrastructure
Ben Greear
greearb at candelatech.com
Sat Jun 23 13:09:49 PDT 2007
Eric W. Biederman wrote:
> Ben Greear <greearb at candelatech.com> writes:
>
>
>> Will we be able to have a single application be in multiple name-spaces?
>>
>
> A single application certainly. But then an application can be composed
> of multiple processes which can be composed of multiple threads.
>
> In my current patches a single task_struct belongs to a single network
> namespace. That namespace is used when creating sockets. The sockets
> themselves have a namespace tag and that is used when transmitting
> packets, or otherwise operating on the socket.
>
> So if you pass a socket from one process to another you can have
> sockets that belong to different network namespaces in a single task.
>
Any chance it could allow one to use a single threaded, single process
and do something like
int fd1 = socket(...., namespace1);
int fd2 = socket(...., namespace2);
Or, maybe a sockopt or similar call to move a socket into a particular
namespace?
I can certainly see it being useful to allow a default name-space per
process, but it would be nice
to also allow explicit assignment of a socket to a name-space for
applications that want to span
a large number of name-spaces.
Thanks,
Ben
--
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc http://www.candelatech.com
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
More information about the Devel
mailing list