Skip to content

classifyIpv6Address

classifyIpv6Address(address): Ipv6AddressScope

Defined in: packages/net-address/src/ipv6/classify-ipv6.ts:68

Classifies an address against RFC 4291 and the RFC 6890 special-purpose registry.

Ordered narrowest first, because the blocks nest: ::1 sits inside ::/96 and must be reported as loopback rather than as IPv4-compatible, and 2001:db8::/32 sits beside — not inside — Teredo’s 2001::/32. O(1).

BitAddress

Ipv6AddressScope

RangeError When the address is not 128 bits wide.