networkdriver

package
v1.4.2-0...-80e9f6f Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2015 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNetworkOverlapsWithNameservers = errors.New("requested network overlaps with nameserver")
	ErrNetworkOverlaps                = errors.New("requested network overlaps with existing network")
)
View Source
var (
	ErrNoDefaultRoute = errors.New("no default route")
)

Functions

func CheckNameserverOverlaps

func CheckNameserverOverlaps(nameservers []string, toCheck *net.IPNet) error

func CheckRouteOverlaps

func CheckRouteOverlaps(toCheck *net.IPNet) error

func GetDefaultRouteIface

func GetDefaultRouteIface() (*net.Interface, error)

func GetIfaceAddr

func GetIfaceAddr(name string) (net.Addr, []net.Addr, error)

Return the first IPv4 address and slice of IPv6 addresses for the specified network interface

func NetworkOverlaps

func NetworkOverlaps(netX *net.IPNet, netY *net.IPNet) bool

Detects overlap between one IPNet and another

func NetworkRange

func NetworkRange(network *net.IPNet) (net.IP, net.IP)

Calculates the first and last IP addresses in an IPNet

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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