Skip to content

Interface: Cidr

A parsed CIDR block (10.0.0.0/8, 2001:db8::/32). base is the network address with all host bits cleared, so membership is a single masked compare (see ipInCidr). Produce one with parseCidr. Carries the normalized cidr string for logging and to key back to caller-side metadata.

base: bigint

Network address (host bits zeroed) as an unsigned bigint.


cidr: string

Normalized <address>/<prefix> string.


prefix: number

Prefix length in bits (the number after the /).


version: IpVersion