if_nameindex() Returns a list of network interface information (index, name) tuples.
socket/if_nameindex
if_nameindex