use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev171207.RedirectIpv6ExtendedCommunity in project bgpcep by opendaylight.
the class RedirectIpv6EcHandler method serializeExtendedCommunity.
@Override
public void serializeExtendedCommunity(final ExtendedCommunity extendedCommunity, final ByteBuf byteAggregator) {
Preconditions.checkArgument(extendedCommunity instanceof RedirectIpv6ExtendedCommunity, "The extended community %s is not RedirectIpv6ExtendedCommunity type.", extendedCommunity);
final RedirectIpv6 redirectIpv6 = ((RedirectIpv6ExtendedCommunity) extendedCommunity).getRedirectIpv6();
byteAggregator.writeBytes(Ipv6Util.byteBufForAddress(redirectIpv6.getGlobalAdministrator()));
ByteBufWriteUtil.writeUnsignedShort(redirectIpv6.getLocalAdministrator(), byteAggregator);
}
Aggregations