use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.segment.routing.ext.rev151014.binding.sub.tlvs.binding.sub.tlv.Ipv4EroCase in project bgpcep by opendaylight.
the class Ipv4EroParser method serializeSubTlv.
@Override
public void serializeSubTlv(final BindingSubTlv bindingSubTlv, final ByteBuf aggregator) {
Preconditions.checkArgument(bindingSubTlv instanceof Ipv4EroCase, "Wrong BindingSubTlv instance expected", bindingSubTlv);
final Ipv4EroCase ipv4Ero = (Ipv4EroCase) bindingSubTlv;
TlvUtil.writeTLV(getType(), serializeIpv4EroCase(ipv4Ero.isLoose(), ipv4Ero.getAddress()), aggregator);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.segment.routing.ext.rev151014.binding.sub.tlvs.binding.sub.tlv.Ipv4EroCase in project bgpcep by opendaylight.
the class Ipv4EroParser method parseIpv4EroCase.
static Ipv4EroCase parseIpv4EroCase(final ByteBuf buffer) {
final Ipv4EroCaseBuilder builder = new Ipv4EroCaseBuilder();
final BitArray flags = BitArray.valueOf(buffer, FLAGS_SIZE);
builder.setLoose(flags.get(LOOSE));
buffer.skipBytes(RESERVED_ERO);
builder.setAddress(Ipv4Util.addressForByteBuf(buffer));
return builder.build();
}
Aggregations