Skip to content

helpers.network.networks

Functions

get_networks()

Returns a dictionary mapping local NICs to their networks.

Output format:
{
'enp0s3': [{'ip': '192.168.1.10', 'netmask': '255.255.255.0', 'network': '192.168.1.0/24'}, ...],
'lo': [{'ip': '127.0.0.1', 'netmask': '255.0.0.0', 'network': '127.0.0.0/8'}],
}