Documentation
¶
Overview ¶
Package netns runs code in the network namespace of another process (the sandbox).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Do ¶ added in v0.3.2
Do executes fn in the network namespace of the process pid without switching the calling goroutine's network namespace.
Sockets that fn creates belong to the target network namespace for their whole lifetime, even when they are later used from threads in the original namespace.
Do requires CAP_SYS_ADMIN in the caller's user namespace and in the user namespace that owns the target network namespace (setns(2)).
To use this function the main thread of the process must be locked to the main goroutine (LockOSThread called from init()).
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.