ip-num
    Preparing search index...

    Class IPv6Prefix

    Represents the prefix portion in the CIDR notation for representing IP ranges

    The IPv6 prefix portion represents the mask. It is the number of continuous bits turned on (with value 1) counting from the left side of an 128 bit value.

    {@see https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing} for more information on CIDR

    Implements

    Index

    Constructors

    • Constructor for an instance of IPv6 prefix from a decimal number

      Parameters

      • rawValue: bigint

        the decimal value to construct the IPv6 prefix from.

      Returns IPv6Prefix

      the instance of an IPv6 prefix

    Properties

    type: "IPv6"
    value: bigint

    The decimal value of the 16bit number representing the prefix

    Methods

    • Gets the decimal value of the IPv6 prefix

      Returns bigint

      the decimal value of the IPv6 prefix

    • Converts the IPv6 prefix to a IPv6Mask

      The IPv6 mask is the representation of the prefix in 8 groups of 16 bit values represented in hexadecimal

      Returns IPv6Mask

      the mask representation of the prefix

    • Returns the size (number of IP numbers) of range of this prefix

      Returns bigint

      the size (number of IP numbers) of range of this prefix

    • Gets the decimal value of the IPv4 prefix as string

      Returns string

      he decimal value of the IPv4 prefix as string

    • Convenience method for constructing an instance of IPv46 prefix from a decimal number

      Parameters

      • rawValue: bigint

        the decimal value to construct the IPv6 prefix from.

      Returns IPv6Prefix

      the instance of an IPv6 prefix