ip

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2022 License: MIT Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidAddr = errors.New("invalid IP subnet/host")

Functions

func GetDefaultGatewayIP

func GetDefaultGatewayIP(iface *net.Interface) (gatewayIP net.IP, err error)

func GetDefaultInterface

func GetDefaultInterface() (iface *net.Interface, ifaceIP net.IP, err error)

func GetInterfaceIP

func GetInterfaceIP(iface *net.Interface) (ifaceIP net.IP, err error)

func GetLocalSubnetInterface

func GetLocalSubnetInterface(dstSubnet *net.IPNet) (iface *net.Interface, ifaceIP net.IP, err error)

func GetLocalSubnetInterfaceIP

func GetLocalSubnetInterfaceIP(iface *net.Interface, dstSubnet *net.IPNet) (net.IP, error)

func ParseIPNet

func ParseIPNet(subnet string) (*net.IPNet, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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