Class LispAddressUtil
- java.lang.Object
-
- org.opendaylight.lispflowmapping.lisp.util.LispAddressUtil
-
public final class LispAddressUtil extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.slf4j.Logger
LOG
static short
STARTING_SERVICE_INDEX
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static IpAddressBinary
addressBinaryFromAddress(Address address)
static IpAddressBinary
addressBinaryFromInet(java.net.InetAddress inetAddress)
Converts theInetAddress
into Ipv4 or Ipv6IpAddressBinary
.static Address
addressFromAsNumber(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.AsNumber address)
static Address
addressFromDistinguishedName(DistinguishedNameType address)
static Address
addressFromInet(java.net.InetAddress address)
static Address
addressFromIpAddress(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress address)
static Address
addressFromIpPrefix(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpPrefix address)
static Address
addressFromMacAddress(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress address)
static Address
addressFromServicePath(ServicePath address)
static Address
addressFromSimpleAddress(SimpleAddress address)
static boolean
addressNeedsConversionFromBinary(Address address)
static boolean
addressNeedsConversionToBinary(Address address)
static java.lang.Class<? extends LispAddressFamily>
addressTypeFromInet(java.net.InetAddress address)
static java.lang.Class<? extends LispAddressFamily>
addressTypeFromIpAddress(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress address)
static java.lang.Class<? extends LispAddressFamily>
addressTypeFromIpPrefix(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpPrefix address)
static java.lang.Class<? extends LispAddressFamily>
addressTypeFromSimpleAddress(SimpleAddress address)
static Eid
asBinaryEid(SimpleAddress address, InstanceIdType iid)
static Eid
asDistinguishedNameEid(java.lang.String address)
static Eid
asDistinguishedNameEid(java.lang.String address, long vni)
static Eid
asEid(SimpleAddress address, InstanceIdType vni)
static org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpPrefix
asIpPrefix(java.lang.String addr, int mask)
static Eid
asIpPrefixBinaryEid(Eid eid)
static Eid
asIpv4Eid(java.lang.String address)
static Eid
asIpv4Eid(java.lang.String address, long vni)
static Eid
asIpv4PrefixBinaryEid(long vni, byte[] address, short mask)
static Eid
asIpv4PrefixBinaryEid(long vni, java.lang.String prefix)
static Eid
asIpv4PrefixBinaryEid(java.lang.String prefix)
static Eid
asIpv4PrefixBinaryEid(java.lang.String prefix, InstanceIdType iiType)
static Eid
asIpv4PrefixBinaryEid(InstanceIdType vni, byte[] address, short mask)
static Eid
asIpv4PrefixBinaryEid(Eid eid, byte[] address, short mask)
static Eid
asIpv4PrefixEid(java.lang.String prefix)
static Eid
asIpv4PrefixEid(java.lang.String prefix, InstanceIdType iiType)
static Eid
asIpv4PrefixEid(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address addr, InstanceIdType vni)
static Eid
asIpv4PrefixEid(Eid eid, java.net.Inet4Address address, short mask)
static Rloc
asIpv4Rloc(java.lang.String address)
static Eid
asIpv6Eid(java.lang.String address)
static Eid
asIpv6Eid(java.lang.String address, long vni)
static Eid
asIpv6PrefixBinaryEid(long vni, byte[] address, short mask)
static Eid
asIpv6PrefixBinaryEid(long vni, java.lang.String prefix)
static Eid
asIpv6PrefixBinaryEid(java.lang.String prefix)
static Eid
asIpv6PrefixBinaryEid(java.lang.String prefix, InstanceIdType iiType)
static Eid
asIpv6PrefixBinaryEid(InstanceIdType vni, byte[] address, short mask)
static Eid
asIpv6PrefixBinaryEid(Eid eid, byte[] address, short mask)
static Eid
asIpv6PrefixEid(java.lang.String prefix)
static Eid
asIpv6PrefixEid(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Address addr, InstanceIdType vni)
static Eid
asIpv6PrefixEid(Eid eid, java.net.Inet6Address address, short mask)
static Rloc
asIpv6Rloc(java.lang.String address)
static Rloc
asKeyValueAddress(java.lang.String key, SimpleAddress value)
static Eid
asKeyValueAddressEid(SimpleAddress key, SimpleAddress value)
static Rloc
asKeyValueAddressRloc(SimpleAddress key, SimpleAddress value)
static java.util.List<LocatorRecord>
asLocatorRecords(java.util.List<Rloc> locators)
static Eid
asMacEid(java.lang.String address)
static Eid
asMacEid(java.lang.String address, long vni)
static Eid
asServicePathEid(long vni, long servicePathId, short serviceIndex)
static SourceDestKey
asSrcDst(java.lang.String src, java.lang.String dst, int smask, int dmask)
static Eid
asSrcDstEid(java.lang.String src, java.lang.String dst, int smask, int dmask, long vni)
static Eid
asSrcDstEid(SourceDestKey sd, InstanceIdType vni)
static Rloc
asTeLcafRloc(java.util.List<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress> hopList)
static Address
binaryAddressFromInet(java.net.InetAddress address)
static Address
binaryAddressFromIpAddress(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress address)
static java.lang.Class<? extends LispAddressFamily>
binaryAddressTypeFromInet(java.net.InetAddress address)
static java.lang.Class<? extends LispAddressFamily>
binaryAddressTypeFromIpAddress(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress address)
static int
compareIpAddressByteArrays(byte[] one, byte[] two)
static Eid
convertFromBinary(Eid eid)
static Rloc
convertFromBinary(Rloc rloc)
static Eid
convertToBinary(Eid eid)
static Rloc
convertToBinary(Rloc rloc)
static short
getIpPrefixMask(Eid eid)
static Eid
getNoAddressEid()
static byte[]
ipAddressToByteArray(Address addr)
static int
ipVersionFromString(java.lang.String ip)
static Eid
toEid(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpPrefix prefix, InstanceIdType vni)
static Eid
toEid(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address address, InstanceIdType vni)
static Eid
toEid(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Prefix prefix, InstanceIdType vni)
static Eid
toEid(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Address address, InstanceIdType vni)
static Eid
toEid(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Prefix prefix, InstanceIdType vni)
static Eid
toEid(DistinguishedNameType dn, InstanceIdType vni)
static Eid
toEid(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress mac, InstanceIdType vni)
static Eid
toEid(Ipv4AddressBinary address, InstanceIdType vni)
static Eid
toEid(Ipv6AddressBinary address, InstanceIdType vni)
static Eid
toEid(Ipv4PrefixBinary prefix, InstanceIdType vni)
static Eid
toEid(Ipv6PrefixBinary prefix, InstanceIdType vni)
static Eid
toEidNoVni(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpPrefix prefix)
static Eid
toIpPrefixEid(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress addr, int vni)
static Rloc
toRloc(java.net.InetAddress address)
static Rloc
toRloc(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address address)
static Rloc
toRloc(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Address address)
static Rloc
toRloc(SimpleAddress address)
static Rloc
toRloc(Ipv4AddressBinary address)
static Rloc
toRloc(Ipv6AddressBinary address)
-
-
-
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
-
addressTypeFromSimpleAddress
public static java.lang.Class<? extends LispAddressFamily> addressTypeFromSimpleAddress(SimpleAddress address)
-
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)
-
addressFromDistinguishedName
public static Address addressFromDistinguishedName(DistinguishedNameType 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(SimpleAddress 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(Ipv4AddressBinary address)
-
toRloc
public static Rloc toRloc(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Address address)
-
toRloc
public static Rloc toRloc(Ipv6AddressBinary 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(Ipv4PrefixBinary prefix, InstanceIdType vni)
-
toEid
public static Eid toEid(Ipv6PrefixBinary 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(Ipv4AddressBinary 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(Ipv6AddressBinary address, InstanceIdType vni)
-
toEid
public static Eid toEid(DistinguishedNameType dn, 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)
-
asEid
public static Eid asEid(SimpleAddress address, InstanceIdType 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(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(long vni, byte[] address, short mask)
-
asIpv6PrefixBinaryEid
public static Eid asIpv6PrefixBinaryEid(InstanceIdType vni, byte[] address, short mask)
-
asBinaryEid
public static Eid asBinaryEid(SimpleAddress address, InstanceIdType iid)
-
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)
-
asKeyValueAddressEid
public static Eid asKeyValueAddressEid(SimpleAddress key, SimpleAddress value)
-
asKeyValueAddressRloc
public static Rloc asKeyValueAddressRloc(SimpleAddress key, SimpleAddress value)
-
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)
-
asSrcDstEid
public static Eid asSrcDstEid(SourceDestKey sd, InstanceIdType 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)
-
addressBinaryFromInet
public static IpAddressBinary addressBinaryFromInet(java.net.InetAddress inetAddress)
Converts theInetAddress
into Ipv4 or Ipv6IpAddressBinary
. 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.
-
addressBinaryFromAddress
public static IpAddressBinary addressBinaryFromAddress(Address address)
-
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)
-
-