def _convert_host_to_ip(host):
 addrinfo = socket.getaddrinfo(host, 80, 0, 0, socket.SOL_TCP)
 ips = []
 for (family, socktype, proto, canonname, sockaddr) in addrinfo:
  ip = sockaddr[0]
  ips.append((family, ip))
  if (family == socket.AF_INET):
   ips.append((socket.AF_INET6, ('::ffff:' + ip)))
 return ips

def _convert_host_to_ip ( host ) : addrinfo = socket . getaddrinfo ( host , 80 , 0 , 0 , socket . SOL_TCP ) ips = [ ] for ( family , socktype , proto , canonname , sockaddr ) in addrinfo : ip = sockaddr [ 0 ] ips . append ( ( family , ip ) ) if ( family == socket . AF_INET ) : ips . append ( ( socket . AF_INET6 , ( '::ffff:' + ip ) ) ) return ips
perform forward dns resolution on host .