LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Reg: Reg Single Process Multiple sockets! (https://www.linuxquestions.org/questions/linux-networking-3/reg-reg-single-process-multiple-sockets-4175634106/)

bkannadassan 07-15-2018 07:09 PM

Reg: Reg Single Process Multiple sockets!
 
Hi All!

I know that with setns a single process can switch across different network namespace. Now sameway we should be able to open sockets in different namespace am I rt ?. If this is allowed how are socket events handled when a same process opened in different namespaces ?. Is it like the socket events will be queued for the process to switch to the namespace ?. Or is it like we will miss those events. Sorry if this looks naive.

rgds
Balaji Kamal Kannadassan

nini09 07-18-2018 02:51 PM

Why do you think socket is relative to name-space? It should be relative to IP address space.

bkannadassan 07-18-2018 07:24 PM

Since we are talking about network namespace and sockets are bound to network. Wasn't sure if a process switches across multiple network namespace and opens sockets in each of them would process get event in the network namespace currently they are in or will we get from other sockets as well.

rgds
Balaji Kamal Kannadassan

nini09 07-19-2018 02:37 PM

For socket itself, it is relative to IP address only. But before opening a socket and if DNS server is used to translate network name to IP address, the step is relative to name space.


All times are GMT -5. The time now is 12:51 AM.