network

package
v0.0.0-...-1e561f4 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2017 License: Apache-2.0 Imports: 11 Imported by: 0

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

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

func NicName

func NicName(id string, index int) string

func ReleaseAddr

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
	Mtu       uint64
	Automatic bool
}

func AllocateAddr

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