RE: Basic question about namespaces

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 

 

From: kernelnewbies-bounces@xxxxxxxxxxxxxxxxx [mailto:kernelnewbies-bounces@xxxxxxxxxxxxxxxxx] On Behalf Of Bruno Ferreira
Sent: Wednesday, April 22, 2015 11:39 AM
To: kernelnewbies@xxxxxxxxxxxxxxxxx
Subject: Basic question about namespaces

 

Hi,

I'm  new in kernel programming..

 

I'm reading the chapter about namespaces in  the "Linux Kernel Networking" (Rami Rosen), but I could not find a way to create a network namespace. I understand that I should use methods like create_nsproxy(), copy_net_ns() and create_new_namespaces(), but I don't know how to set their parameters.

For example, the method copy_net_ns(unsigned long flags, struct user_namespace *user_ns, struct net *old_net), defined in net_namespace.h.

I know that for flags, a may use CLONE_NEWNET, but what about the other parameters, user_ns and old_net?

 

There is a good documentation (with examples) about this? Unfortunately the book wasn't detailed enough.

 

I appreciate any help.


--

Bruno A. C. Ferreira

If I was you I’d take a look at the code that implements the clone() system call and see what it does when the CLONE_NEWNET bit is set in the flags.

Jeff Haran

 

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux