Search in sources :

Example 1 with As4BytesCapability

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.open.message.bgp.parameters.optional.capabilities.c.parameters.As4BytesCapability in project bgpcep by opendaylight.

the class StrictBGPPeerRegistry method serializeAs4BytesCapability.

private static byte[] serializeAs4BytesCapability(final As4BytesCapability as4Capability) {
    final ByteBuf buffer = Unpooled.buffer(1 + /*CODE*/
    1 + /*LENGTH*/
    Integer.SIZE / Byte.SIZE);
    final As4CapabilityHandler serializer = new As4CapabilityHandler();
    serializer.serializeCapability(new CParametersBuilder().setAs4BytesCapability(as4Capability).build(), buffer);
    return buffer.array();
}
Also used : CParametersBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.open.message.bgp.parameters.optional.capabilities.CParametersBuilder) As4CapabilityHandler(org.opendaylight.protocol.bgp.parser.impl.message.open.As4CapabilityHandler) ByteBuf(io.netty.buffer.ByteBuf)

Aggregations

ByteBuf (io.netty.buffer.ByteBuf)1 As4CapabilityHandler (org.opendaylight.protocol.bgp.parser.impl.message.open.As4CapabilityHandler)1 CParametersBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.open.message.bgp.parameters.optional.capabilities.CParametersBuilder)1