Documentation
¶
Overview ¶
Package netns runs small pieces of work inside another process's network namespace. A unix socket belongs to the namespace it was created in, and criu only finds the sockets of the namespaces it dumps, so a channel fiberd shares with a tree inside a container has to be made in the container's namespace. fiberd is root in the initial user namespace, which may enter every namespace below it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Do ¶
Do runs fn on an OS thread switched into the network namespace of pid, then switches the thread back. The thread is locked to the goroutine throughout. Should switching back fail, the thread is left locked to a goroutine that ends, which makes the runtime discard it rather than hand a thread in the wrong namespace to other goroutines.
func LoopbackUp ¶
LoopbackUp brings the loopback interface up in the network namespace of pid. A namespace criu creates empty has it down.
func Socketpair ¶
Socketpair makes a unix socket pair of the given type (SOCK_STREAM, SOCK_SEQPACKET) in the network namespace of pid, close-on-exec.
Types ¶
This section is empty.