Cl8r::IPAM::IPv6CIDR
Represents an IPv6 Classless Inter-Domain Routing (CIDR) subnet prefix. Handles 128-bit bitwise prefix arithmetic and zero-allocation subnet slicing.
Constructors
Initializes an IPv6CIDR with a network address and prefix (0..128). Normalizes host bits in the network address to 0.
Class methods
Instance methods
Returns true if this CIDR block contains the specified IPv6Address.
Returns true if this CIDR block completely encloses another IPv6CIDR.
Calculates the IP address at a specific numerical offset within the subnet.
mask
Sourcenetwork
SourceReturns true if this CIDR block overlaps with another IPv6CIDR.
prefix
SourceSlices this subnet into child subnets of prefix new_prefix without intermediate allocations.
usable_hosts
Computes usable host count. For /128, returns 1; for /127, returns 2; otherwise 2^(128 - prefix).