public abstract class AbstractFlowspecNlriParser extends Object implements NlriParser, NlriSerializer
| Modifier and Type | Field and Description |
|---|---|
static org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier |
DEST_PREFIX_NID |
protected SimpleFlowspecTypeRegistry |
flowspecTypeRegistry |
static org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier |
OP_NID |
static org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier |
SOURCE_PREFIX_NID |
static org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier |
VALUE_NID |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractFlowspecNlriParser(SimpleFlowspecTypeRegistry flowspecTypeRegistry) |
| Modifier and Type | Method and Description |
|---|---|
abstract DestinationType |
createAdvertizedRoutesDestinationType(Object[] nlriFields,
PathId pathId)
Create advertized destination type
|
abstract DestinationType |
createWithdrawnDestinationType(Object[] nlriFields,
PathId pathId)
Create withdrawn destination type
|
List<Flowspec> |
extractFlowspec(org.opendaylight.yangtools.yang.data.api.schema.DataContainerNode<?> route) |
abstract void |
extractSpecificFlowspec(org.opendaylight.yangtools.yang.data.api.schema.ChoiceNode fsType,
FlowspecBuilder fsBuilder) |
protected Object[] |
parseNlri(io.netty.buffer.ByteBuf nlri)
Override this function to parse additional NLRI fields
|
void |
parseNlri(io.netty.buffer.ByteBuf nlri,
MpReachNlriBuilder builder,
PeerSpecificParserConstraint constraint)
Parse MP UN_REACH NLRI from buffer.
|
void |
parseNlri(io.netty.buffer.ByteBuf nlri,
MpUnreachNlriBuilder builder,
PeerSpecificParserConstraint constraint)
Parse MP UN_REACH NLRI from buffer.
|
protected List<Flowspec> |
parseNlriFlowspecList(io.netty.buffer.ByteBuf nlri)
Parses Flowspec NLRI into list of Flowspec.
|
static int |
readNlriLength(io.netty.buffer.ByteBuf nlri) |
protected static PathId |
readPathId(io.netty.buffer.ByteBuf nlri,
Class<? extends AddressFamily> afi,
Class<? extends SubsequentAddressFamily> safi,
PeerSpecificParserConstraint constraint) |
void |
serializeAttribute(Attributes pathAttributes,
io.netty.buffer.ByteBuf byteAggregator) |
protected abstract void |
serializeMpReachNlri(DestinationType dstType,
io.netty.buffer.ByteBuf byteAggregator) |
protected abstract void |
serializeMpUnreachNlri(DestinationType dstType,
io.netty.buffer.ByteBuf byteAggregator) |
protected void |
serializeNlri(List<Flowspec> flowspecList,
io.netty.buffer.ByteBuf buffer) |
protected void |
serializeNlri(Object[] nlriFields,
io.netty.buffer.ByteBuf buffer) |
protected void |
serializeNlri(Object[] nlriFields,
PathId pathId,
io.netty.buffer.ByteBuf buffer)
Serializes Flowspec NLRI to ByteBuf.
|
String |
stringNlri(org.opendaylight.yangtools.yang.data.api.schema.DataContainerNode<?> flowspec) |
protected String |
stringNlri(List<Flowspec> flows) |
protected abstract void |
stringSpecificFSNlriType(FlowspecType value,
StringBuilder buffer) |
public static final org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier DEST_PREFIX_NID
public static final org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier SOURCE_PREFIX_NID
public static final org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier OP_NID
public static final org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier VALUE_NID
protected final SimpleFlowspecTypeRegistry flowspecTypeRegistry
protected AbstractFlowspecNlriParser(SimpleFlowspecTypeRegistry flowspecTypeRegistry)
protected abstract void serializeMpReachNlri(DestinationType dstType, io.netty.buffer.ByteBuf byteAggregator)
protected abstract void serializeMpUnreachNlri(DestinationType dstType, io.netty.buffer.ByteBuf byteAggregator)
public abstract void extractSpecificFlowspec(org.opendaylight.yangtools.yang.data.api.schema.ChoiceNode fsType,
FlowspecBuilder fsBuilder)
protected abstract void stringSpecificFSNlriType(FlowspecType value, StringBuilder buffer)
public abstract DestinationType createWithdrawnDestinationType(@Nonnull Object[] nlriFields, @Nullable PathId pathId)
nlriFields - a list of NLRI fields to be included in the destination typepathId - associated path id with given NLRIpublic abstract DestinationType createAdvertizedRoutesDestinationType(@Nonnull Object[] nlriFields, @Nullable PathId pathId)
nlriFields - a list of NLRI fields to be included in the destination typepathId - associated path id with given NLRIpublic final void serializeAttribute(Attributes pathAttributes, io.netty.buffer.ByteBuf byteAggregator)
serializeAttribute in interface NlriSerializerprotected void serializeNlri(@Nonnull Object[] nlriFields, @Nonnull io.netty.buffer.ByteBuf buffer)
protected final void serializeNlri(List<Flowspec> flowspecList, @Nonnull io.netty.buffer.ByteBuf buffer)
protected final void serializeNlri(@Nonnull Object[] nlriFields, @Nullable PathId pathId, @Nonnull io.netty.buffer.ByteBuf buffer)
nlriFields - NLRI fields to be serializedpathId - buffer - where flowspec NLRI will be serializedpublic String stringNlri(org.opendaylight.yangtools.yang.data.api.schema.DataContainerNode<?> flowspec)
public final List<Flowspec> extractFlowspec(org.opendaylight.yangtools.yang.data.api.schema.DataContainerNode<?> route)
public static int readNlriLength(@Nonnull io.netty.buffer.ByteBuf nlri)
protected final List<Flowspec> parseNlriFlowspecList(@Nonnull io.netty.buffer.ByteBuf nlri) throws BGPParsingException
nlri - byte representation of NLRI which will be parsedBGPParsingException@Nonnull protected Object[] parseNlri(@Nonnull io.netty.buffer.ByteBuf nlri) throws BGPParsingException
nlri - NLRI bufferBGPParsingExceptionpublic final void parseNlri(@Nonnull io.netty.buffer.ByteBuf nlri, @Nonnull MpReachNlriBuilder builder, @Nullable PeerSpecificParserConstraint constraint) throws BGPParsingException
NlriParserparseNlri in interface NlriParsernlri - Encoded reachable NLRI in ByteBuf.builder - MP REACH NLRI builder.constraint - Peer specific constraints.BGPParsingException - exception.@Nullable protected static PathId readPathId(@Nonnull io.netty.buffer.ByteBuf nlri, Class<? extends AddressFamily> afi, Class<? extends SubsequentAddressFamily> safi, PeerSpecificParserConstraint constraint)
public final void parseNlri(@Nonnull io.netty.buffer.ByteBuf nlri, @Nonnull MpUnreachNlriBuilder builder, @Nullable PeerSpecificParserConstraint constraint) throws BGPParsingException
NlriParserparseNlri in interface NlriParsernlri - Encoded unreachable NLRI in ByteBuf.builder - MP UNREACH NLRI builder.constraint - Peer specific constraints.BGPParsingException - exception.Copyright © 2019 OpenDaylight. All rights reserved.