network

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2016 License: Apache-2.0 Imports: 19 Imported by: 22

Documentation

Index

Constants

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

Variables

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

Functions

func InitNetwork

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

func Release

func Release(vmId, releasedIP string, maps []pod.UserContainerPort, file *os.File) error

Release an interface for a select ip

Types

type Settings

type Settings struct {
	Mac         string
	IPAddress   string
	IPPrefixLen int
	Gateway     string
	Bridge      string
	Device      string
	File        *os.File
	Automatic   bool
}

func Allocate

func Allocate(vmId, requestedIP string, addrOnly bool, maps []pod.UserContainerPort) (*Settings, error)

func Configure

func Configure(vmId, requestedIP string, addrOnly bool,
	maps []pod.UserContainerPort, config pod.UserInterface) (*Settings, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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