bridge

package
v1.10.0-experimental Latest Latest
Warning

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

Go to latest
Published: May 6, 2015 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultNetworkBridge     = "docker0"
	MaxAllocatedPortAttempts = 10
)

Variables

This section is empty.

Functions

func Allocate

func Allocate(id, requestedMac, requestedIP, requestedIPv6 string, restoring bool) (*network.Settings, error)

Allocate a network interface

func AllocatePort

func AllocatePort(id string, port nat.Port, binding nat.PortBinding, restoring bool) (nat.PortBinding, error)

Allocate an external port and map it to the interface

func InitDriver

func InitDriver(config *Config) error

func LinkContainers

func LinkContainers(action, parentIP, childIP string, ports []nat.Port, ignoreErrors bool) error

TODO: should it return something more than just an error?

func Release

func Release(id string)

Release an interface for a select ip

func RequestPort

func RequestPort(ip net.IP, proto string, port int) (int, error)

func ReserveIP

func ReserveIP(id, ipAddr string) error

This function is called from restore (in daemon/daemon.go) to reserve the IP address of a checkpointed container when the daemon starts.

Types

type Config

type Config struct {
	EnableIPv6                  bool
	EnableIptables              bool
	EnableIpForward             bool
	EnableIpMasq                bool
	DefaultIp                   net.IP
	Iface                       string
	IP                          string
	FixedCIDR                   string
	FixedCIDRv6                 string
	InterContainerCommunication bool
}

Jump to

Keyboard shortcuts

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