def resolve_reverse(packed_ip, flags=0):
 waiter = Waiter()
 core.dns_resolve_reverse(packed_ip, flags, waiter.switch_args)
 (result, _type, ttl, addr) = waiter.get()
 if (result != core.DNS_ERR_NONE):
  raise DNSError(result)
 return (ttl, addr)

def resolve_reverse ( packed_ip , flags = 0 ) : waiter = Waiter ( ) core . dns_resolve_reverse ( packed_ip , flags , waiter . switch_args ) ( result , _type , ttl , addr ) = waiter . get ( ) if ( result != core . DNS_ERR_NONE ) : raise DNSError ( result ) return ( ttl , addr )
lookup a ptr record for a given ip address .