are you interested by something like:
>>> netifaces.local_interfaces() ['lo0', 'en0'] >>> netifaces.public_interfaces() ['gif0', 'stf0', 'en1', 'fw0']
My usecase is that I need to find local interfaces on several OSes to display them to the user. So I get all of them with netifaces.interfaces(), then making a loop for selecting local adresses with this function:
def _is_local_address(addr): return addr.startswith("192.168") or \ (addr.startswith("172.") and 16 <= int(addr.split(".")) <= 31) or \ addr.startswith("10.")
I think a generic interface in netifaces could help other people. I can make a pull-request of the feature if you are interested.