network

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: AGPL-3.0 Imports: 9 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 GetInterfaceVLAN added in v0.13.0

func GetInterfaceVLAN(name string) int

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