docker: github.com/docker/docker/vendor/github.com/docker/libnetwork/ipamutils Index | Files

package ipamutils

import "github.com/docker/docker/vendor/github.com/docker/libnetwork/ipamutils"

Package ipamutils provides utility functions for ipam management

Index

Package Files

utils.go

Variables

var (
    // PredefinedLocalScopeDefaultNetworks contains a list of 31 IPv4 private networks with host size 16 and 12
    // (172.17-31.x.x/16, 192.168.x.x/20) which do not overlap with the networks in `PredefinedGlobalScopeDefaultNetworks`
    PredefinedLocalScopeDefaultNetworks []*net.IPNet
    // PredefinedGlobalScopeDefaultNetworks contains a list of 64K IPv4 private networks with host size 8
    // (10.x.x.x/24) which do not overlap with the networks in `PredefinedLocalScopeDefaultNetworks`
    PredefinedGlobalScopeDefaultNetworks []*net.IPNet
)

func ConfigGlobalScopeDefaultNetworks Uses

func ConfigGlobalScopeDefaultNetworks(defaultAddressPool []*NetworkToSplit) error

ConfigGlobalScopeDefaultNetworks configures global default pool. Ideally this will be called from SwarmKit as part of swarm init

func ConfigLocalScopeDefaultNetworks Uses

func ConfigLocalScopeDefaultNetworks(defaultAddressPool []*NetworkToSplit) error

ConfigLocalScopeDefaultNetworks configures local default pool. Ideally this will be called during libnetwork init

func GetGlobalScopeDefaultNetworks Uses

func GetGlobalScopeDefaultNetworks() []*net.IPNet

GetGlobalScopeDefaultNetworks returns PredefinedGlobalScopeDefaultNetworks

func GetLocalScopeDefaultNetworks Uses

func GetLocalScopeDefaultNetworks() []*net.IPNet

GetLocalScopeDefaultNetworks returns PredefinedLocalScopeDefaultNetworks

type NetworkToSplit Uses

type NetworkToSplit struct {
    Base string `json:"base"`
    Size int    `json:"size"`
}

NetworkToSplit represent a network that has to be split in chunks with mask length Size. Each subnet in the set is derived from the Base pool. Base is to be passed in CIDR format. Example: a Base "10.10.0.0/16 with Size 24 will define the set of 256 10.10.[0-255].0/24 address pools

Package ipamutils imports 3 packages (graph). Updated 2019-04-17. Refresh now. Tools for package owners. This is an inactive package (no imports and no commits in at least two years).