def get_local_addresses_async(target='198.41.0.4'):
 addresses = []
 local_ip = get_local_ip_for(target)
 if local_ip:
  addresses.append(local_ip)
 if (sys.platform == 'cygwin'):
  d = _cygwin_hack_find_addresses(target)
 else:
  d = _find_addresses_via_config()
 def _collect(res):
  for addr in res:
   if ((addr != '0.0.0.0') and (not (addr in addresses))):
    addresses.append(addr)
  return addresses
 d.addCallback(_collect)
 return d

def get_local_addresses_async ( target = '198.41.0.4' ) : addresses = [ ] local_ip = get_local_ip_for ( target ) if local_ip : addresses . append ( local_ip ) if ( sys . platform == 'cygwin' ) : d = _cygwin_hack_find_addresses ( target ) else : d = _find_addresses_via_config ( ) def _collect ( res ) : for addr in res : if ( ( addr != '0.0.0.0' ) and ( not ( addr in addresses ) ) ) : addresses . append ( addr ) return addresses d . addCallback ( _collect ) return d
return a deferred that fires with a list of ipv4 addresses that are currently configured on this host .