Re: list of all network namespaces

2015-09-17 Thread Jiri Benc
On Wed, 16 Sep 2015 17:54:34 -0700, Rick Jones wrote: > On 09/16/2015 05:46 PM, Ani Sinha wrote: > > just a stupid question. Is it possible to get a list of all active > > network namespaces in the kernel through /proc or some other > > interface? Not reliably and not effi

Re: list of all network namespaces

2015-09-17 Thread Nicolas Dichtel
Le 17/09/2015 02:54, Rick Jones a écrit : On 09/16/2015 05:46 PM, Ani Sinha wrote: Hi guys just a stupid question. Is it possible to get a list of all active network namespaces in the kernel through /proc or some other interface? Presumably you could copy what "ip netns" does, whi

RE: list of all network namespaces

2015-09-17 Thread Rosen, Rami
Hi, >Presumably you could copy what "ip netns" does, which appears to be to look in >/var/run/netns . At least that is what an strace of that >command suggests. This is true, but keep in mind that the output of "ip netns", as well as listing the contents of /var/run/netns, reflects only

Re: list of all network namespaces

2015-09-17 Thread Cong Wang
On Thu, Sep 17, 2015 at 10:39 AM, Ani Sinha wrote: > On Thu, Sep 17, 2015 at 2:51 AM, Rosen, Rami wrote: > >> Network namespaces which were created by other ways (like userspace >> applications >> using the clone() system call) will *not* be reflected by

Re: list of all network namespaces

2015-09-17 Thread Jiri Benc
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

Re: list of all network namespaces

2015-09-17 Thread Ani Sinha
On Thu, Sep 17, 2015 at 2:51 AM, Rosen, Rami wrote: > Network namespaces which were created by other ways (like userspace > applications > using the clone() system call) will *not* be reflected by neither of them. Will there be any interest if I cook up a kernel patch

list of all network namespaces

2015-09-16 Thread Ani Sinha
Hi guys just a stupid question. Is it possible to get a list of all active network namespaces in the kernel through /proc or some other interface? thanks ani -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More

Re: list of all network namespaces

2015-09-16 Thread Rick Jones
On 09/16/2015 05:46 PM, Ani Sinha wrote: Hi guys just a stupid question. Is it possible to get a list of all active network namespaces in the kernel through /proc or some other interface? Presumably you could copy what "ip netns" does, which appears to be to look in /var