Skip to main content
reverse - node__dns.d.ts - Node documentation
function reverse

Usage in Deno

```typescript import { reverse } from "node:node__dns.d.ts"; ```
reverse(
ip: string,
callback: (
err: ErrnoException | null,
hostnames: string[],
) => void
,
): void
Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an array of host names. On error, `err` is an [`Error`](https://nodejs.org/docs/latest-v22.x/api/errors.html#class-error) object, where `err.code` is one of the [DNS error codes](https://nodejs.org/docs/latest-v22.x/api/dns.html#error-codes).

Parameters

ip: string
callback: (
err: ErrnoException | null,
hostnames: string[],
) => void

Return Type

void