Subject: Re: list of all network namespaces

From: Jiri Benc <[email-masked]>
Date: Thu, 17 Sep 2015 20:14:50 +0200

On Thu, 17 Sep 2015 10:39:57 -0700, Ani Sinha wrote:
> Will there be any interest if I cook up a kernel patch that lists all
> network namespaces through /proc?

/proc is a wrong interface for this, enumerating all net namespaces has
nothing to do with processes. Each process has its corresponding
namespaces in /proc already listed, which is as much as belongs
to /proc.

Dumping all net namespaces should be probably netlink based but
obviously, you'll have hard time sending file descriptors over netlink.
You can dump their netnsids but that won't help you much accessing the
namespace contents.

This is not as easy as it seems. But I'd love to have such feature.

 Jiri

-- 
Jiri Benc