use of org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.LispAddress in project lispflowmapping by opendaylight.
the class Ipv4PrefixSerializer method serializeData.
@Override
protected void serializeData(ByteBuffer buffer, LispAddress lispAddress) {
Ipv4Prefix prefix = (Ipv4Prefix) lispAddress.getAddress();
String address = MaskUtil.getAddressStringForIpv4Prefix(prefix);
buffer.put(InetAddresses.forString(address).getAddress());
}
use of org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.LispAddress in project lispflowmapping by opendaylight.
the class Ipv6BinarySerializer method serializeData.
@Override
protected void serializeData(ByteBuffer buffer, LispAddress lispAddress) {
Ipv6Binary address = (Ipv6Binary) lispAddress.getAddress();
buffer.put(address.getIpv6Binary().getValue());
}
use of org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.LispAddress in project lispflowmapping by opendaylight.
the class Ipv6PrefixSerializer method serializeData.
@Override
protected void serializeData(ByteBuffer buffer, LispAddress lispAddress) {
Ipv6Prefix prefix = (Ipv6Prefix) lispAddress.getAddress();
String address = MaskUtil.getAddressStringForIpv6Prefix(prefix);
buffer.put(InetAddresses.forString(address).getAddress());
}
use of org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.LispAddress in project lispflowmapping by opendaylight.
the class LispAddressStringifier method getAddrString.
private static String getAddrString(Destination dst, LispAddress lispAddress) {
if (lispAddress == null) {
return "null";
}
Address addr = lispAddress.getAddress();
Long vni = null;
if (lispAddress.getVirtualNetworkId() != null) {
vni = lispAddress.getVirtualNetworkId().getValue();
}
return getAddrString(dst, addr, vni);
}
use of org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.LispAddress in project lispflowmapping by opendaylight.
the class Ipv6Serializer method serializeData.
@Override
protected void serializeData(ByteBuffer buffer, LispAddress lispAddress) {
Ipv6 address = (Ipv6) lispAddress.getAddress();
buffer.put(InetAddresses.forString(address.getIpv6().getValue()).getAddress());
}
Aggregations