netutils

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2016 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArpAnnouncement

func ArpAnnouncement(ifname string, addr *net.IPNet) error

func EnsureIPAssigned

func EnsureIPAssigned(iface, cidr string) error

EnsureIPAssigned will check if ip is already present on a given link

func EnsureIPUnassigned

func EnsureIPUnassigned(iface, cidr string) error

EnsureIPUnassigned ensure that given IP is not present on a given link

func IPIncrement

func IPIncrement(ip net.IP)

Types

type AddCIDR

type AddCIDR struct {
	Cidr string
}

type DelCIDR

type DelCIDR struct {
	Cidr string
}

type IPHandler

type IPHandler interface {
	Add(iface, cidr string) error
	Del(iface, cidr string) error
}

type LinuxIPHandler

type LinuxIPHandler struct{}

func (LinuxIPHandler) Add

func (l LinuxIPHandler) Add(iface, cidr string) error

func (LinuxIPHandler) Del

func (l LinuxIPHandler) Del(iface, cidr string) error

Jump to

Keyboard shortcuts

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