network

package
v0.0.0-...-97501b0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 9, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultBridgeName    = "uigniter0"
	DefaultBridgeIP      = "172.17.0.1"
	DefaultBridgeAddress = DefaultBridgeIP + "/24"
	TapNamePrefix        = "utap"
)
View Source
const (
	DefaultNetworkPrefix = "172.17.0."
)

Variables

This section is empty.

Functions

func AllocIPv4

func AllocIPv4() (string, error)

AllocIPv4 ... Alloc a new IPv4 address

func DeleteTap

func DeleteTap(tapName string) error

DeleteTap ... Delete a tap device by name

func GenMac

func GenMac() (string, error)

GenMac ... Generate a random MAC address

func NewTap

func NewTap() (string, error)

NewTap ... Create a new tap device and return its name

func ReleaseIPv4

func ReleaseIPv4(addr string)

ReleaseIPv4 .. Release an IPv4 address

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL