network

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2017 License: Apache-2.0 Imports: 11 Imported by: 17

Documentation

Index

Constants

View Source
const (
	DefaultBridgeIface = "hyper0"
	DefaultBridgeIP    = "192.168.123.0/24"
)

Variables

View Source
var (
	IpAllocator   = ipallocator.New()
	BridgeIPv4Net *net.IPNet
	BridgeIface   string
	BridgeIP      string
)

Functions

func DeleteBridge

func DeleteBridge(name string) error

func InitNetwork

func InitNetwork(bIface, bIP string, disable bool) error

func IpParser added in v1.0.0

func IpParser(ipstr string) (net.IP, net.IPMask, error)

func NicName added in v1.0.0

func NicName(id string, index int) string

func ReleaseAddr added in v0.8.0

func ReleaseAddr(releasedIP string) error

func UpAndAddToBridge

func UpAndAddToBridge(name, bridge, options string) error

Types

type Settings

type Settings struct {
	Mac       string
	IPAddress string
	Gateway   string
	Bridge    string
	Device    string
	Automatic bool
}

func AllocateAddr added in v0.8.0

func AllocateAddr(requestedIP string) (*Settings, error)

func Configure

func Configure(inf *api.InterfaceDescription) (*Settings, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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