Documentation
¶
Index ¶
- func CIDRFromRange(startStr, endStr string) string
- func FirstIPInSubnet(addr *net.IPNet) (net.IP, error)
- func GetFreeSubnet(n *net.IPNet, usedNetworks []*net.IPNet) (*net.IPNet, error)
- func GetLiveNetworkSubnets() ([]*net.IPNet, error)
- func IntersectsWithNetworks(n *net.IPNet, networklist []*net.IPNet) bool
- func LastIPInSubnet(addr *net.IPNet) (net.IP, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CIDRFromRange ¶ added in v2.4.0
CIDRFromRange inverts FirstIPInSubnet/LastIPInSubnet: it rebuilds the CIDR from the start and end they produced. Returns "" for empty or unparsable bounds. A /31 or /127 has no distinct network and broadcast, so it recomputes as /32 or /128.
func FirstIPInSubnet ¶
firstIPInSubnet gets the first IP in a subnet https://github.com/containers/podman/blob/v4.0.0-rc1/libpod/network/util/ip.go#L36
func GetFreeSubnet ¶
GetFreeSubnet try to find a free subnet in the given network
func GetLiveNetworkSubnets ¶
func IntersectsWithNetworks ¶
func LastIPInSubnet ¶
lastIPInSubnet gets the last IP in a subnet https://github.com/containers/podman/blob/v4.0.0-rc1/libpod/network/util/ip.go#L18
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.