IPv6 reverse DNS pointer names.

This module provides addressv6ToArpa, which builds the ip6.arpa name a PTR record for an IPv6 address lives at (RFC 3596 ยง2.5).

For the IPv4 and universal forms, see:

The name is relative -- no trailing dot. See ADR 0009.

Examples

Build the name a PTR record lives at

import { assertEquals } from "@std/assert";
import { addressv6ToArpa } from "@hertzg/ip/arpav6";
import { parseAddressv6 } from "@hertzg/ip/addressv6";

assertEquals(
  addressv6ToArpa(parseAddressv6("2001:db8::1").address),
  "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa",
);

Functions

f
addressv6ToArpa(address: bigint): string

Builds the reverse DNS pointer name of an IPv6 address.