[Devel] Re: [RFD] L2 Network namespace infrastructure
Eric W. Biederman
ebiederm at xmission.com
Sat Jun 23 13:39:13 PDT 2007
Ben Greear <greearb at candelatech.com> writes:
> 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.
That isn't the primary use case so I have not considered it much.
A setsockopt call might be possible.
It is also possible to have a bunch of children opening sockets for you
and passing to the process that wants to do the work. If you have a
sufficiently slow socket creation rate that will not be a problem just
a little cumbersome.
If you can open all of your sockets upfront it is possible to do
something where you open your sockets then unshare your network
namespace and repeat.
I am committed to making general infrastructure not something that is
targeted in a brittle way at only one scenario.
So it may be that we can cover your scenario. However it is just
enough off of the beaten path that I'm not going to worry about it
the first time through. It looks like it is a very small step from
where I am at to where you want to be. So you may be able to cook
up something that will satisfy your requirements relatively easily.
Eric
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
More information about the Devel
mailing list