networkdriver

package
v0.8.1-0...-32535e0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2014 License: Apache-2.0 Imports: 5 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, error)

Return the IPv4 address of a 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

func NetworkSize

func NetworkSize(mask net.IPMask) int32

Given a netmask, calculates the number of available hosts

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