use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.segment.routing.ext.rev151014.binding.sub.tlvs.binding.sub.tlv.UnnumberedInterfaceIdEroCase in project bgpcep by opendaylight.
the class UnnumberedEroParser method parseUnnumberedEroCase.
static UnnumberedInterfaceIdEroCase parseUnnumberedEroCase(final ByteBuf buffer) {
final UnnumberedInterfaceIdEroCaseBuilder builder = new UnnumberedInterfaceIdEroCaseBuilder();
final BitArray flags = BitArray.valueOf(buffer, Ipv4EroParser.FLAGS_SIZE);
builder.setLoose(flags.get(Ipv4EroParser.LOOSE));
buffer.skipBytes(Ipv4EroParser.RESERVED_ERO);
builder.setRouterId(buffer.readUnsignedInt());
builder.setInterfaceId(buffer.readUnsignedInt());
return builder.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.segment.routing.ext.rev151014.binding.sub.tlvs.binding.sub.tlv.UnnumberedInterfaceIdEroCase in project bgpcep by opendaylight.
the class UnnumberedEroParser method serializeSubTlv.
@Override
public void serializeSubTlv(final BindingSubTlv bindingSubTlv, final ByteBuf aggregator) {
Preconditions.checkArgument(bindingSubTlv instanceof UnnumberedInterfaceIdEroCase, "Wrong BindingSubTlv instance expected", bindingSubTlv);
final UnnumberedInterfaceIdEroCase unnumberedEro = (UnnumberedInterfaceIdEroCase) bindingSubTlv;
TlvUtil.writeTLV(getType(), serializeUnnumberedIdEro(unnumberedEro.isLoose(), unnumberedEro.getRouterId(), unnumberedEro.getInterfaceId()), aggregator);
}
Aggregations