Options
All
  • Public
  • Public/Protected
  • All
Menu

Class IPv6Prefix

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

The IPv6 prefix portion represents the subnet 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

Hierarchy

  • IPv6Prefix

Index

Constructors

constructor

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

    Parameters

    • rawValue: number

      the decimal value to construct the IPv6 prefix from.

    Returns IPv6Prefix

    the instance of an IPv6 prefix

Properties

value

value: number

The decimal value of the 16bit number representing the prefix

Methods

getValue

  • getValue(): number
  • Gets the decimal value of the IPv6 prefix

    Returns number

    the decimal value of the IPv6 prefix

Private toHexadecatetNotation

  • toHexadecatetNotation(bits: string): string
  • Parameters

    • bits: string

    Returns string

toString

  • toString(): string
  • Gets the decimal value of the IPv4 prefix as string

    Returns string

    he decimal value of the IPv4 prefix as string

toSubnetMask

  • Converts the IPv6 prefix to a IPv6SubnetMask

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

    Returns IPv6SubnetMask

    the subnet mask representation of the prefix

Static fromNumber

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

    Parameters

    • rawValue: number

      the decimal value to construct the IPv6 prefix from.

    Returns IPv6Prefix

    the instance of an IPv6 prefix

Generated using TypeDoc