Ipv6Address

object Ipv6Address extends Ipv6AddressCompanionPlatform
Companion
class
trait Ipv6AddressCompanionPlatform
class Object
trait Matchable
class Any

Value members

Concrete methods

def fromBigInt(value: BigInt): Ipv6Address

Constructs an IPv6 address from a BigInt, using the lower 128-bits.

Constructs an IPv6 address from a BigInt, using the lower 128-bits.

def fromBytes(bytes: Array[Byte]): Option[Ipv6Address]

Constructs an IPv6 address from a 16-element byte array. Returns Some when array is exactly 16-bytes and None otherwise.

Constructs an IPv6 address from a 16-element byte array. Returns Some when array is exactly 16-bytes and None otherwise.

def fromBytes(b0: Int, b1: Int, b2: Int, b3: Int, b4: Int, b5: Int, b6: Int, b7: Int, b8: Int, b9: Int, b10: Int, b11: Int, b12: Int, b13: Int, b14: Int, b15: Int): Ipv6Address

Constructs an address from the specified 16 bytes.

Constructs an address from the specified 16 bytes.

Each byte is represented as an Int to avoid having to manually call .toByte on each value -- the toByte call is done inside this function.

def fromString(value: String): Option[Ipv6Address]

Parses an IPv6 address from a string in RFC4291 notation, returning None if the string is not a valid IPv6 address.

Parses an IPv6 address from a string in RFC4291 notation, returning None if the string is not a valid IPv6 address.

def mask(bits: Int): Ipv6Address

Computes a mask by setting the first / left-most n bits high.

Computes a mask by setting the first / left-most n bits high.

Example
scala> Ipv6Address.mask(32) res0: Ipv6Address = ffff:ffff::

Concrete fields

CIDR which defines the mapped IPv4 address block (https://datatracker.ietf.org/doc/html/rfc4291#section-2.5.5.2).

CIDR which defines the mapped IPv4 address block (https://datatracker.ietf.org/doc/html/rfc4291#section-2.5.5.2).

Last IP address in the IPv6 multicast range.

Last IP address in the IPv6 multicast range.

First IP address in the IPv6 multicast range.

First IP address in the IPv6 multicast range.

Last IP address in the IPv6 source specific multicast range.

Last IP address in the IPv6 source specific multicast range.

First IP address in the IPv6 source specific multicast range.

First IP address in the IPv6 source specific multicast range.