Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateNamespace ¶
func CreateNamespace() int
创建一个新的网络命名空间并返回其 fd,当前进程依然留在原命名空间中 原理在于切换当前进程的命名空间并不会影响已打开的文件描述符 所以当前进程就可以根据这些打开的描述符在不同命名空间中反复横跳 fd 的关闭由调用方接管
func EnterNamespaceByFd ¶
func EnterNamespaceByFd(fd int)
Types ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.