Enum Class AddressNormalizationUtil

java.lang.Object
java.lang.Enum<AddressNormalizationUtil>
org.opendaylight.openflowplugin.impl.util.AddressNormalizationUtil
All Implemented Interfaces:
Serializable, Comparable<AddressNormalizationUtil>, Constable

public enum AddressNormalizationUtil extends Enum<AddressNormalizationUtil>
Utility class used for converting OpenFlow port numbers, Ipv4 and Ipv6 addresses to normalized format.
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
     
     
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static @Nullable String
    normalizeInetAddressWithMask(@Nullable InetAddress address, byte @Nullable [] mask)
    Convert arbitrary mask to prefix mask and append it to textual representation of Inet address.
    static @Nullable InetAddress
    normalizeIpAddress(byte @Nullable [] address, byte @Nullable [] mask)
    Normalize generic IP address and arbitrary mask in byte array format and apply arbitrary mask to IP address.
    static @Nullable org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Prefix
    normalizeIpv4Address(byte @Nullable [] address, byte @Nullable [] mask)
    Normalize Ipv4 address and arbitrary mask in byte array format and apply arbitrary mask to Ipv4 address.
    static @Nullable org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Prefix
    normalizeIpv4Arbitrary(@Nullable org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address ipv4Address, @Nullable org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.DottedQuad ipv4Mask)
    Normalize Ipv4 address and arbitrary mask and apply arbitrary mask to Ipv4 address.
    static @Nullable org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Prefix
    normalizeIpv4Prefix(@Nullable org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Prefix ipv4Prefix)
    Normalize Ipv4 address with prefix mask (ex.
    static @Nullable org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Prefix
    normalizeIpv6Address(byte @Nullable [] address, byte @Nullable [] mask)
    Normalize Ipv6 address and arbitrary mask in byte array format and apply arbitrary mask to Ipv6 address.
    static @Nullable org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Address
    normalizeIpv6AddressWithoutMask(@Nullable org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Address ipv6Address)
    Normalize ipv 6 address without mask.
    static @Nullable org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Prefix
    normalizeIpv6Arbitrary(@Nullable org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Address ipv6Address, @Nullable Ipv6ArbitraryMask ipv4Mask)
    Normalize Ipv6 address and arbitrary mask and apply arbitrary mask to Ipv6 address.
    static @Nullable org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Prefix
    normalizeIpv6Prefix(@Nullable org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Prefix ipv6Prefix)
    Normalize Ipv6 address with prefix mask (ex.
    static @Nullable org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress
    normalizeMacAddress(@Nullable org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress macAddress)
    Convert MAC address to it's lower case format.
    static @Nullable org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress
    normalizeMacAddressMask(@Nullable org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress macAddress)
    Convert MAC address mask to it's lower case format and if it is full F mask, return null.
    @Nullable org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Uri
    normalizeProtocolAgnosticPort(@Nullable org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Uri port)
    Extract port number from URI and convert it to OpenFlow specific textual representation.
    static @NonNull AddressNormalizationUtil
     
    Returns the enum constant of this class with the specified name.
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

  • Method Details

    • values

      public static AddressNormalizationUtil[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static AddressNormalizationUtil valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • ofVersion

      public static @NonNull AddressNormalizationUtil ofVersion(OpenflowVersion version)
    • normalizeProtocolAgnosticPort

      public @Nullable org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Uri normalizeProtocolAgnosticPort(@Nullable org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Uri port)
      Extract port number from URI and convert it to OpenFlow specific textual representation.
      Parameters:
      port - the OpenFlow port
      Returns:
      normalized uri
    • normalizeIpv6Prefix

      public static @Nullable org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Prefix normalizeIpv6Prefix(@Nullable org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Prefix ipv6Prefix)
      Normalize Ipv6 address with prefix mask (ex. 1234:5678:9ABC::/76) and apply prefix mask to Ipv6 address.
      Parameters:
      ipv6Prefix - the Ipv6 prefix
      Returns:
      normalized Ipv6 prefix
    • normalizeIpv6Arbitrary

      public static @Nullable org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Prefix normalizeIpv6Arbitrary(@Nullable org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Address ipv6Address, @Nullable Ipv6ArbitraryMask ipv4Mask)
      Normalize Ipv6 address and arbitrary mask and apply arbitrary mask to Ipv6 address.
      Parameters:
      ipv6Address - the Ipv4 address
      ipv4Mask - the Ipv4 mask
      Returns:
      normalized Ipv6 prefix
    • normalizeIpv6AddressWithoutMask

      public static @Nullable org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Address normalizeIpv6AddressWithoutMask(@Nullable org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Address ipv6Address)
      Normalize ipv 6 address without mask.
      Parameters:
      ipv6Address - the Ipv6 address
      Returns:
      normalized Ipv6 address
    • normalizeIpv4Prefix

      public static @Nullable org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Prefix normalizeIpv4Prefix(@Nullable org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Prefix ipv4Prefix)
      Normalize Ipv4 address with prefix mask (ex. 192.168.0.1/24) and apply prefix mask to Ipv4 address.
      Parameters:
      ipv4Prefix - the Ipv4 prefix
      Returns:
      normalized Ipv4 prefix
    • normalizeIpv4Arbitrary

      public static @Nullable org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Prefix normalizeIpv4Arbitrary(@Nullable org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address ipv4Address, @Nullable org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.DottedQuad ipv4Mask)
      Normalize Ipv4 address and arbitrary mask and apply arbitrary mask to Ipv4 address.
      Parameters:
      ipv4Address - the Ipv4 address
      ipv4Mask - the Ipv4 mask
      Returns:
      normalized Ipv4 prefix
    • normalizeIpv4Address

      public static @Nullable org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Prefix normalizeIpv4Address(byte @Nullable [] address, byte @Nullable [] mask)
      Normalize Ipv4 address and arbitrary mask in byte array format and apply arbitrary mask to Ipv4 address.
      Parameters:
      address - Ipv4 address byte array
      mask - Ipv4 mask byte array
      Returns:
      normalized Ipv4 prefix
    • normalizeIpv6Address

      public static @Nullable org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Prefix normalizeIpv6Address(byte @Nullable [] address, byte @Nullable [] mask)
      Normalize Ipv6 address and arbitrary mask in byte array format and apply arbitrary mask to Ipv6 address.
      Parameters:
      address - Ipv6 address byte array
      mask - Ipv6 mask byte array
      Returns:
      normalized Ipv6 prefix
    • normalizeIpAddress

      public static @Nullable InetAddress normalizeIpAddress(byte @Nullable [] address, byte @Nullable [] mask)
      Normalize generic IP address and arbitrary mask in byte array format and apply arbitrary mask to IP address.
      Parameters:
      address - address byte array
      mask - mask byte array
      Returns:
      normalized Inet address
    • normalizeInetAddressWithMask

      public static @Nullable String normalizeInetAddressWithMask(@Nullable InetAddress address, byte @Nullable [] mask)
      Convert arbitrary mask to prefix mask and append it to textual representation of Inet address.
      Parameters:
      address - the address
      mask - the mask
      Returns:
      the string
    • normalizeMacAddress

      public static @Nullable org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress normalizeMacAddress(@Nullable org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress macAddress)
      Convert MAC address to it's lower case format.
      Parameters:
      macAddress - the MAC address
      Returns:
      normalized MAC address
    • normalizeMacAddressMask

      public static @Nullable org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress normalizeMacAddressMask(@Nullable org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress macAddress)
      Convert MAC address mask to it's lower case format and if it is full F mask, return null.
      Parameters:
      macAddress - the MAC address
      Returns:
      normalized MAC address