Documentation
¶
Overview ¶
Package network provides utility functions to extract some data about network
Index ¶
- Variables
- func DisplayInterfaces(includeAny bool) error
- func GetDefaultGatewayIPv4() (netip.Addr, error)
- func GetDefaultInterface() (*net.Interface, error)
- func GetGatewayIPv4FromInterface(iface string) (netip.Addr, error)
- func GetIPv4PrefixFromInterface(iface *net.Interface) (netip.Prefix, error)
- func InterfaceByName(name string) (*net.Interface, error)
- func IsLocalAddress(addr string) bool
Constants ¶
This section is empty.
Variables ¶
View Source
var ( BroadcastMAC = net.HardwareAddr{0xff, 0xff, 0xff, 0xff, 0xff, 0xff} LoopbackMAC = net.HardwareAddr{0x00, 0x00, 0x00, 0x00, 0x00, 0x00} )
Functions ¶
func DisplayInterfaces ¶
func GetDefaultGatewayIPv4 ¶
func GetDefaultInterface ¶
func InterfaceByName ¶
InterfaceByName returns the interface specified by name.
func IsLocalAddress ¶ added in v0.0.10
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.