Ben Greear <[EMAIL PROTECTED]> 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 - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html