riaps.utils.ifaces module

Various network interface utility functions Created on Nov 4, 2016

@author: riaps

riaps.utils.ifaces.getNetworkInterfaces(nicName=None)[source]

Determine the IP address of the network interfaces Return a tuple of list of global IP addresses, list of MAC addresses, and local IP address If the requested interface is found the list will contain the information for that interface only.

riaps.utils.ifaces.get_random_port()[source]

Get a random open port

riaps.utils.ifaces.get_unix_dns_ips()[source]

Retrieve the IP address(es) of dns servers used by this host

riaps.utils.ifaces.is_valid_ipv4_address(address)[source]

Determine if the argument is a valid IP address