edgeport - v1.0.6
    Preparing search index...

    Function reverse

    • Reverse-resolves an IP address to its host names via a PTR query.

      Builds the in-addr.arpa (IPv4) or nibble-reversed ip6.arpa (IPv6) name and queries it for PTR records.

      Parameters

      • ip: string

        The IPv4 or IPv6 address.

      • opts: ResolveOptions = {}

        Resolver/query options.

      Returns Promise<string[]>

      The PTR target names; empty if there is no reverse record.

      If ip is not a valid address, or on a server error rcode.

      1.0.4

      import { reverse, RESOLVERS } from 'edgeport/dns';

      const names = await reverse('8.8.8.8', { server: RESOLVERS.google }); // ['dns.google', ...]