Registry / networking / vishvananda-netns

vishvananda-netns

JSON →
library0.0.5gogounverified

Package netns allows ultra-simple network namespace handling.

go get github.com/vishvananda/netns
INSTALL
IMPORT
SIG · VISHVANANDA-NETNS
V
vishvananda-netns
networkinggov0.0.5
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

netns
github.com/vishvananda/netns

Gets the current network namespace handle.

package main import ( "fmt" "github.com/vishvananda/netns" ) func main() { ns, err := netns.Get() if err != nil { panic(err) } defer ns.Close() fmt.Printf("Current network namespace: %v\n", ns) }
Debug
Known issues
gotchaRequires root or CAP_NET_ADMIN on Linux
fix
Run the program with sudo or set capabilities
affects: all
Upgrade
Version history
0.0.5latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
16 hits · last 30 days
node
12
Amazon
1
OpenAI (training)
1
Resources
vishvananda-netns — go get vishvananda-netns · libregistry