1. net_if_addrs()
Return the addresses associated to each NIC (network interface
card) installed on the system as a dictionary whose keys are the
NIC names and value is a list of namedtuples for each address
assigned to the NIC. Each namedtuple includes 5 fields:
- family
- address
- netmask
- broadcast
- ptp
'family' can be either socket.AF_INET, socket.AF_INET6 or
psutil.AF_LINK, which refers to a MAC address.
'address' is the primary address and it is always set.
'netmask' and 'broadcast' and 'ptp' may be None.
'ptp' stands for "point to point" and references the destination
address on a point to point interface (typically a VPN).
'broadcast' and 'ptp' are mutually exclusive.
Note: you can have more than one address of the same