network

package
v0.0.0-...-d91f73c Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2020 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatMask

func FormatMask(mask net.IPMask) string

func GetFreeNetwork

func GetFreeNetwork(base *net.IPNet, prefixLen int) (*net.IPNet, error)

func GetFreeNetworkBlacklist

func GetFreeNetworkBlacklist(base *net.IPNet, prefixLen int, bl []net.IPNet) (*net.IPNet, error)

func GetIPForInterface

func GetIPForInterface(interfaceName string) (ipAddress *net.IPNet, err error)

func GetLocalIPs

func GetLocalIPs() (ips []string)

func GetLocalNetworks

func GetLocalNetworks() (nets []net.IPNet)

func NetworkOverlap

func NetworkOverlap(n1, n2 *net.IPNet) bool

func NetworkOverlapsBlacklist

func NetworkOverlapsBlacklist(n *net.IPNet, bl []net.IPNet) bool

func NetworkOverlapsLocalNetwork

func NetworkOverlapsLocalNetwork(n *net.IPNet) bool

func NextIP

func NextIP(ip net.IP, inc uint64) net.IP

Types

This section is empty.

Jump to

Keyboard shortcuts

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