use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.segment.routing.ext.rev151014.binding.sub.tlvs.binding.sub.tlv.Ipv6EroCase in project bgpcep by opendaylight.
the class Ipv6EroParser method serializeSubTlv.
@Override
public void serializeSubTlv(final BindingSubTlv bindingSubTlv, final ByteBuf aggregator) {
Preconditions.checkArgument(bindingSubTlv instanceof Ipv6EroCase, "Wrong BindingSubTlv instance expected", bindingSubTlv);
final Ipv6EroCase ipv6Ero = (Ipv6EroCase) bindingSubTlv;
TlvUtil.writeTLV(getType(), serializeIpv6EroCase(ipv6Ero.isLoose(), ipv6Ero.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.Ipv6EroCase in project bgpcep by opendaylight.
the class Ipv6EroParser method parseIpv6EroCase.
public static Ipv6EroCase parseIpv6EroCase(final ByteBuf buffer) {
final Ipv6EroCaseBuilder builder = new Ipv6EroCaseBuilder();
final BitArray flags = BitArray.valueOf(buffer, Ipv4EroParser.FLAGS_SIZE);
builder.setLoose(flags.get(Ipv4EroParser.LOOSE));
buffer.skipBytes(Ipv4EroParser.RESERVED_ERO);
builder.setAddress(Ipv6Util.addressForByteBuf(buffer));
return builder.build();
}
Aggregations