iface

package
v0.0.0-...-0f89ab1 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrIfaceNotFound = errors.New("interface not found")
	ErrAddrNotFound  = errors.New("addr not found")
)

Functions

func FlushCache

func FlushCache()

Types

type Interface

type Interface struct {
	Index        int
	Name         string
	Addrs        []*net.IPNet
	HardwareAddr net.HardwareAddr
}

func ResolveInterface

func ResolveInterface(name string) (*Interface, error)

func (*Interface) PickIPv4Addr

func (iface *Interface) PickIPv4Addr(destination net.IP) (*net.IPNet, error)

func (*Interface) PickIPv6Addr

func (iface *Interface) PickIPv6Addr(destination net.IP) (*net.IPNet, error)

Jump to

Keyboard shortcuts

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