struct

Cl8r::IPAM::IPv6Address

Inherits Comparable < Struct < Value < Object

Represents an IPv6 address backed by a 128-bit unsigned integer (UInt128). Complies strictly with RFC 5952 canonical formatting rules.

Constructors

from_ipconv(ip : Ipconv::IPv6) : IPv6Address

Creates an IPv6Address from an Ipconv::IPv6 struct.

Source
new(raw : UInt128)

Initializes an IPv6Address from a raw 128-bit unsigned integer.

Source
parse(str : String) : IPv6Address

Parses standard, abbreviated, and zero-compressed IPv6 strings into an IPv6Address.

Source

Instance methods

+(other : Int) : IPv6Address

Adds an integer offset to this address.

Source
-(other : Int) : IPv6Address

Subtracts an integer offset from this address.

Source
-(other : IPv6Address) : UInt128

Computes the distance (number of addresses) between two IPv6 addresses.

Source
<=>(other : IPv6Address) : Int32

Compares this IPv6 address with another based on raw integer value.

Source
global_unicast?

Returns true if this is a global unicast address (2000::/3).

Source
hextets

Decomposes the address into 8 16-bit unsigned integers (hextets).

Source
loopback?

Returns true if this is the loopback address (::1).

Source
multicast?

Returns true if this is a multicast address (ff00::/8).

Source
special

Returns the IANA special-purpose designation (e.g. UniqueLocal, LinkLocal, Multicast).

Source
to_ipconv

Converts this IPv6Address into an Ipconv::IPv6 representation.

Source
to_s(io : IO) : Nil

Outputs canonical RFC 5952 zero-compressed representation.

Source
unique_local?

Returns true if this is a unique local address (fc00::/7).

Source
unspecified?

Returns true if this is the unspecified address (::).

Source