ip-num
    Preparing search index...

    Class IPv6Mask

    The IPv6Mask can be seen as a specialized IPv4 number where, in a 128 bit number, starting from the left, you have continuous bits turned on (with 1 value) followed by bits turned off (with 0 value). In networking, it is used to demarcate which bits are used to identify a network, and the ones that are used to identify hosts on the network

    Hierarchy (View Summary)

    Index

    Constructors

    • Constructor for creating an instance of IPv6Mask. The passed strings need to be a valid IPv6 mask number in dot-decimal notation

      Parameters

      • ipString: string

        The passed IPv6 string

      Returns IPv6Mask

    Properties

    bitSize: number = 128

    The number of bits needed to represents the value of the IPv6 number

    hexadecatet: Hexadecatet[] = []

    An array of Hexadecatet's

    maximumBitSize: bigint = Validator.ONE_HUNDRED_AND_TWENTY_EIGHT_BIT_SIZE

    The maximum bit size (i.e. binary value) of the IPv6 number in BigInt

    prefix: number

    The cidr prefix represented by this mask

    separator: string = ":"

    The string character used to separate the individual hexadecatet when the IPv6 is rendered as strings

    type: IPNumType = IPNumType.IPv6

    The type of IP number. Value is one of the values of the IPNumType enum

    value: bigint

    The decimal value represented by the IPv6 number in BigInt

    Methods

    • Gets the numeric value of an IP number as BigInt

      Returns bigint

      bigInt the numeric value of an IP number.

    • Checks if an IP number has a value greater than the present value

      Returns boolean

      true, if there is a value greater than the present value. Returns false otherwise.

    • Checks if an IP number has a value lesser than the present value

      Returns boolean

      true, if there is a value lesser than the present value. Returns false otherwise.

    • Checks if the given IP number, is equals to the current IP number

      Parameters

      Returns boolean

      true if the given IP number is equals

    • Checks if the given IP number is greater than this current IP number

      Parameters

      Returns boolean

      true if the given IP number is greater than this current one. False otherwise.

    • Checks if the given IP number is greater than or equals to this current IP number

      Parameters

      Returns boolean

      {boolean} true if the given IP number is greater than or equals to this current one. False otherwise.

    • Checks if the given IP number is lesser than this current IP number

      Parameters

      Returns boolean

      true if the given IP number is less than this current one. False otherwise.

    • Checks if the given IP number is less than or equals to this current IP number

      Parameters

      Returns boolean

      true if the given IP number is less than or equals to this current one. False otherwise.

    • Gets the binary string representation of an IP number.

      Returns string

      the string binary representation.

    • A string representation of the IPv6 number.

      Returns string

      The string representation of IPv6

    • A convenience method for creating an IPv6 by providing the decimal value of the IP number in BigInt

      Parameters

      • bigIntValue: bigint

        the decimal value of the IP number in BigInt

      Returns IPv6

      the IPv6 instance

    • A convenience method for creating an IPv6 from binary string

      Parameters

      • ipBinaryString: string

        the binary string representing the IPv6 number to be created

      Returns IPv6

      the IPv6 instance

    • A convenience method for creating an instance of IPv6Mask. The passed strings need to be a valid IPv4 mask number in dot-decimal notation.

      Parameters

      • rawValue: string

        The passed string in textual notation

      Returns IPv6Mask

      the instance of IPv6Mask

    • A convenience method for creating an IPv4-Compatible IPv6 Address from a IPv4 represented in dot-decimal notation i.e. 127.0.0.1

      Parameters

      • ip4DotDecimalString: string

        string represented in a dot decimal string

      Returns IPv6

      the IPv4-Compatible IPv6 Address

    • Alias for IPv6.fromHexadecimalString

      Parameters

      • ipString: string

        the IP number in hexadecatet

      Returns IPv6

      the IPv6 instance