esptest.network.netif module
- esptest.network.netif.get_interfaces()[source]
Get all network interfaces names.
- Returns:
interface names
- Return type:
List[str]
- esptest.network.netif.get_all_ips_from_interface(interface, family=AddressFamily.AF_INET, prefix='')[source]
Get the IP address from network interface name.
- Parameters:
- Raises:
ValueError – Can not get IP address
- Returns:
IP addresses from the interface
- Return type:
List[str]
- esptest.network.netif.get_ip4_from_interface(interface='')[source]
Get the IPv4 address from network interface name.
- esptest.network.netif.get_ip6_from_interface(interface='', prefix='')[source]
Get the IPv6 address from network interface name.
- esptest.network.netif.get_local_ip4(to_addr='')[source]
Get the local IP (v4) that most likely to be able to connect to a remote IP or the Internet.
Depends on the routing table settings of this machine, usually returns the highest priority IP in the routing table.
- esptest.network.netif.ip_in_network(ip, network)[source]
Check the IP (v4/v6) address is in the network with given mask. Using ipaddress module: https://docs.python.org/3/library/ipaddress.html#module-ipaddress
- esptest.network.netif.guess_local_ip6(to_addr, interface='')[source]
Guess ipv6 address by given remote ipv6.