Skip to main content

local_ipv6

Function local_ipv6 

Source
pub fn local_ipv6() -> Result<IpAddr, Error>
Expand description

Retrieves the local IPv6 address of the machine in the local network from the AF_INET6 family.

A different approach is taken based on the operative system.

For linux based systems the Netlink socket communication is used to retrieve the local network interface.

For BSD-based systems the getifaddrs approach is taken using libc

For Windows systems Win32’s IP Helper is used to gather the Local IP address