Class LispAddressUtil


  • public final class LispAddressUtil
    extends java.lang.Object
    • Field Detail

      • LOG

        protected static final org.slf4j.Logger LOG
      • STARTING_SERVICE_INDEX

        public static final short STARTING_SERVICE_INDEX
        See Also:
        Constant Field Values
    • Method Detail

      • addressFromSimpleAddress

        public static Address addressFromSimpleAddress​(SimpleAddress address)
      • addressTypeFromInet

        public static java.lang.Class<? extends LispAddressFamily> addressTypeFromInet​(java.net.InetAddress address)
      • addressFromInet

        public static Address addressFromInet​(java.net.InetAddress address)
      • binaryAddressTypeFromInet

        public static java.lang.Class<? extends LispAddressFamily> binaryAddressTypeFromInet​(java.net.InetAddress address)
      • binaryAddressFromInet

        public static Address binaryAddressFromInet​(java.net.InetAddress address)
      • addressTypeFromIpAddress

        public static java.lang.Class<? extends LispAddressFamily> addressTypeFromIpAddress​(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress address)
      • binaryAddressTypeFromIpAddress

        public static java.lang.Class<? extends LispAddressFamily> binaryAddressTypeFromIpAddress​(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress address)
      • addressFromIpAddress

        public static Address addressFromIpAddress​(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress address)
      • binaryAddressFromIpAddress

        public static Address binaryAddressFromIpAddress​(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress address)
      • addressTypeFromIpPrefix

        public static java.lang.Class<? extends LispAddressFamily> addressTypeFromIpPrefix​(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpPrefix address)
      • addressFromIpPrefix

        public static Address addressFromIpPrefix​(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpPrefix address)
      • addressFromMacAddress

        public static Address addressFromMacAddress​(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress address)
      • addressFromServicePath

        public static Address addressFromServicePath​(ServicePath address)
      • addressFromAsNumber

        public static Address addressFromAsNumber​(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.AsNumber address)
      • toRloc

        public static Rloc toRloc​(java.net.InetAddress address)
      • toRloc

        public static Rloc toRloc​(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address address)
      • toRloc

        public static Rloc toRloc​(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Address address)
      • asIpv4Rloc

        public static Rloc asIpv4Rloc​(java.lang.String address)
      • asIpv6Rloc

        public static Rloc asIpv6Rloc​(java.lang.String address)
      • toEid

        public static Eid toEid​(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Prefix prefix,
                                InstanceIdType vni)
      • toEid

        public static Eid toEid​(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address address,
                                InstanceIdType vni)
      • toEid

        public static Eid toEid​(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpPrefix prefix,
                                InstanceIdType vni)
      • toEid

        public static Eid toEid​(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Address address,
                                InstanceIdType vni)
      • toEid

        public static Eid toEid​(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress mac,
                                InstanceIdType vni)
      • toEid

        public static Eid toEid​(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Prefix prefix,
                                InstanceIdType vni)
      • toEidNoVni

        public static Eid toEidNoVni​(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpPrefix prefix)
      • toIpPrefixEid

        public static Eid toIpPrefixEid​(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress addr,
                                        int vni)
      • asIpv4PrefixEid

        public static Eid asIpv4PrefixEid​(java.lang.String prefix)
      • asIpv4PrefixEid

        public static Eid asIpv4PrefixEid​(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address addr,
                                          InstanceIdType vni)
      • asIpv4PrefixEid

        public static Eid asIpv4PrefixEid​(java.lang.String prefix,
                                          InstanceIdType iiType)
      • asIpv4PrefixEid

        public static Eid asIpv4PrefixEid​(Eid eid,
                                          java.net.Inet4Address address,
                                          short mask)
      • asIpv4PrefixBinaryEid

        public static Eid asIpv4PrefixBinaryEid​(java.lang.String prefix)
      • asIpv4PrefixBinaryEid

        public static Eid asIpv4PrefixBinaryEid​(long vni,
                                                java.lang.String prefix)
      • asIpv4PrefixBinaryEid

        public static Eid asIpv4PrefixBinaryEid​(java.lang.String prefix,
                                                InstanceIdType iiType)
      • asIpv4PrefixBinaryEid

        public static Eid asIpv4PrefixBinaryEid​(Eid eid,
                                                byte[] address,
                                                short mask)
      • asIpv4PrefixBinaryEid

        public static Eid asIpv4PrefixBinaryEid​(long vni,
                                                byte[] address,
                                                short mask)
      • asIpv4PrefixBinaryEid

        public static Eid asIpv4PrefixBinaryEid​(InstanceIdType vni,
                                                byte[] address,
                                                short mask)
      • asIpv4Eid

        public static Eid asIpv4Eid​(java.lang.String address)
      • asIpv4Eid

        public static Eid asIpv4Eid​(java.lang.String address,
                                    long vni)
      • asIpv6Eid

        public static Eid asIpv6Eid​(java.lang.String address)
      • asIpv6Eid

        public static Eid asIpv6Eid​(java.lang.String address,
                                    long vni)
      • asIpv6PrefixEid

        public static Eid asIpv6PrefixEid​(java.lang.String prefix)
      • asIpv6PrefixEid

        public static Eid asIpv6PrefixEid​(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Address addr,
                                          InstanceIdType vni)
      • asIpv6PrefixEid

        public static Eid asIpv6PrefixEid​(Eid eid,
                                          java.net.Inet6Address address,
                                          short mask)
      • asIpv6PrefixBinaryEid

        public static Eid asIpv6PrefixBinaryEid​(java.lang.String prefix)
      • asIpv6PrefixBinaryEid

        public static Eid asIpv6PrefixBinaryEid​(long vni,
                                                java.lang.String prefix)
      • asIpv6PrefixBinaryEid

        public static Eid asIpv6PrefixBinaryEid​(java.lang.String prefix,
                                                InstanceIdType iiType)
      • asIpv6PrefixBinaryEid

        public static Eid asIpv6PrefixBinaryEid​(Eid eid,
                                                byte[] address,
                                                short mask)
      • asIpv6PrefixBinaryEid

        public static Eid asIpv6PrefixBinaryEid​(long vni,
                                                byte[] address,
                                                short mask)
      • asIpv6PrefixBinaryEid

        public static Eid asIpv6PrefixBinaryEid​(InstanceIdType vni,
                                                byte[] address,
                                                short mask)
      • asIpPrefixBinaryEid

        public static Eid asIpPrefixBinaryEid​(Eid eid)
      • ipVersionFromString

        public static int ipVersionFromString​(java.lang.String ip)
      • asIpPrefix

        public static org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpPrefix asIpPrefix​(java.lang.String addr,
                                                                                                                             int mask)
      • asServicePathEid

        public static Eid asServicePathEid​(long vni,
                                           long servicePathId,
                                           short serviceIndex)
      • asMacEid

        public static Eid asMacEid​(java.lang.String address,
                                   long vni)
      • asMacEid

        public static Eid asMacEid​(java.lang.String address)
      • asDistinguishedNameEid

        public static Eid asDistinguishedNameEid​(java.lang.String address,
                                                 long vni)
      • asDistinguishedNameEid

        public static Eid asDistinguishedNameEid​(java.lang.String address)
      • asKeyValueAddress

        public static Rloc asKeyValueAddress​(java.lang.String key,
                                             SimpleAddress value)
      • asSrcDst

        public static SourceDestKey asSrcDst​(java.lang.String src,
                                             java.lang.String dst,
                                             int smask,
                                             int dmask)
      • asSrcDstEid

        public static Eid asSrcDstEid​(java.lang.String src,
                                      java.lang.String dst,
                                      int smask,
                                      int dmask,
                                      long vni)
      • asTeLcafRloc

        public static Rloc asTeLcafRloc​(java.util.List<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress> hopList)
      • asLocatorRecords

        public static java.util.List<LocatorRecord> asLocatorRecords​(java.util.List<Rloc> locators)
      • getNoAddressEid

        public static Eid getNoAddressEid()
      • ipAddressToByteArray

        public static byte[] ipAddressToByteArray​(Address addr)
      • convertToBinary

        public static Eid convertToBinary​(Eid eid)
      • convertToBinary

        public static Rloc convertToBinary​(Rloc rloc)
      • addressBinaryFromInet

        public static IpAddressBinary addressBinaryFromInet​(java.net.InetAddress inetAddress)
        Converts the InetAddress into Ipv4 or Ipv6 IpAddressBinary. If null parameter is passed, method returns the Ipv4 loopback address (127.0.0.1).
        Parameters:
        inetAddress - Any Ipv4 or Ipv6 InetAddress.
        Returns:
        The converted Ipv4 or Ipv6 IpAddressBinary, or Ipv4 loopback address (127.0.0.1) if null is passed.
      • convertFromBinary

        public static Eid convertFromBinary​(Eid eid)
      • convertFromBinary

        public static Rloc convertFromBinary​(Rloc rloc)
      • addressNeedsConversionToBinary

        public static boolean addressNeedsConversionToBinary​(Address address)
      • addressNeedsConversionFromBinary

        public static boolean addressNeedsConversionFromBinary​(Address address)
      • compareIpAddressByteArrays

        public static int compareIpAddressByteArrays​(byte[] one,
                                                     byte[] two)
      • getIpPrefixMask

        public static short getIpPrefixMask​(Eid eid)