Documentation ¶
Overview ¶
Package iputils implements utilities to work with IP addresses.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var InterfaceByName = func(s string) (Addr, error) { return net.InterfaceByName(s) }
InterfaceByName is a mocking point for net.InterfaceByName, used for tests.
Functions ¶
func ResolveIntfAddr ¶
ResolveIntfAddr takes the name of a network interface and IP version, and returns the first IP address of the interface that matches the specified IP version. If no IP version is specified (ipVer is 0), simply the first IP address is returned. TODO(manugarg): This functions is currently tested through options_test. We should fix that.
Types ¶
Click to show internal directories.
Click to hide internal directories.